This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Powerpc64 long double support
- From: Geoff Keating <geoffk at desire dot geoffk dot org>
- To: amodra at bigpond dot net dot au
- Cc: sjmunroe at us dot ibm dot com, gcc-patches at gcc dot gnu dot org, aj at suse dot de, dgm69 at us dot ibm dot com, dje at watson dot ibm dot com, meissner at suse dot de
- Date: Sat, 6 Mar 2004 15:13:44 -0800
- Subject: Re: Powerpc64 long double support
- References: <40491948.2010900@us.ibm.com> <20040306105033.GF2715@bubble.modra.org>
> X-Original-To: geoffk@foam.wonderslug.com
> Date: Sat, 6 Mar 2004 21:20:33 +1030
> From: Alan Modra <amodra@bigpond.net.au>
> Cc: gcc-patches@gcc.gnu.org, Geoff Keating <geoffk@geoffk.org>,
> Andreas Jaeger <aj@suse.de>, Dwayne McConnell <dgm69@us.ibm.com>,
> David Edelsohn <dje@watson.ibm.com>,
> Marcus Meissner <meissner@suse.de>
> Mail-Followup-To: Steve Munroe <sjmunroe@us.ibm.com>,
> gcc-patches@gcc.gnu.org, Geoff Keating <geoffk@geoffk.org>,
> Andreas Jaeger <aj@suse.de>, Dwayne McConnell <dgm69@us.ibm.com>,
> David Edelsohn <dje@watson.ibm.com>,
> Marcus Meissner <meissner@suse.de>
> Content-Disposition: inline
> X-OriginalArrivalTime: 06 Mar 2004 10:50:37.0609 (UTC) FILETIME=[DC062990:01C40368]
>
> On Fri, Mar 05, 2004 at 06:20:24PM -0600, Steve Munroe wrote:
> > +/* Powerpc64 uses the AIX long double format.
> > +
> > + Each long double is made up of two IEEE doubles. The value of the
> > + long double is the sum of the values of the two parts. The most
> > + significant part is required to be the value of the long double
> > + rounded to the nearest double, as specified by IEEE. For Inf
> > + values, the least significant part is required to be one of +0.0 or
> > + -0.0.
>
> Do you know why this is required for Inf? If there is a reason,
> then the patch I just posted to fix -0.0 is wrong.. (In any case,
> the patch is incomplete, as rs6000.md extenddftf2 also needs looking
> at.)
>
> Hmm, I can see that if you represent +Inf by (+Inf + -Inf), you're
> in trouble, because converting to double will result in a Nan.
> Perhaps there is some sequence of operations that will result in
> (+Inf + +Inf) being turned into (+Inf + -Inf)?
If you represent +Inf by (+Inf, +/-Inf), then the code to convert a
double to a long double becomes significantly more complicated. Right
now, it's done by just loading +0.0 in the low double.
You have to use the same value consistently, of course, or when you
compare two Inf values for == you might get the wrong answer.
--
- Geoffrey Keating <geoffk@geoffk.org>