History log of /freebsd-9.3-release/lib/msun/i387/fenv.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 229841 09-Jan-2012 das

MFC r226594:
Bugfix: feenableexcept() and fedisableexcept() should just return the
old exception mask, not mask | ~FE_ALL_EXCEPT.


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 203441 03-Feb-2010 kib

Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an
argument for fnstsw. Explicitely specify sizes for the XMM control and
status word and X87 control and status words.

Reviewed by: das
Tested by: avg
MFC after: 2 weeks


# 165795 05-Jan-2007 das

Remove an unneeded fnstcw instruction.

Noticed by: bde


# 143769 17-Mar-2005 das

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.


# 130144 06-Jun-2004 das

Add an fenv.h implementation for the i386 port.

Reviewed by: standards@