public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "meissner at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113652] [14 regression] Failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450
Date: Sat, 13 Apr 2024 04:39:11 +0000	[thread overview]
Message-ID: <bug-113652-4-Uh5sPeQRSO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113652-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113652

--- Comment #23 from Michael Meissner <meissner at gcc dot gnu.org> ---
This is one of those things where there is no right answer in part because we
need other things to flesh out the support.

The reason -mvsx was used is we need the VSX registers to build the IEEE
128-bit support in libgcc (KFmode values are passed in vector registers 32..63,
i.e. the traditional Altivec registers).

In theory, we need only Altivec, but I felt at the time when I implemented this
 that it opened up the door for lots of other things breaking due to the goofy
nature of Altivec addresses omitting the bottom bits and no direct move
support) and that VSX was the minimum ISA needed.

Now, from a practical matter, it should have been power8 as a minimum (due to
direct move) but at the time I did the initial work, we were still actively
supporting power7.

Then we have the issue that while the compiler can generate code on BE systems
for IEEE 128-bit (either with software emulation or with the power9 hardware
support) glibc only supports IEEE 128-bit on 64-bit LE.

So for a user it is useless to have IEEE 128-bit on BE systems.  But if
somebody wanted to go through and do the work to enable the GLIBC support and
other parts of the compiler/libraries that provide IEEE 128-bit.  But it is not
a windmill I want to charge and tilt at.  But hey, if somebody wants to do the
work to fix all of the support for this, go ahead.  I am not that person.

Note this is the classic catch 22 that we faced in the early days.  GCC has to
support the stuff to a minimal amount even though users can't use it.  But you
need that ability to generate the code to get glibc to do the support.

In terms of the immediate problem, you have several choices:

1) Ignore it and say to the users don't do that.

2) Prevent the IEEE 128-bit libgcc bits from being built on a BE or 32-bit LE
system unless some configure switch is used.  Or just kick the can down the
road, and don't provide a configure option in GCC 14, and if people are
interested do it in GCC 15.

3) Only build the IEEE 128-bit libgcc bits if the user configured the compiler
with --with-cpu=power7, --with-cpu=power8, --with-cpu=power9,
--with-cpu=power10 (and in the future --with-cpu=power11 or --with-cpu=future).
 This could be code that if __VSX__ is not defined, the libgcc support
functions won't get built.  We would then remove the -mvsx option from the
library support functions.

Though note, there is an issue in that if you don't use a --with-cpu= configure
option, it won't build the bits.  Thus for the brave person trying to enable
IEEE 128-bit for BE, they would have to configure with one of the IBM server
platforms, while the majority of users would be using the old Apple boards,
embedded platforms, or even AIX, etc.

Note, I will be on vacation from April 16th through the 23rd, and I probably
won't bring a work laptop, which will mean I won't be able to answer email in
that period.

  parent reply	other threads:[~2024-04-13  4:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 13:01 [Bug target/113652] New: ppc: unrecognized opcode: `lfiwzx' csfore at posteo dot net
2024-01-29 13:07 ` [Bug target/113652] [14 regression] Failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450 rguenth at gcc dot gnu.org
2024-01-29 13:12 ` csfore at posteo dot net
2024-01-29 16:50 ` erhard_f at mailbox dot org
2024-01-29 17:51 ` csfore at posteo dot net
2024-01-29 20:49 ` csfore at posteo dot net
2024-01-30  3:05 ` linkw at gcc dot gnu.org
2024-01-30  3:26 ` linkw at gcc dot gnu.org
2024-01-30  3:44 ` pinskia at gcc dot gnu.org
2024-01-30  6:16 ` [Bug target/113652] " linkw at gcc dot gnu.org
2024-01-30  6:18 ` sjames at gcc dot gnu.org
2024-01-30  6:37 ` linkw at gcc dot gnu.org
2024-01-30  6:59 ` [Bug target/113652] [14 regression] " linkw at gcc dot gnu.org
2024-01-30  8:58 ` linkw at gcc dot gnu.org
2024-02-07 23:15 ` amodra at gmail dot com
2024-02-09  4:21 ` bergner at gcc dot gnu.org
2024-02-12 12:38 ` csfore at posteo dot net
2024-02-15 10:29 ` erhard_f at mailbox dot org
2024-03-27 13:46 ` rguenth at gcc dot gnu.org
2024-03-28 20:37 ` meissner at gcc dot gnu.org
2024-03-29 12:58 ` segher at gcc dot gnu.org
2024-03-29 13:04 ` segher at gcc dot gnu.org
2024-03-29 21:17 ` bergner at gcc dot gnu.org
2024-04-13  4:39 ` meissner at gcc dot gnu.org [this message]
2024-05-07  7:44 ` [Bug target/113652] [14/15 " rguenth at gcc dot gnu.org
2024-05-09  3:18 ` bergner at gcc dot gnu.org
2024-05-09  9:41 ` segher at gcc dot gnu.org
2024-05-09 13:55 ` erhard_f at mailbox dot org

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=bug-113652-4-Uh5sPeQRSO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).