diff options
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu/s_round.S')
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_round.S | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_round.S b/sysdeps/powerpc/powerpc64/fpu/s_round.S index 022be84a28..3c7437a8f4 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_round.S @@ -25,13 +25,13 @@ .LC1: /* 0.5 */ .tc FD_3fe00000_0[TC],0x3fe0000000000000 .section ".text" - + /* double [fp1] round (double x [fp1]) - IEEE 1003.1 round function. IEEE specifies "round to the nearest + IEEE 1003.1 round function. IEEE specifies "round to the nearest integer value, rounding halfway cases away from zero, regardless of the current rounding mode." However PowerPC Architecture defines - "Round to Nearest" as "Choose the best approximation. In case of a - tie, choose the one that is even (least significant bit o).". + "Round to Nearest" as "Choose the best approximation. In case of a + tie, choose the one that is even (least significant bit o).". So we can't use the PowerPC "Round to Nearest" mode. Instead we set "Round toward Zero" mode and round by adding +-0.5 before rounding to the integer value. */ @@ -63,7 +63,7 @@ EALIGN (__round, 4, 0) fnabs fp1,fp1 /* if (x == 0.0) */ /* x = -0.0; */ .L9: - mtfsf 0x01,fp11 /* restore previous rounding mode. */ + mtfsf 0x01,fp11 /* restore previous rounding mode. */ blr END (__round) |