summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S')
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
index 041dfeb46e..3ba53784a4 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
+++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
@@ -1,5 +1,5 @@
/* Round to int floating-point values. PowerPC64 version.
- Copyright (C) 2011-2015 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
@@ -41,19 +41,21 @@ EALIGN (__nearbyintf, 4, 0)
fsubs fp12,fp13,fp13 /* generate 0.0 */
fcmpu cr7,fp1,fp12 /* if (x > 0.0) */
ble cr7, L(lessthanzero)
+ mffs fp11
mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
fadds fp1,fp1,fp13 /* x += TWO23 */
fsubs fp1,fp1,fp13 /* x -= TWO23 */
fabs fp1,fp1 /* if (x == 0.0) */
- mtfsb0 4*cr1+eq /* Clear pending FE_INEXACT exception */
+ mtfsf 0xff,fp11 /* Restore FE_INEXACT state. */
blr /* x = 0.0; */
L(lessthanzero):
bgelr cr7 /* if (x < 0.0) */
+ mffs fp11
mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
fsubs fp1,fp1,fp13 /* x -= TWO23 */
fadds fp1,fp1,fp13 /* x += TWO23 */
fnabs fp1,fp1 /* if (x == 0.0) */
- mtfsb0 4*cr1+eq /* Clear pending FE_INEXACT exception */
+ mtfsf 0xff,fp11 /* Restore FE_INEXACT state. */
blr /* x = -0.0; */
END (__nearbyintf)