aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@mips.com>2013-09-23 09:39:32 -0700
committerSteve Ellcey <sellcey@mips.com>2013-09-23 09:39:32 -0700
commit6b9a5fe450d21c5852e81f2c357d2af6d20f873c (patch)
treef693160462dae786d77d9ab75edf50a3b9c7d30e /ports
parent5b04bb073cb6e6396c53a281bc333a6094208d33 (diff)
downloadglibc-6b9a5fe450d21c5852e81f2c357d2af6d20f873c.zip
glibc-6b9a5fe450d21c5852e81f2c357d2af6d20f873c.tar.gz
glibc-6b9a5fe450d21c5852e81f2c357d2af6d20f873c.tar.bz2
2013-09-23 Steve Ellcey <sellcey@mips.com>
* sysdeps/mips/fpu/fegetround.c (fegetround): Use _FPU_RC_MASK. * sysdeps/mips/fpu/fesetround.c (fesetround): Use _FPU_RC_MASK.
Diffstat (limited to 'ports')
-rw-r--r--ports/ChangeLog.mips5
-rw-r--r--ports/sysdeps/mips/fpu/fegetround.c2
-rw-r--r--ports/sysdeps/mips/fpu/fesetround.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/ports/ChangeLog.mips b/ports/ChangeLog.mips
index 257a68c..7882f71 100644
--- a/ports/ChangeLog.mips
+++ b/ports/ChangeLog.mips
@@ -1,5 +1,10 @@
2013-09-23 Steve Ellcey <sellcey@mips.com>
+ * sysdeps/mips/fpu/fegetround.c (fegetround): Use _FPU_RC_MASK.
+ * sysdeps/mips/fpu/fesetround.c (fesetround): Use _FPU_RC_MASK.
+
+2013-09-23 Steve Ellcey <sellcey@mips.com>
+
* sysdeps/mips/fpu_control.h (_FPU_RC_MASK): New.
2013-09-23 Steve Ellcey <sellcey@mips.com>
diff --git a/ports/sysdeps/mips/fpu/fegetround.c b/ports/sysdeps/mips/fpu/fegetround.c
index 61217a7..17cd3e9 100644
--- a/ports/sysdeps/mips/fpu/fegetround.c
+++ b/ports/sysdeps/mips/fpu/fegetround.c
@@ -28,5 +28,5 @@ fegetround (void)
/* Get control word. */
_FPU_GETCW (cw);
- return cw & 0x3;
+ return cw & _FPU_RC_MASK;
}
diff --git a/ports/sysdeps/mips/fpu/fesetround.c b/ports/sysdeps/mips/fpu/fesetround.c
index 7c25f43..c6fdd66 100644
--- a/ports/sysdeps/mips/fpu/fesetround.c
+++ b/ports/sysdeps/mips/fpu/fesetround.c
@@ -25,7 +25,7 @@ fesetround (int round)
{
fpu_control_t cw;
- if ((round & ~0x3) != 0)
+ if ((round & ~_FPU_RC_MASK) != 0)
/* ROUND is no valid rounding mode. */
return 1;
@@ -33,7 +33,7 @@ fesetround (int round)
_FPU_GETCW (cw);
/* Set rounding bits. */
- cw &= ~0x3;
+ cw &= ~_FPU_RC_MASK;
cw |= round;
/* Set new state. */
_FPU_SETCW (cw);