]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make math_force_eval accept non-addressable arguments
authorAndreas Schwab <schwab@redhat.com>
Wed, 26 Oct 2011 09:19:35 +0000 (11:19 +0200)
committerAndreas Schwab <schwab@redhat.com>
Wed, 26 Oct 2011 09:44:08 +0000 (11:44 +0200)
ChangeLog
math/math_private.h
sysdeps/i386/fpu/math_private.h

index 23dab2e137856e84618fb050bd3980e535aea510..68f776611961dcc849a4ab0de217a5f6f5624ef0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-26  Andreas Schwab  <schwab@redhat.com>
+
+       * math/math_private.h (math_force_eval): Allow non-addressable
+       arguments.
+       * sysdeps/i386/fpu/math_private.h (math_force_eval): Likewise.
+
 2011-10-25  Ulrich Drepper  <drepper@gmail.com>
 
        * sysdeps/ieee754/dbl-64/e_rem_pio2.c: Comment everything out, the
index 4cb81ea41829ce65275585e5f9a2e915537addc5..04c112fd606e430d1743fe96f4ad3a4032245c02 100644 (file)
@@ -354,8 +354,9 @@ extern void __docos (double __x, double __dx, double __v[]);
 
 #ifndef math_opt_barrier
 #define math_opt_barrier(x) \
-({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; })
-#define math_force_eval(x) __asm __volatile ("" : : "m" (x))
+({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; })
+#define math_force_eval(x) \
+({ __typeof (x) __x = (x); __asm __volatile ("" : : "m" (__x)); })
 #endif
 
 
index a426788ef17a7ac95b0aeae86b9ea892c62147d9..8a51851377ba57de3ca4b322467dd69db343c3e1 100644 (file)
@@ -1,16 +1,17 @@
 #ifndef _MATH_PRIVATE_H
 
 #define math_opt_barrier(x) \
-({ __typeof(x) __x;                                    \
+({ __typeof (x) __x;                                   \
    __asm ("" : "=t" (__x) : "0" (x));                  \
    __x; })
 #define math_force_eval(x) \
 do                                                     \
   {                                                    \
+    __typeof (x) __x = (x);                            \
     if (sizeof (x) <= sizeof (double))                 \
-      __asm __volatile ("" : : "m" (x));               \
+      __asm __volatile ("" : : "m" (__x));             \
     else                                               \
-      __asm __volatile ("" : : "f" (x));               \
+      __asm __volatile ("" : : "f" (__x));             \
   }                                                    \
 while (0)