From: Segher Boessenkool <segher@kernel.crashing.org>
To: Ian Lance Taylor <iant@google.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Errors building libgcc for powerpc64le-linux-gnu
Date: Sun, 15 Dec 2019 19:21:00 -0000 [thread overview]
Message-ID: <20191215192113.GZ3152@gate.crashing.org> (raw)
In-Reply-To: <CAKOQZ8zxeivcRjq-aKGY5WJMbsLjWDyXD+cbRQwT89+oL8Vy+g@mail.gmail.com>
On Sun, Dec 15, 2019 at 09:43:20AM -0800, Ian Lance Taylor wrote:
> On Sat, Dec 14, 2019 at 11:25 PM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> >
> > On Sat, Dec 14, 2019 at 10:51:50AM -0800, Ian Lance Taylor via gcc wrote:
> > > I'm seeing compiler crashes building libgcc for powerpc64le-linux-gnu,
> > > cross-compiling from x86_64-pc-linux-gnu. I'm at SVN revision 279830.
> > > I'm seeing the following. Is anybody else seeing this crash? Thanks.
> >
> > No, and that makes me wonder what is going on. The error is simple enough
> > of course, as you note in a later message; but why do we not see it on
> > every other build?
>
> I think it's because clang treats a left shift by a negative number as
> undefined behavior but GCC does not. So GCC is consistently producing
> some number, and clang is producing different numbers.
Hrm. Why did that not show up with ubsan then though? (Or maybe it did,
and I just never heard).
> I should note that I don't really understand what purpose that
> constant is serving anyhow.
- "operands[2] = GEN_INT (1 << (75 - REGNO (operands[0])));")
+ "operands[2] = GEN_INT (1 << (7 - (REGNO (operands[0]) - CR0_REGNO)));")
The constant is the bitmask of which CR fields to save/restore (always
one here, but the insn allows any combination).
Committing that patch later today. Thanks for the report!
Segher
next prev parent reply other threads:[~2019-12-15 19:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 18:52 Ian Lance Taylor via gcc
2019-12-14 20:47 ` Ian Lance Taylor via gcc
2019-12-15 7:25 ` Segher Boessenkool
2019-12-15 17:43 ` Ian Lance Taylor via gcc
2019-12-15 19:21 ` Segher Boessenkool [this message]
2019-12-18 15:58 ` Segher Boessenkool
2019-12-20 0:08 ` Ian Lance Taylor via gcc
2019-12-20 0:27 ` Segher Boessenkool
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=20191215192113.GZ3152@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc@gcc.gnu.org \
--cc=iant@google.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).