From: Chris Demetriou Date: Thu, 28 Nov 2002 01:32:03 +0000 (+0000) Subject: 2002-11-27 Richard Sandiford X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=127a77fee0ac3b6836dd272cd7a773fa12528818;p=binutils-gdb.git 2002-11-27 Richard Sandiford * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div. --- 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 + + * sim-fpu.c (sim_fpu_inv): Use sim_fpu_div. + 2002-11-22 Andrew Cagney * 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); }