2002-11-27 Richard Sandiford <rsandifo@redhat.com>
authorChris Demetriou <cgd@google.com>
Thu, 28 Nov 2002 01:32:03 +0000 (01:32 +0000)
committerChris Demetriou <cgd@google.com>
Thu, 28 Nov 2002 01:32:03 +0000 (01:32 +0000)
        * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div.

sim/common/ChangeLog
sim/common/sim-fpu.c

index 7aeab1e1c8a0b14cc77839c654fba68ba4015c9b..37ded334d89990610f65e4b7db479e5f1b0fee8e 100644 (file)
@@ -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.
index 28d61a565fedbf06423d0f1bcd92e926fa72df9d..14505f64c4b9cfe1d005dca9233679b350e0eaf6 100644 (file)
@@ -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);
 }