diff options
author | Paul A. Clarke <pc@us.ibm.com> | 2019-09-19 09:13:14 -0500 |
---|---|---|
committer | Paul A. Clarke <pc@us.ibm.com> | 2019-09-27 08:48:56 -0500 |
commit | e3d85df50b083c9ba68a40f5d45b201cbec4e68b (patch) | |
tree | f56af21b923f1dcbd3a04137808c01643a2c9b68 /sysdeps/powerpc/fpu/feholdexcpt.c | |
parent | 9a44050e745685c1e703b4402ef3df855ef6de80 (diff) | |
download | glibc-e3d85df50b083c9ba68a40f5d45b201cbec4e68b.zip glibc-e3d85df50b083c9ba68a40f5d45b201cbec4e68b.tar.gz glibc-e3d85df50b083c9ba68a40f5d45b201cbec4e68b.tar.bz2 |
[powerpc] fenv_private.h clean up
fenv_private.h includes unused functions, magic macro constants, and
some replicated common code fragments.
Remove unused functions, replace magic constants with constants from
fenv_libc.h, and refactor replicated code.
Suggested-by: Paul E. Murphy <murphyp@linux.ibm.com>
Reviewed-By: Paul E Murphy <murphyp@linux.ibm.com>
Diffstat (limited to 'sysdeps/powerpc/fpu/feholdexcpt.c')
-rw-r--r-- | sysdeps/powerpc/fpu/feholdexcpt.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sysdeps/powerpc/fpu/feholdexcpt.c b/sysdeps/powerpc/fpu/feholdexcpt.c index 2939d64..bcd09f6 100644 --- a/sysdeps/powerpc/fpu/feholdexcpt.c +++ b/sysdeps/powerpc/fpu/feholdexcpt.c @@ -18,7 +18,6 @@ #include <fenv_libc.h> #include <fpu_control.h> -#define _FPU_MASK_ALL (_FPU_MASK_ZM | _FPU_MASK_OM | _FPU_MASK_UM | _FPU_MASK_XM | _FPU_MASK_IM) int __feholdexcept (fenv_t *envp) @@ -35,11 +34,7 @@ __feholdexcept (fenv_t *envp) if (new.l == old.l) return 0; - /* If the old env had any enabled exceptions, then mask SIGFPE in the - MSR FE0/FE1 bits. This may allow the FPU to run faster because it - always takes the default action and can not generate SIGFPE. */ - if ((old.l & _FPU_MASK_ALL) != 0) - (void)__fe_mask_env (); + __TEST_AND_ENTER_NON_STOP (old.l, 0ULL); /* Put the new state in effect. */ fesetenv_register (new.fenv); |