public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	Michael Meissner <meissner@linux.ibm.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Michael Meissner via Gcc <gcc@gcc.gnu.org>,
	Mike Stump <mikestump@comcast.net>,
	Iain Sandoe <iain@sandoe.co.uk>,
	"Carlos O'Donell" <carlos@redhat.com>,
	libc-alpha@sourceware.org, Alan Modra <amodra@gmail.com>,
	Joseph Myers <joseph@codesourcery.com>,
	"David S. Miller" <davem@redhat.com>, Jeff Law <jlaw@tachyum.com>,
	Richard Biener <rguenther@suse.de>,
	Nathan Sidwell <nathan@acm.org>
Subject: Re: Resend: Potential upcoming changes in mangling to PowerPC GCC
Date: Wed, 10 Aug 2022 18:38:14 -0300	[thread overview]
Message-ID: <87y1vvaiex.fsf@linux.ibm.com> (raw)
In-Reply-To: <20220810200400.GD25951@gate.crashing.org>

Segher Boessenkool <segher@kernel.crashing.org> writes:

> You can write
> 	double convert (__ibm128  x) { return x; }
> 	double convert (__ieee128 x) { return x; }
> as well.  "__ieee128" and "long double" are the same type then (and the
> same as _Float128 and __float128 as well).

Oh! I see.  Thanks!

Going back to Mike's original question:

>> But in changing the mangling, we have the potential to create compatibility
>> issues, of code compiled with previous GCC's that use explicit __ibm128 and
>> __float128 keywords.  I don't how the users of these keywords (i.e. typically
>> libstdc++ and glibc developers, but potentially others as well).

In glibc, we use __ibm128 only once in a place that always has to be
double-double regardless of the long double type.
Everywhere else, when a double-double type is expected, long double is used.
This is also how glibc users are expected to use double-double functions from
glibc.

Meanwhile, _Float128/_float128 is used everywhere along with long double,
regardless if long double is double-double or __float128.

With that said, glibc code was designed with this in mind (thanks Joseph!), but
AFAIK nobody ever tested building glibc for ppc64le with the proposal you have
here.

If this proposal is adopted, we'd need a way to distinguish between the previous
and the new behavior, i.e. a macro.

Anyway, I believe that a newer GCC will have trouble compiling on a
system with an older glibc.
An older glibc will also have trouble building with a newer GCC, but that might
be less important.

Likewise for libdfp.

-- 
Tulio Magno

      reply	other threads:[~2022-08-10 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 17:48 Michael Meissner
2022-08-04 20:53 ` Segher Boessenkool
2022-08-08 21:44   ` Michael Meissner
2022-08-10 17:14     ` Segher Boessenkool
2022-08-10 19:55 ` Tulio Magno Quites Machado Filho
2022-08-10 20:04   ` Segher Boessenkool
2022-08-10 21:38     ` Tulio Magno Quites Machado Filho [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=87y1vvaiex.fsf@linux.ibm.com \
    --to=tuliom@linux.ibm.com \
    --cc=amodra@gmail.com \
    --cc=carlos@redhat.com \
    --cc=davem@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=jakub@redhat.com \
    --cc=jlaw@tachyum.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=meissner@linux.ibm.com \
    --cc=mikestump@comcast.net \
    --cc=nathan@acm.org \
    --cc=rguenther@suse.de \
    --cc=segher@kernel.crashing.org \
    /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).