From: Daniel Jacobowitz <drow@false.org>
To: Ian Lance Taylor <ian@airs.com>
Cc: gdb-patches@sourceware.org
Subject: Re: PATCH RFA: Fix simulator handling of floating point absolute value
Date: Fri, 08 Jul 2005 18:44:00 -0000 [thread overview]
Message-ID: <20050708184420.GA26128@nevyn.them.org> (raw)
In-Reply-To: <m3eka9uqy8.fsf@gossamer.airs.com>
On Fri, Jul 08, 2005 at 10:51:11AM -0700, Ian Lance Taylor wrote:
> > I have no references for this concern, but could you check that this
> > change is appropriate for at least MN10300 and SH64, since they share
> > ths code?
>
> I think I'll need a little help to fully satisfy this request. The
> issue is how the fabs instruction on the MN10300 and SH handle NaNs.
> This is something that can only be determined via a detailed processor
> manual or by testing on real hardware.
>
> The manual for the SH4a is, fortunately, clear: the fabs instruction
> is described as "FRn & H'7FFF FFFF -> FRn." So for the SH4a, at
> least, my proposed patch is correct.
>
> I found a processor manual for the MN10300 AM33 on the web, but all it
> says about the fabs instruction is "This takes an absolute value of
> the register (FSm), and stores the result in the register (FSn)."
>
> A hardware designer implementing the floating point absolute
> instruction has a choice. He or she can implement a simple
> instruction which clears the sign bit. Or he or she can implement an
> instruction which checks for NaN input, and, in that case, does not
> clear the sign bit. Since sim-fpu.c is intended to be for generic
> use, I think it is reasonable to bet on the simple implementation, and
> force a simulator for a processor which takes the complex
> implementation to do something different. Especially since it is
> correct for at least two out of three processors.
That's good enough for me; thank you, Ian. Patch is OK.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-07-08 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-08 5:19 Ian Lance Taylor
2005-07-08 14:03 ` Daniel Jacobowitz
2005-07-08 17:51 ` Ian Lance Taylor
2005-07-08 18:44 ` Daniel Jacobowitz [this message]
2005-07-08 15:38 ` Frank Ch. Eigler
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=20050708184420.GA26128@nevyn.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=ian@airs.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