home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / bsd / 3153 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.9 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
  2. From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: 386BSD-0.1/BRLCAD4.0 benchmark -- poor floa
  5. Message-ID: <1992Jul29.222708.4315@klaava.Helsinki.FI>
  6. Date: 29 Jul 92 22:27:08 GMT
  7. References: <l7ctu0INN880@neuro.usc.edu> <1992Jul29.152914.2508@nrao.edu>
  8. Organization: University of Helsinki
  9. Lines: 31
  10.  
  11. In article <1992Jul29.152914.2508@nrao.edu> cflatter@nrao.edu writes:
  12. >In article l7ctu0INN880@neuro.usc.edu, merlin@neuro.usc.edu (merlin) writes:
  13. >>
  14. >>Does gcc 2.2 actually use 80387 inline code for transcedental functions?
  15. >
  16. >No. I just looked :-(.  (Unless it is very well hidden).
  17.  
  18. gcc-2.2.2 only uses the basic math + fsqrt (fsqrt is new to gcc-2.x). 
  19. The basic math is handled pretty well, though: much better than with
  20. earlier versions.  gcc-2 knows about the fpu stack, resulting in fpu
  21. code that looks almost hand-optimized (at least sometimes).  gcc-1.40
  22. isn't very good at handling the 387 stack (it seems to use mostly
  23. ready-made templates). 
  24.  
  25. >It could probably be made to though.  There appears to be some support for
  26. >inlining transcendental functions for the Moto 68881.
  27.  
  28. I don't think inlining is as easy on the 387 as it's on a 68881: the 387
  29. transcendental functions have enough special cases (argument limitations
  30. etc) that it's probably easier to do it in a dedicated function.  But
  31. those functions should certainly use the 387 instructions instead of
  32. using series arithmetic or whatever portable C code the current 386bsd
  33. libraries seem to use. 
  34.  
  35. The linux libraries might be useful: linux has two different math
  36. libraries, one for soft-float (ie using only the normal arithmetic
  37. functions that are emulated), and one for hard-float.  With shared
  38. libraries (under linux), the same binary can use either, but under
  39. 386bsd you'd have to decide at link-time which to use. 
  40.  
  41.         Linus
  42.