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

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!news!nic.cerf.net!davsmith
  2. From: davsmith@nic.cerf.net (David Smith)
  3. Newsgroups: comp.arch
  4. Subject: Re: SPARC Floating Point Query
  5. Message-ID: <2818@news.cerf.net>
  6. Date: 16 Sep 92 03:06:02 GMT
  7. References: <1992Sep9.135913.12073@gdr.bath.ac.uk>
  8. Sender: news@news.cerf.net
  9. Organization: CERFnet
  10. Lines: 25
  11. Nntp-Posting-Host: nic.cerf.net
  12.  
  13. In article <1992Sep9.135913.12073@gdr.bath.ac.uk> masjpf@gdr.bath.ac.uk (J P Fitch) writes:
  14. >Can anyone throw any light on the following aspect of the SPARC?
  15. >
  16. >We have a trivial C program which calls double divide.  Compiled to
  17. >assembler it creates what one might expect.  When we assemble the code
  18. >and look with adb we find that the assembler has created an additional
  19. >instruction, a fmovs, immediately after that fdivd.  We cannot find
  20. >anything in the documentation we have been able to find to explain
  21. >why, or what it is trying to avoid.  
  22.  
  23. The nearest I was ever able to figure out, that fmovs (basically an FP
  24. no-op) is there to force the IU to take the FP exception that the fdivd
  25. might have caused.  You see, in the SPARC architecture FP traps are
  26. only handled by the IU when it issues an FP instruction to the FPU.
  27. (SPARC Architecture manual, Rev A, page 53) Hence, the floating point
  28. no-op to force the exception to be taken immediately so that you have
  29. some clue about when the exception happens.  Unfortunately that little
  30. kludge assumes that the exception will happen before the FP no-op is
  31. issued.  This is true only if the FP queue is one deep or the FPU is
  32. _very_ fast.  More recent SPARC implementations have FP queues deeper
  33. than one.  I do not know how SUN is handling this with their compilers
  34. for the Viking chip, for example.
  35. -- 
  36. David L. Smith
  37. smithd@discos.com or davsmith@nic.cerf.net
  38.