about summary refs log tree commit diff
path: root/sysdeps/aarch64
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2015-07-13 12:48:33 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2015-07-13 12:48:33 +0100
commit82641e16aa83c693974297951e23ba08a3e89652 (patch)
treec68da0ab29df51c78bb409bcfe5fab445af61047 /sysdeps/aarch64
parentc435989f52204703d524f467c830dc363439e532 (diff)
downloadglibc-82641e16aa83c693974297951e23ba08a3e89652.tar.gz
glibc-82641e16aa83c693974297951e23ba08a3e89652.tar.xz
glibc-82641e16aa83c693974297951e23ba08a3e89652.zip
Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via memory.
Diffstat (limited to 'sysdeps/aarch64')
-rw-r--r--sysdeps/aarch64/fpu/math_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h
index b3c2509961..1f02ddb05a 100644
--- a/sysdeps/aarch64/fpu/math_private.h
+++ b/sysdeps/aarch64/fpu/math_private.h
@@ -22,6 +22,11 @@
 #include <fenv.h>
 #include <fpu_control.h>
 
+#define math_opt_barrier(x) \
+({ __typeof (x) __x = (x); __asm ("" : "+w" (__x)); __x; })
+#define math_force_eval(x) \
+({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "w" (__x)); })
+
 extern __always_inline double
 __ieee754_sqrt (double d)
 {