From: Segher Boessenkool <segher@kernel.crashing.org>
To: Bill Schmidt <wschmidt@linux.ibm.com>
Cc: David Edelsohn <dje.gcc@gmail.com>,
GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] rs6000: __builtin_darn[_raw] should be in [power9-64] (PR103624)
Date: Mon, 13 Dec 2021 18:22:08 -0600 [thread overview]
Message-ID: <20211214002208.GH614@gate.crashing.org> (raw)
In-Reply-To: <6d9f439c-c8a7-605d-e494-b20125837355@linux.ibm.com>
On Mon, Dec 13, 2021 at 02:37:43PM -0600, Bill Schmidt wrote:
> On 12/13/21 10:54 AM, Segher Boessenkool wrote:
> > On Mon, Dec 13, 2021 at 11:30:28AM -0500, David Edelsohn wrote:
> >> On Mon, Dec 13, 2021 at 10:48 AM Bill Schmidt <wschmidt@linux.ibm.com> wrote:
> >>> PR103624 observes that we get segfaults for the 64-bit darn builtins when compiled
> >>> on a 32-bit architecture. The old built-in infrastructure requires TARGET_64BIT, and
> >>> this was missed in the new support. Moving these two builtins from the [power9]
> >>> stanza to the [power9-64] stanza solves the problem.
> >>>
> >>> Tested the fix on a powerpc-e300c3-linux-gnu cross. Bootstrapped and tested on
> >>> powerpc64le-linux-gnu with no regressions. Is this okay for trunk?
> >> Okay.
> > No, as I said before this is not correct, not without a lot more
> > explanation at least. We should not copy errors in the old code into
> > the new code. That is negating one of the main advantages of
> > reimplementing this in the first place!
>
> Can you please be more specific?
>
> All I have from you before is "It should work for 32-bit though?" I responded in the
> bug report that __builtin_darn_32 was used for this purpose. I haven't seen a
> response to that. What do you want to see happen?
That of course does not work for _raw.
These builtins should just return a "long", just like __builtin_ppc_mftb
does. All three of them.
> The patterns in rs6000.md are darn_32, gated by TARGET_P9_MISC; darn_raw, gated by
> TARGET_P9_MISC && TARGET_64BIT; and darn, gated by TARGET_P9_MISC && TARGET_64BIT.
> The builtins correspond to these patterns in the obvious way.
>
> If you think that these patterns should be enabled differently, that's fine, but
> that's a completely different patch than fixing the incorrect built-ins to match
> what the patterns do and thus avoid ICEing.
Avoiding ICEs should not be a goal. It should be a side effect of doing
the right thing in the first place!
Segher
next prev parent reply other threads:[~2021-12-14 0:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 15:48 Bill Schmidt
2021-12-13 16:30 ` David Edelsohn
2021-12-13 16:54 ` Segher Boessenkool
2021-12-13 20:37 ` Bill Schmidt
2021-12-14 0:22 ` Segher Boessenkool [this message]
2021-12-14 13:32 ` Bill Schmidt
2021-12-14 15:17 ` Bill Schmidt
2021-12-15 2:23 ` Segher Boessenkool
2021-12-15 14:00 ` Bill Schmidt
2021-12-15 18:41 ` Segher Boessenkool
2021-12-15 20:13 ` Bill Schmidt
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=20211214002208.GH614@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=wschmidt@linux.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).