aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorChris Demetriou <cgd@google.com>2002-11-28 01:32:03 +0000
committerChris Demetriou <cgd@google.com>2002-11-28 01:32:03 +0000
commit127a77fee0ac3b6836dd272cd7a773fa12528818 (patch)
treef91bb154604f614562f4ed369179958f46c3cb73 /sim
parent6ceea2174f60d93ec7c91523a2164bdebd5f3192 (diff)
downloadgdb-127a77fee0ac3b6836dd272cd7a773fa12528818.zip
gdb-127a77fee0ac3b6836dd272cd7a773fa12528818.tar.gz
gdb-127a77fee0ac3b6836dd272cd7a773fa12528818.tar.bz2
2002-11-27 Richard Sandiford <rsandifo@redhat.com>
* sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/sim-fpu.c28
2 files changed, 5 insertions, 27 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 7aeab1e..37ded33 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2002-11-27 Richard Sandiford <rsandifo@redhat.com>
+
+ * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.
+
2002-11-22 Andrew Cagney <ac131313@redhat.com>
* dv-core.c: Update copyright. sim/common contributed to the FSF.
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 28d61a5..14505f6 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -1754,33 +1754,7 @@ INLINE_SIM_FPU (int)
sim_fpu_inv (sim_fpu *f,
const sim_fpu *r)
{
- 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;
- f->class = sim_fpu_class_qnan;
- return 0;
- }
- if (sim_fpu_is_infinity (r))
- {
- *f = sim_fpu_zero;
- f->sign = r->sign;
- return 0;
- }
- if (sim_fpu_is_zero (r))
- {
- f->class = sim_fpu_class_infinity;
- f->sign = r->sign;
- return sim_fpu_status_invalid_div0;
- }
- *f = *r;
- f->normal_exp = - r->normal_exp;
- return 0;
+ return sim_fpu_div (f, &sim_fpu_one, r);
}