diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2007-03-05 10:42:36 +0300 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2007-03-05 10:42:36 +0300 |
commit | 5643b1ee8651e14b7f35e960040273c6891b7058 (patch) | |
tree | 2dc07038ceb145870d7246dfa5244a840fb997a2 /winsup | |
parent | 788e7da136e19ec6e3e5d40872eb728677f9a4cc (diff) |
* mingwex/fesetround.c (fesetround): Use unsigned int as operand
to stmxcsr.
Thanks to Alexey Kuznetsov <ring0_mipt at users dot sf dot net>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/mingw/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/mingw/mingwex/fesetround.c | 9 |
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; |