diff options
author | das <das@FreeBSD.org> | 2005-01-14 07:09:23 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2005-01-14 07:09:23 +0000 |
commit | 4ec986eab3914668211673027bf0160845519a35 (patch) | |
tree | 778e40f1835a14db783dd55f64577070b85926a2 /lib/msun/i387 | |
parent | 8ea9839385621bf0b58f6ced08f73292c00d97d5 (diff) | |
download | FreeBSD-src-4ec986eab3914668211673027bf0160845519a35.zip FreeBSD-src-4ec986eab3914668211673027bf0160845519a35.tar.gz |
Mark all inline asms that read the floating-point control or status
registers as volatile. Instructions that *wrote* to FP state were
already marked volatile, but apparently gcc has license to move
non-volatile asms past volatile asms. This broke amd64's feupdateenv
at -O2 due to a WAR conflict between fnstsw and fldenv there.
Diffstat (limited to 'lib/msun/i387')
-rw-r--r-- | lib/msun/i387/fenv.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/msun/i387/fenv.h b/lib/msun/i387/fenv.h index 6989c05..27cd416 100644 --- a/lib/msun/i387/fenv.h +++ b/lib/msun/i387/fenv.h @@ -68,9 +68,9 @@ extern const fenv_t __fe_dfl_env; #define __fldcw(__cw) __asm __volatile("fldcw %0" : : "m" (__cw)) #define __fldenv(__env) __asm __volatile("fldenv %0" : : "m" (__env)) #define __fnclex() __asm __volatile("fnclex") -#define __fnstenv(__env) __asm("fnstenv %0" : "=m" (*(__env))) -#define __fnstcw(__cw) __asm("fnstcw %0" : "=m" (*(__cw))) -#define __fnstsw(__sw) __asm("fnstsw %0" : "=am" (*(__sw))) +#define __fnstenv(__env) __asm __volatile("fnstenv %0" : "=m" (*(__env))) +#define __fnstcw(__cw) __asm __volatile("fnstcw %0" : "=m" (*(__cw))) +#define __fnstsw(__sw) __asm __volatile("fnstsw %0" : "=am" (*(__sw))) #define __fwait() __asm __volatile("fwait") static __inline int |