about summary refs log tree commit diff
path: root/sysdeps/x86_64/fpu/math_private.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-03-09 12:38:23 -0800
committerRichard Henderson <rth@twiddle.net>2012-03-19 06:47:43 -0700
commit4851a949b4cd1f280b56a728c784aaa85e51124c (patch)
tree331199de9e22e6be357e697a035fb255d89f62e3 /sysdeps/x86_64/fpu/math_private.h
parente79d442ee64ef2426ddd29a1fe1174108e845b69 (diff)
downloadglibc-4851a949b4cd1f280b56a728c784aaa85e51124c.tar.gz
glibc-4851a949b4cd1f280b56a728c784aaa85e51124c.tar.xz
glibc-4851a949b4cd1f280b56a728c784aaa85e51124c.zip
Make inline __isnan, __isinf_ns, __finite generic.
For code generation to stay identical on x86_64, this requires that
we define the fp word manipulation macros before including the
generic header.
Diffstat (limited to 'sysdeps/x86_64/fpu/math_private.h')
-rw-r--r--sysdeps/x86_64/fpu/math_private.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
index c8616f654a..dae9ccca68 100644
--- a/sysdeps/x86_64/fpu/math_private.h
+++ b/sysdeps/x86_64/fpu/math_private.h
@@ -16,8 +16,6 @@
       __asm __volatile ("" : : "f" (x));				      \
   } while (0)
 
-#include_next <math_private.h>
-
 /* We can do a few things better on x86-64.  */
 
 #if defined __AVX__ || defined SSE2AVX
@@ -31,7 +29,6 @@
 #endif
 
 /* Direct movement of float into integer register.  */
-#undef EXTRACT_WORDS64
 #define EXTRACT_WORDS64(i, d)						      \
   do {									      \
     long int i_;							      \
@@ -40,7 +37,6 @@
   } while (0)
 
 /* And the reverse.  */
-#undef INSERT_WORDS64
 #define INSERT_WORDS64(d, i) \
   do {									      \
     long int i_ = i;							      \
@@ -50,7 +46,6 @@
   } while (0)
 
 /* Direct movement of float into integer register.  */
-#undef GET_FLOAT_WORD
 #define GET_FLOAT_WORD(i, d) \
   do {									      \
     int i_;								      \
@@ -59,7 +54,6 @@
   } while (0)
 
 /* And the reverse.  */
-#undef SET_FLOAT_WORD
 #define SET_FLOAT_WORD(f, i) \
   do {									      \
     int i_ = i;								      \
@@ -68,27 +62,7 @@
     f = f__;								      \
   } while (0)
 
-
-#define __isnan(d) \
-  ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d));		      \
-     (__di & 0x7fffffffffffffffl) > 0x7ff0000000000000l; })
-#define __isnanf(d) \
-  ({ int __di; GET_FLOAT_WORD (__di, (float) d);			      \
-     (__di & 0x7fffffff) > 0x7f800000; })
-
-#define __isinf_ns(d) \
-  ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d));		      \
-     (__di & 0x7fffffffffffffffl) == 0x7ff0000000000000l; })
-#define __isinf_nsf(d) \
-  ({ int __di; GET_FLOAT_WORD (__di, (float) d);			      \
-     (__di & 0x7fffffff) == 0x7f800000; })
-
-#define __finite(d) \
-  ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d));		      \
-     (__di & 0x7fffffffffffffffl) < 0x7ff0000000000000l; })
-#define __finitef(d) \
-  ({ int __di; GET_FLOAT_WORD (__di, (float) d);			      \
-     (__di & 0x7fffffff) < 0x7f800000; })
+#include_next <math_private.h>
 
 extern __always_inline double
 __ieee754_sqrt (double d)