summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mingwex/fesetround.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/mingw/mingwex/fesetround.c')
-rw-r--r--winsup/mingw/mingwex/fesetround.c9
1 files changed, 5 insertions, 4 deletions
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;