summaryrefslogtreecommitdiff
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
commita4ea411925e19ef24d77a14ecf2b3efa53f91dcc (patch)
treee0765e29ffffa5e2ab3d96905ec260987f302f55 /sim
parent4ec11e05353e8875675b5ee993b56f65bd58fda9 (diff)
downloadgdb-a4ea411925e19ef24d77a14ecf2b3efa53f91dcc.tar.gz
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 7aeab1e1c8a..37ded334d89 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 28d61a565fe..14505f64c4b 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);
}