From: cgd@broadcom.com
To: rsandifo@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Simulation of MIPS recip and rsqrt instructions
Date: Tue, 26 Nov 2002 12:42:00 -0000 [thread overview]
Message-ID: <yov5smxo2hc1.fsf@broadcom.com> (raw)
In-Reply-To: rsandifo@redhat.com's message of "Tue, 26 Nov 2002 19:42:02 +0000 (UTC)"
At Tue, 26 Nov 2002 19:42:02 +0000 (UTC), "Richard Sandiford" wrote:
> The mips simulator uses sim_fpu_inv() as a reciprocal function
> but all it really does is negate the exponent. So we end up
> calculating 1 / (x*2^y) as x*2^-y.
This would appear to be my bad:
In adding those calls to sim_fpu_inv() I did not notice the changes to
sim_fpu_inv() in our source which replace its entire body with:
#if 0
... old body ...
#else
const sim_fpu sim_fpu_one = {
sim_fpu_class_number, 0, IMPLICIT_1, 0
};
return sim_fpu_div (f, &sim_fpu_one, r, sim_fpu_round_default);
#endif
8-)
> Unfortunately, sim_fpu_inv isn't commented and cp1.c seems to be
> its only active user. Which should change?
For small values of only. 8-)
common/cgen-accfp.c seems to use it as well for "invsf" and "invdf".
I don't know whether the code in cgen-accfp.c is correct given the
current definition of sim_fpu_inv(). I'd guess not.
(The 'cgen/doc' information about "inv" that i could find ... makes me
think the documentation there isn't complete. Certainly, it doesn't
seem to match the sim-fpu.h code either...)
My personal preference would be to fix sim_fpu_inv(). it seems more
sensible to me.
Anybody got a clue as to what the cgen-accfp.c 'invsf' and 'invdf' fns
are supposed to do?
chris
next prev parent reply other threads:[~2002-11-26 20:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 11:41 Richard Sandiford
2002-11-26 12:12 ` Andrew Cagney
2002-11-26 12:38 ` Richard Sandiford
[not found] ` <mailpost.1038339722.6479@news-sj1-1>
2002-11-26 12:42 ` cgd [this message]
2002-11-27 0:12 ` Richard Sandiford
[not found] ` <mailpost.1038384740.26359@news-sj1-1>
2002-11-27 17:33 ` cgd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yov5smxo2hc1.fsf@broadcom.com \
--to=cgd@broadcom.com \
--cc=gdb-patches@sources.redhat.com \
--cc=rsandifo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox