diff options
author | Anton Blanchard <anton@au1.ibm.com> | 2013-08-17 18:28:55 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-10-04 10:34:26 +0930 |
commit | 4a28b3ca4bc52d9a3ac0d9edb53d3de510e1b77c (patch) | |
tree | b8a0550a21b55b508601d29a0615124be7354760 /sysdeps/powerpc/fpu/fraiseexcpt.c | |
parent | 2ca85d2bbbaa60b9c83bf1f57a2801c84e0a3625 (diff) | |
download | glibc-4a28b3ca4bc52d9a3ac0d9edb53d3de510e1b77c.tar.gz |
PowerPC floating point little-endian [8 of 15]
http://sourceware.org/ml/libc-alpha/2013-07/msg00199.html
Corrects floating-point environment code for little-endian.
* sysdeps/powerpc/fpu/fenv_libc.h (fenv_union_t): Replace int
array with long long.
* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Adjust.
* sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Adjust.
* sysdeps/powerpc/fpu/fclrexcpt.c (__feclearexcept): Adjust.
* sysdeps/powerpc/fpu/fedisblxcpt.c (fedisableexcept): Adjust.
* sysdeps/powerpc/fpu/feenablxcpt.c (feenableexcept): Adjust.
* sysdeps/powerpc/fpu/fegetexcept.c (__fegetexcept): Adjust.
* sysdeps/powerpc/fpu/feholdexcpt.c (feholdexcept): Adjust.
* sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Adjust.
* sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Adjust.
* sysdeps/powerpc/fpu/fgetexcptflg.c (__fegetexceptflag): Adjust.
* sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Adjust.
* sysdeps/powerpc/fpu/fsetexcptflg.c (__fesetexceptflag): Adjust.
* sysdeps/powerpc/fpu/ftestexcept.c (fetestexcept): Adjust.
Diffstat (limited to 'sysdeps/powerpc/fpu/fraiseexcpt.c')
-rw-r--r-- | sysdeps/powerpc/fpu/fraiseexcpt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/powerpc/fpu/fraiseexcpt.c b/sysdeps/powerpc/fpu/fraiseexcpt.c index 9118c1954a..6193071bd4 100644 --- a/sysdeps/powerpc/fpu/fraiseexcpt.c +++ b/sysdeps/powerpc/fpu/fraiseexcpt.c @@ -33,11 +33,11 @@ __feraiseexcept (int excepts) u.fenv = fegetenv_register (); /* Add the exceptions */ - u.l[1] = (u.l[1] - | (excepts & FPSCR_STICKY_BITS) - /* Turn FE_INVALID into FE_INVALID_SOFTWARE. */ - | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT)) - & FE_INVALID_SOFTWARE)); + u.l = (u.l + | (excepts & FPSCR_STICKY_BITS) + /* Turn FE_INVALID into FE_INVALID_SOFTWARE. */ + | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT)) + & FE_INVALID_SOFTWARE)); /* Store the new status word (along with the rest of the environment), triggering any appropriate exceptions. */ @@ -49,7 +49,7 @@ __feraiseexcept (int excepts) don't have FE_INVALID_SOFTWARE implemented. Detect this case and raise FE_INVALID_SNAN instead. */ u.fenv = fegetenv_register (); - if ((u.l[1] & FE_INVALID) == 0) + if ((u.l & FE_INVALID) == 0) set_fpscr_bit (FPSCR_VXSNAN); } |