diff options
| author | Andreas Schwab <schwab@linux-m68k.org> | 2012-03-23 13:42:08 +0100 |
|---|---|---|
| committer | Andreas Schwab <schwab@linux-m68k.org> | 2012-03-23 13:42:08 +0100 |
| commit | 3278063a823cbbc1931e5c388869a9a45dd50933 (patch) | |
| tree | 550e15a1042c850c81c4b79adabf2fc90c877e1d | |
| parent | 8b37c8a65094f273f886c9402cb70455155522bf (diff) | |
| download | glibc-3278063a823cbbc1931e5c388869a9a45dd50933.tar.xz glibc-3278063a823cbbc1931e5c388869a9a45dd50933.zip | |
m68k: prevent gcc from CSEing mathinline asms
| -rw-r--r-- | ChangeLog.m68k | 8 | ||||
| -rw-r--r-- | sysdeps/m68k/m680x0/fpu/bits/mathinline.h | 20 |
2 files changed, 19 insertions, 9 deletions
diff --git a/ChangeLog.m68k b/ChangeLog.m68k index 50a5e455da..160fb169af 100644 --- a/ChangeLog.m68k +++ b/ChangeLog.m68k @@ -1,3 +1,11 @@ +2012-03-23 Andreas Schwab <schwab@linux-m68k.org> + + * sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__inline_mathop1): + Mark asm as volatile. + (__scalbn): Likewise. + (__lrint): Likewise. + (__sincos): Likewise. + 2012-03-22 Andreas Schwab <schwab@linux-m68k.org> * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. diff --git a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h index 8d4e30a4ad..ffcc39edfd 100644 --- a/sysdeps/m68k/m680x0/fpu/bits/mathinline.h +++ b/sysdeps/m68k/m680x0/fpu/bits/mathinline.h @@ -146,7 +146,8 @@ __NTH (__signbitl (long double __x)) __m81_defun (float_type, func, (float_type __mathop_x)) \ { \ float_type __result; \ - __asm("f" __STRING(op) "%.x %1, %0" : "=f" (__result) : "f" (__mathop_x));\ + __asm __volatile__ ("f" __STRING(op) "%.x %1, %0" \ + : "=f" (__result) : "f" (__mathop_x)); \ return __result; \ } @@ -243,8 +244,8 @@ __m81_defun (int, __CONCAT(__isinf,s), (float_type __value)) \ /* There is no branch-condition for infinity, \ so we must extract and examine the condition codes manually. */ \ unsigned long int __fpsr; \ - __asm("ftst%.x %1\n" \ - "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ + __asm ("ftst%.x %1\n" \ + "fmove%.l %/fpsr, %0" : "=dm" (__fpsr) : "f" (__value)); \ return (__fpsr & (2 << 24)) ? (__fpsr & (8 << 24) ? -1 : 1) : 0; \ } \ \ @@ -262,7 +263,8 @@ __m81_defun (float_type, __CONCAT(__scalbn,s), \ (float_type __x, int __n)) \ { \ float_type __result; \ - __asm ("fscale%.l %1, %0" : "=f" (__result) : "dmi" (__n), "0" (__x)); \ + __asm __volatile__ ("fscale%.l %1, %0" : "=f" (__result) \ + : "dmi" (__n), "0" (__x)); \ return __result; \ } @@ -279,8 +281,8 @@ __inline_functions(long double,l) __m81_defun (int, __CONCAT(__isnan,s), (float_type __value)) \ { \ char __result; \ - __asm("ftst%.x %1\n" \ - "fsun %0" : "=dm" (__result) : "f" (__value)); \ + __asm ("ftst%.x %1\n" \ + "fsun %0" : "=dm" (__result) : "f" (__value)); \ return __result; \ } @@ -319,7 +321,7 @@ __m81_defun (float_type, __CONCAT(__nearbyint,s), (float_type __x)) \ __m81_defun (long int, __CONCAT(__lrint,s), (float_type __x)) \ { \ long int __result; \ - __asm ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ + __asm __volatile__ ("fmove%.l %1, %0" : "=dm" (__result) : "f" (__x)); \ return __result; \ } @@ -337,8 +339,8 @@ __m81_inline void \ __NTH (__m81_u(__CONCAT(__sincos,s))(float_type __x, float_type *__sinx, \ float_type *__cosx)) \ { \ - __asm ("fsincos%.x %2,%1:%0" \ - : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ + __asm __volatile__ ("fsincos%.x %2,%1:%0" \ + : "=f" (*__sinx), "=f" (*__cosx) : "f" (__x)); \ } __inline_functions (double,) |
