From 4a28b3ca4bc52d9a3ac0d9edb53d3de510e1b77c Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Sat, 17 Aug 2013 18:28:55 +0930 Subject: 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. --- sysdeps/powerpc/fpu/feenablxcpt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sysdeps/powerpc/fpu/feenablxcpt.c') diff --git a/sysdeps/powerpc/fpu/feenablxcpt.c b/sysdeps/powerpc/fpu/feenablxcpt.c index fc4bfff..472796d 100644 --- a/sysdeps/powerpc/fpu/feenablxcpt.c +++ b/sysdeps/powerpc/fpu/feenablxcpt.c @@ -32,15 +32,15 @@ feenableexcept (int excepts) fe.fenv = fegetenv_register (); if (excepts & FE_INEXACT) - fe.l[1] |= (1 << (31 - FPSCR_XE)); + fe.l |= (1 << (31 - FPSCR_XE)); if (excepts & FE_DIVBYZERO) - fe.l[1] |= (1 << (31 - FPSCR_ZE)); + fe.l |= (1 << (31 - FPSCR_ZE)); if (excepts & FE_UNDERFLOW) - fe.l[1] |= (1 << (31 - FPSCR_UE)); + fe.l |= (1 << (31 - FPSCR_UE)); if (excepts & FE_OVERFLOW) - fe.l[1] |= (1 << (31 - FPSCR_OE)); + fe.l |= (1 << (31 - FPSCR_OE)); if (excepts & FE_INVALID) - fe.l[1] |= (1 << (31 - FPSCR_VE)); + fe.l |= (1 << (31 - FPSCR_VE)); fesetenv_register (fe.fenv); new = __fegetexcept (); -- cgit v1.1