home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / arch / 9303 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.7 KB

  1. Path: sparky!uunet!mcsun!sunic!dkuug!diku!thorinn
  2. From: thorinn@diku.dk (Lars Henrik Mathiesen)
  3. Newsgroups: comp.arch
  4. Subject: Re: trapping speculative ops (LONG)
  5. Message-ID: <1992Sep9.121701.13208@odin.diku.dk>
  6. Date: 9 Sep 92 12:17:01 GMT
  7. References: <1992Aug31.224611.5196@odin.diku.dk> <1992Sep1.143155.636@bcars64a.bnr.ca>
  8. Sender: thorinn@tyr.diku.dk
  9. Organization: Department of Computer Science, U of Copenhagen
  10. Lines: 44
  11.  
  12. schow@bqneh23.bnr.ca (Stanley T.H. Chow) writes:
  13. >We must handle the cases where a speculative load into a caller-save
  14. >register is not finished by the time the subroutine wants to write
  15. >into that register (I assume the old operation is discarded and the
  16. >new write goes into the pipeline rightaway).
  17.  
  18. One would hope so. As a reality check, I looked at the 21064 data
  19. sheet (it was handy). As far as I can see, destination conflicts do
  20. stall the pipeline on that chip. Of course, currently, compilers have
  21. no reason to write the same register twice without intervening reads,
  22. so chip designers have no reason to build a preemption mechanism.
  23.  
  24. >Given that we want to scoreboard the trap-bits, I suggest the simple
  25. >solution is to have a new instruction that saves a single register
  26. >(both content and trap-bit) into two words.
  27.  
  28. A more radical solution: Put the flags in the memory system! Given a
  29. CPU/memory interface that only supports aligned 64-bit register loads
  30. and stores (not too far from some current RISCs), it would be easy to
  31. add some extra bits to both registers and memory words. This looks
  32. very much like earlier tagged architectures, except that the extra
  33. information is the history of a value instead of its type.
  34.  
  35. I agree with the point raised by Anton Ertl, that trap bits on source
  36. operands should not unconditionally cause a trap, but should propagate
  37. to the result instead, because this allows the compiler to move a
  38. greater part of an expression. This also solves the subroutine problem
  39. --- register saves do not trap.
  40.  
  41. As a further elaboration, the single trap bit might be extended into
  42. several ``status'' bits, such as carry and overflow for integer
  43. registers, and inexact, overflow, and so on for floating point. The
  44. compiler could then generate an instruction to branch/trap to an error
  45. handler on exactly those bits that the language semantics indicate.
  46.  
  47. If zero and negative flags are added, the test instruction turns into
  48. a general conditional branch mechanism. And to please the LISP people,
  49. we could add one or two user defined flag bits.
  50.  
  51. On super-scalar processors, it should be possible to let the test
  52. instructions issue in parallel with almost anything else, so that they
  53. can be hidden in the latency of arithmetic instructions.
  54.  
  55. Lars Mathiesen (U of Copenhagen CS Dep) <thorinn@diku.dk> (Humour NOT marked)
  56.