x86-64 math definitions.
authordrepper <drepper>
Mon, 16 Apr 2007 20:37:41 +0000 (20:37 +0000)
committerdrepper <drepper>
Mon, 16 Apr 2007 20:37:41 +0000 (20:37 +0000)
sysdeps/x86_64/fpu/math_private.h [new file with mode: 0644]

diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
new file mode 100644 (file)
index 0000000..4febcbb
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _MATH_PRIVATE_H
+
+#define math_opt_barrier(x) \
+({ __typeof(x) __x;                                    \
+   if (sizeof (x) <= sizeof (double))                  \
+     __asm ("" : "=x" (__x) : "0" (x));                        \
+   else                                                        \
+     __asm ("" : "=t" (__x) : "0" (x));                        \
+   __x; })
+#define math_force_eval(x) \
+do                                                     \
+  {                                                    \
+    if (sizeof (x) <= sizeof (double))                 \
+      __asm __volatile ("" : : "x" (x));               \
+    else                                               \
+      __asm __volatile ("" : : "f" (x));               \
+  }                                                    \
+while (0)
+
+#include <math/math_private.h>
+#endif