From: Wilco Dijkstra Date: Mon, 13 Jul 2015 11:48:33 +0000 (+0100) Subject: Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via... X-Git-Tag: glibc-2.22~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82641e16aa83c693974297951e23ba08a3e89652;p=thirdparty%2Fglibc.git Add AArch64 versions of math_opt_barrier and math_force_eval that avoid going via memory. --- diff --git a/ChangeLog b/ChangeLog index df8c19eeab7..dfef5e0f608 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2015-04-01 Wilco Dijkstra + + * sysdeps/aarch64/fpu/math_private.h + (define math_opt_barrier): Add AArch64 version. + (math_force_eval): Likewise. + 2015-07-13 Wilco Dijkstra * sysdeps/aarch64/strlen.S (strlen): Optimize strlen. diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index b3c2509961c..1f02ddb05ae 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -22,6 +22,11 @@ #include #include +#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) {