From e8dbd6a36d8e4d30e736e28a364f7a4d1404079a Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Fri, 13 Oct 2017 15:44:39 -0300 Subject: powerpc: Avoid putting floating point values in memory [BZ #22189] [BZ #22189] * sysdeps/powerpc/fpu/math_private.h (math_opt_barrier): (math_force_eval): Add powerpc version. --- sysdeps/powerpc/fpu/math_private.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h index 396fd0562e..472182d297 100644 --- a/sysdeps/powerpc/fpu/math_private.h +++ b/sysdeps/powerpc/fpu/math_private.h @@ -23,6 +23,13 @@ #include #include #include + +/* Avoid putting floating point values in memory. */ +# define math_opt_barrier(x) \ + ({ __typeof (x) __x = (x); __asm ("" : "+dwa" (__x)); __x; }) +# define math_force_eval(x) \ + ({ __typeof (x) __x = (x); __asm __volatile__ ("" : : "dwa" (__x)); }) + #include_next #if defined _ARCH_PWR9 && __HAVE_DISTINCT_FLOAT128 -- cgit v1.2.3