From: Geert Bosch <bosch@adacore.com>
To: Richard Sandiford <rsandifo@nildram.co.uk>
Cc: Olivier Hainque <hainque@adacore.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] define WIDEST_HARDWARE_FP_SIZE on mips
Date: Wed, 10 Oct 2007 17:08:00 -0000 [thread overview]
Message-ID: <7C2C6C26-1CF3-4304-B9E3-A33DA1C7B2C6@adacore.com> (raw)
In-Reply-To: <87ve9ff96r.fsf@firetop.home>
On Oct 10, 2007, at 08:25, Richard Sandiford wrote:
> Your reply seems to be about why it's useful to have a macro that
> provides the widest efficient floating-point type. For avoidance
> of doubt, I can certainly appreciate that such a thing is useful.
> I'm just not sure why it's needed for correctness. Olivier said:
...
> I was trying to understand why the runtime library raises a constraint
> error. Is it simply that the library only supports software floating
> point for single and double precision (but supports hardware floating
> point for wider types)? Is it not possible to construct a version
> of the
> Ada test above that forces the use of the equivalent of C "long
> double"?
> If so, would that fail in the same way, or don't we care?
As I'm travelling tomorrow, and don't have easy access to
a MIPS system right now, I won't have enough time
today to debug this issue in detail before next week.
There's one of two possibilities:
- the GNAT run time doesn't handle 128-bit float properly
- the 128-bit float doesn't have sane numerical semantics
As we haven't yet ported GNAT to a system with 128-bit hardware
floating point, it is very possible that some adaptations are
necessary. In fact, that's certainly the case.
>> From a MIPS perspective, it's also counterintuitive for
> WIDEST_HARDWARE_FP_SIZE to be 64 even for -msingle-float
> and -msoft-float targets (rather than 32 and 0 respectively).
> I can understand that 0 and 32 would be wrong given the way
> the macro is used in ada/targtyps.c, but it seems that Ada is
> using this macro for correctness -- and even to control an aspect
> of the API and ABI -- whereas libgcc2.c is using it for optimisation.
I definitely would be reasonable to set this to 32 and 0
for -msingle-float and -msoft-float targets. Yes, that would
mean we'd have to change targtypes.c, but that's fine.
Especially with -msingle-float this would seem a clear improvement.
> It seems on the fact of it (to a non-Ada expert, of course) that
> given:
> get_target_long_double_size really ought to be using something called
> ADA_LONG_DOUBLE_TYPE_SIZE, given that it isn't always the same as
> LONG_DOUBLE_TYPE_SIZE.
Yes, there definitely is room for improvement here.
It's on my to do list.
-Geert
next prev parent reply other threads:[~2007-10-10 17:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 8:59 Olivier Hainque
2007-10-09 20:01 ` Richard Sandiford
2007-10-10 11:43 ` Geert Bosch
2007-10-10 12:25 ` Richard Sandiford
2007-10-10 17:08 ` Geert Bosch [this message]
2009-03-02 17:30 ` Laurent GUERBY
2009-03-02 20:08 ` Richard Sandiford
2009-03-02 21:46 ` Laurent GUERBY
2009-03-03 5:17 ` Geert Bosch
2009-03-03 9:16 ` Laurent GUERBY
2009-03-04 20:24 ` Richard Sandiford
2009-03-04 21:10 ` Laurent GUERBY
2009-03-04 22:03 ` Richard Sandiford
2009-03-04 23:19 ` Joseph S. Myers
2009-03-04 23:55 ` Laurent GUERBY
2009-03-05 4:36 ` Geert Bosch
2009-03-05 13:56 ` Joseph S. Myers
2009-03-04 21:13 ` Geert Bosch
2009-03-04 22:18 ` Richard Sandiford
2009-03-05 4:30 ` Geert Bosch
2009-03-05 22:06 ` Richard Sandiford
2009-03-03 9:43 ` Olivier Hainque
2009-03-04 10:19 ` Laurent GUERBY
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=7C2C6C26-1CF3-4304-B9E3-A33DA1C7B2C6@adacore.com \
--to=bosch@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hainque@adacore.com \
--cc=rsandifo@nildram.co.uk \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).