freebsd-nq/lib/msun
David Schultz 9233b45ad9 Make the fenv.h routines work for programs that use SSE for
floating-point arithmetic on i386.  Now I'm going to make excuses
for why this code is kinda scary:

- To avoid breaking the ABI with 5.3-RELEASE, we can't change
  sizeof(fenv_t).  I stuck the saved mxcsr in some discontiguous
  reserved bits in the existing structure.

- Attempting to access the mxcsr on older processors results
  in an illegal instruction exception, so support for SSE must
  be detected at runtime.  (The extra baggage is optimized away
  if either the application or libm is compiled with -msse{,2}.)

I didn't run tests to ensure that this doesn't SIGILL on older 486's
lacking the cpuid instruction or on other processors lacking SSE.
Results from running the fenv regression test on these processors
would be appreciated.  (You'll need to compile the test with
-DNO_STRICT_DFL_ENV.)  If you have an 80386, or if your processor
supports SSE but the kernel didn't enable it, then you're probably out
of luck.

Also, I un-inlined some of the functions that grew larger as a result
of this change, moving them from fenv.h to fenv.c.
2005-03-17 22:21:46 +00:00
..
alpha Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
amd64 Spell 'fedisableexcept' correctly. 2005-03-16 22:34:14 +00:00
arm Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
bsdsrc GC unused declaration 2004-12-16 20:40:49 +00:00
i387 Make the fenv.h routines work for programs that use SSE for 2005-03-17 22:21:46 +00:00
ia64 Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
man Document feenableexcept(), fedisableexcept(), and fegetexcept(). 2005-03-16 19:04:28 +00:00
powerpc Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
sparc64 Replace fegetmask() and fesetmask() with feenableexcept(), 2005-03-16 19:03:46 +00:00
src Replace strong references with weak references. There's no 2005-03-07 21:27:37 +00:00
Makefile Document feenableexcept(), fedisableexcept(), and fegetexcept(). 2005-03-16 19:04:28 +00:00