Red Hat Bugzilla – Bug 86167
fesetround() does not set SSE floating-point rounding modes
Last modified: 2016-11-24 10:03:15 EST
Description of problem:
fesetround() does not set SSE rounding modes, even though gcc now has options to
compile floating-point code to SSE.
(Checked in glibc source code.)
Version-Release number of selected component (if applicable): 2.2.93
Steps to Reproduce:
1.Write code using fesetround() and whose results depends on the correct
rounding mode being set.
2.Compile with or without -march=pentium4 -msse -msse2
3.Compare the results.
The rounding mode is not set.
The rounding mode should be set.
Reported to glibc gnats as bug libc/4987.
Fix: use stmxcsr/ldmxcsr.
I've checked in a patch in the official glibc CVS archive. They should appear
in the next RPM.