9233b45ad9
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. |
||
---|---|---|
.. | ||
e_exp.S | ||
e_fmod.S | ||
e_log10.S | ||
e_log10f.S | ||
e_log.S | ||
e_logf.S | ||
e_remainder.S | ||
e_remainderf.S | ||
e_scalb.S | ||
e_scalbf.S | ||
e_sqrt.S | ||
e_sqrtf.S | ||
fenv.c | ||
fenv.h | ||
Makefile.inc | ||
s_ceil.S | ||
s_ceilf.S | ||
s_copysign.S | ||
s_copysignf.S | ||
s_cos.S | ||
s_finite.S | ||
s_floor.S | ||
s_floorf.S | ||
s_llrint.S | ||
s_logb.S | ||
s_logbf.S | ||
s_lrint.S | ||
s_rint.S | ||
s_rintf.S | ||
s_scalbn.S | ||
s_scalbnf.S | ||
s_scalbnl.S | ||
s_significand.S | ||
s_significandf.S | ||
s_sin.S | ||
s_tan.S |