[Bug math/17907] New: fma modifies and does not reset SSE rounding mode on 32bit machines
simonbyrne at gmail dot com
sourceware-bugzilla@sourceware.org
Fri Jan 30 11:59:00 GMT 2015
https://sourceware.org/bugzilla/show_bug.cgi?id=17907
Bug ID: 17907
Summary: fma modifies and does not reset SSE rounding mode on
32bit machines
Product: glibc
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: math
Assignee: unassigned at sourceware dot org
Reporter: simonbyrne at gmail dot com
Created attachment 8091
--> https://sourceware.org/bugzilla/attachment.cgi?id=8091&action=edit
fma rounding mode test function
The software fma function modifies the rounding mode for SSE floating point
instructions (to round-toward-zero), but does not reset it correctly, on 32bit
(686) processors. The x87 rounding mode is unaffected.
Attached is a sample program: compile on a 32bit machine with gcc:
$ gcc fmacheck.c -o fmacheck -lm -msse2 -mfpmath=sse
or clang:
$ clang fmacheck.c -o fmacheck -lm
When run as
$ ./fmacheck 0x1.0000000000001p+0
it should give
0x1.ffffffffffffep-1
if rounding mode is the default (round-to-nearest). If the rounding mode has
been incorrectly modified to be round-toward-zero, then you will get
0x1.ffffffffffffdp-1
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list