]> sourceware.org Git - glibc.git/commitdiff
powerpc: Avoid putting floating point values in memory [BZ #22189]
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 13 Oct 2017 18:44:39 +0000 (15:44 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Fri, 13 Oct 2017 18:44:39 +0000 (15:44 -0300)
[BZ #22189]
* sysdeps/powerpc/fpu/math_private.h (math_opt_barrier):
(math_force_eval): Add powerpc version.

ChangeLog
sysdeps/powerpc/fpu/math_private.h

index 500d1046521b2d09c4a1c5035691b9cad3c45fcc..4cc53012b286aaa098b4ac68bc6897f71f95f114 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-10-13  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
 
+       [BZ #22189]
+       * sysdeps/powerpc/fpu/math_private.h (math_opt_barrier):
+       (math_force_eval): Add powerpc version.
+
        [BZ #22142]
        * stdio-common/tst-printf.c (fp_test): Add tests for DBL_MAX and
        -DBL_MAX.
index 396fd0562eda2f64bc5858a8e90b94cf5028f28b..472182d2977ce3349bcbdd12a3d7dd4e6aa51d6c 100644 (file)
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
 #include <fenv_private.h>
+
+/* 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 <math_private.h>
 
 #if defined _ARCH_PWR9 && __HAVE_DISTINCT_FLOAT128
This page took 0.069782 seconds and 5 git commands to generate.