This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/17907] New: fma modifies and does not reset SSE rounding mode on 32bit machines
- From: "simonbyrne at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 30 Jan 2015 11:59:41 +0000
- Subject: [Bug math/17907] New: fma modifies and does not reset SSE rounding mode on 32bit machines
- Auto-submitted: auto-generated
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.