summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/mingwex/fesetround.c9
2 files changed, 11 insertions, 4 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index 5e8c29308..bd261c7ab 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-05 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * mingwex/fesetround.c (fesetround): Use unsigned int as operand
+ to stmxcsr.
+ Thanks to Alexey Kuznetsov <ring0_mipt at users dot sf dot net>
+
2007-02-27 Thorsten Dahlheimer <tdahlheim@gmx.net>
* include/stdio.h (_unlink, unlink): Add prototypes.
diff --git a/winsup/mingw/mingwex/fesetround.c b/winsup/mingw/mingwex/fesetround.c
index e90dbb4e7..f14e6a631 100644
--- a/winsup/mingw/mingwex/fesetround.c
+++ b/winsup/mingw/mingwex/fesetround.c
@@ -20,10 +20,11 @@ int fesetround (int mode)
if (__HAS_SSE)
{
- __asm__ volatile ("stmxcsr %0" : "=m" (_cw));
- _cw &= ~ 0x6000;
- _cw |= (mode << __MXCSR_ROUND_FLAG_SHIFT);
- __asm__ volatile ("ldmxcsr %0" : : "m" (_cw));
+ unsigned int _mxcsr;
+ __asm__ volatile ("stmxcsr %0" : "=m" (_mxcsr));
+ _mxcsr &= ~ 0x6000;
+ _mxcsr |= (mode << __MXCSR_ROUND_FLAG_SHIFT);
+ __asm__ volatile ("ldmxcsr %0" : : "m" (_mxcsr));
}
return 0;