From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Michael Meissner <meissner@linux.vnet.ibm.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH], Enable IBM/IEEE long double format to overriden more easily
Date: Thu, 26 Oct 2017 17:47:00 -0000 [thread overview]
Message-ID: <20171026171338.GA27998@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <20171026001107.GM4406@gate.crashing.org>
On Wed, Oct 25, 2017 at 07:11:07PM -0500, Segher Boessenkool wrote:
> Hi Mike,
>
> On Sat, Oct 21, 2017 at 09:09:58AM -0400, Michael Meissner wrote:
> > As Segher and I were discussing off-line, I have some problems with the current
> > -mabi={ieee,ibm}longdouble switches as we start to planning to modify GCC 9 and
> > GLIBC 2.27/2.28 to support __float128 as the default long double format for
> > power server systems.
> >
> > My gripes are:
> >
> > 1) Using Warn() in rs6000.opt means that you get two warning messages when
> > you use the switches (one from the driver, and one from cc1).
> >
> > 2) I feel you should not get a warning if you select the option that
> > reflects the current default behavior (i.e. -mabi=ibmlongdouble
> > currently for power server systems).
> >
> > 3) There is no way to silenece the warning (i.e. -w doesn't work on
> > warnings in the .opt file). Both GLIBC and LIBGCC will need the
> > ability to build support modules with an explicit long double format.
> >
> > 4) In the future we will need a little more flexibility in how the default
> > is set.
> >
> > 5) There is a mis-match between the documentation and rs6000.opt, as these
> > switches are documented, but use Undocumented in the rs6000.opt.
>
> Agreed on all.
>
> > These patches fix these issues. If you use -Wno-psabi, it will silence the
> > warning. I have built these patches on a little endian power8 system, and
> > there were no regressions. Can I check these patches into the trunk?
> >
> > 2017-10-21 Michael Meissner <meissner@linux.vnet.ibm.com>
> >
> > * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
> > default to IBM.
> > * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
> > * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
> > warning to rs6000.c. Remove the Undocumented flag, since it has
> > been documented.
> > (-mabi=ibmlongdouble): Likewise.
>
> And more importantly, we _want_ it to be documented (right)?
I would have preferred to not document it until GCC 9 when we start the switch
to long double == _Float128, but since it was already documented (albeit only
for 32 bit), I kept it documented. If you want me to change it to
undocumented, I can do that.
> > --- gcc/config/rs6000/rs6000.opt (revision 253961)
> > +++ gcc/config/rs6000/rs6000.opt (working copy)
> > @@ -381,10 +381,10 @@ mabi=d32
> > Target RejectNegative Undocumented Warn(using old darwin ABI) Var(rs6000_darwin64_abi, 0)
> >
> > mabi=ieeelongdouble
> > -Target RejectNegative Undocumented Warn(using IEEE extended precision long double) Var(rs6000_ieeequad) Save
> > +Target RejectNegative Var(rs6000_ieeequad) Save
> >
> > mabi=ibmlongdouble
> > -Target RejectNegative Undocumented Warn(using IBM extended precision long double) Var(rs6000_ieeequad, 0)
> > +Target RejectNegative Var(rs6000_ieeequad, 0)
>
> Does this need "Save" as well?
No for variables, you want Save on the first instance only.
> > + if (!warned_change_long_double && warn_psabi)
> > + {
> > + warned_change_long_double = true;
> > + if (TARGET_IEEEQUAD)
> > + warning (0, "Using IEEE extended precision long double");
> > + else
> > + warning (0, "Using IBM extended precision long double");
> > + }
>
> You can put OPT_Wpsabi in place of that 0, it's what that arg is for :-)
Ah, ok. Thanks.
> Okay with that changed. Thanks!
>
>
> Segher
>
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797
prev parent reply other threads:[~2017-10-26 17:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-21 14:03 Michael Meissner
2017-10-26 0:11 ` Segher Boessenkool
2017-10-26 17:47 ` Michael Meissner [this message]
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=20171026171338.GA27998@ibm-tiger.the-meissners.org \
--to=meissner@linux.vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=segher@kernel.crashing.org \
--cc=wschmidt@linux.vnet.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).