aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-07-08 18:46:23 +0000
committerIan Lance Taylor <ian@airs.com>2005-07-08 18:46:23 +0000
commitefd3631498cf717a4c28b0a4ad73f33d3cb66a28 (patch)
tree10e7e7976bfeed1bd362083266275c3e2b5a874f /sim/common
parent21d1489665b10f619ad5e1a34811ee5b5a1fab9b (diff)
downloadgdb-efd3631498cf717a4c28b0a4ad73f33d3cb66a28.zip
gdb-efd3631498cf717a4c28b0a4ad73f33d3cb66a28.tar.gz
gdb-efd3631498cf717a4c28b0a4ad73f33d3cb66a28.tar.bz2
* sim-fpu.c (sim_fpu_abs): Always clear the sign bit.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog2
-rw-r--r--sim/common/sim-fpu.c10
2 files changed, 4 insertions, 8 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index c2ef9e0..54303c4 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,7 @@
2005-07-08 Ian Lance Taylor <ian@airs.com>
+ * sim-fpu.c (sim_fpu_abs): Always clear the sign bit.
+
* sim-fpu.c (pack_fpu): If SIM_QUIET_NAN_NEGATED is defined, use a
different fraction for a quiet NaN.
(unpack_fpu): Likewise.
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index c9678bd..d7d8600 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -1744,19 +1744,13 @@ INLINE_SIM_FPU (int)
sim_fpu_abs (sim_fpu *f,
const sim_fpu *r)
{
+ *f = *r;
+ f->sign = 0;
if (sim_fpu_is_snan (r))
{
- *f = *r;
f->class = sim_fpu_class_qnan;
return sim_fpu_status_invalid_snan;
}
- if (sim_fpu_is_qnan (r))
- {
- *f = *r;
- return 0;
- }
- *f = *r;
- f->sign = 0;
return 0;
}