mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-02 09:40:13 +00:00
b26901b26e
It turns out the __SSE2_MATH__ conditional in sysdeps/x86/fpu/s_ffma.c does not cover all cases where the x86 fenv_private.h macros might manipulate one of the SSE and 387 floating-point state, while the actual fma implementation uses the other. Specifically, in the 32-bit case, with a compiler not defaulting to -mfpmath=sse, but testing on a processor with hardware FMA support, the multiarch fma function implementations will end up using SSE, while the fenv_private.h macros will use the 387 state for double. Change the conditional to use the default macros rather than the optimized ones in all cases except when the compiler inlines an fma instruction (in which case, since all those instructions are SSE instructions and -mfpmath=sse must be in effect for them to be inlined, the optimized macros will only use the SSE state and it's OK for them to only use the SSE state). Tested for x86_64 and x86. H.J. reports in <https://sourceware.org/pipermail/libc-alpha/2021-September/131367.html> that it fixes the problems he observed. |
||
---|---|---|
.. | ||
bits | ||
finclude | ||
e_sqrtf128.c | ||
e_sqrtl.c | ||
fenv_private.h | ||
fix-fp-int-compare-invalid.h | ||
Makefile | ||
math_private.h | ||
math-barriers.h | ||
nan-pseudo-number.h | ||
powl_helper.c | ||
s_ffma.c | ||
s_fpclassifyl.c | ||
s_isnanl.c | ||
s_sincosf_data.c | ||
sfp-machine.h | ||
sincosf_poly.h | ||
test-fenv-clear-sse.c | ||
test-fenv-sse-2.c | ||
test-fenv-sse.c | ||
test-fenv-x87.c | ||
test-flt-eval-method-387.c | ||
test-flt-eval-method-sse.c | ||
test-math-vector-sincos.h |