public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Jeff Law <law@redhat.com>, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: Fix for PRs 36043, 58744 and 65408
Date: Mon, 13 Apr 2015 04:50:00 -0000	[thread overview]
Message-ID: <20150413044855.GB18863@bubble.grove.modra.org> (raw)
In-Reply-To: <CAFiYyc2L5=gD2L3ArJD9579da6-5fPfH=jneWxC=S8vdasRg2w@mail.gmail.com>

On Wed, Mar 18, 2015 at 12:12:17PM +0100, Richard Biener wrote:
> On Wed, Mar 18, 2015 at 5:22 AM, Alan Modra <amodra@gmail.com> wrote:
> > On Tue, Mar 17, 2015 at 01:28:41PM -0600, Jeff Law wrote:
> >> On 03/14/2015 07:02 AM, Alan Modra wrote:
> >> >     PR target/65408
> >> >     PR target/58744
> >> >     PR middle-end/36043
> >> >     * calls.c (load_register_parameters): Don't load past end of
> >> >     mem unless suitably aligned.
> >> I think this is probably a stage1 item.  Richi, Jakub, Joseph, do any of you
> >> think we should try to push this into gcc-5?
> >
> > Some (severity) background to PR65408.  The bug came from SAP HANA
> > (en.wikipedia.org/wiki/SAP_HANA), a crash that happens on powerpc64
> > and powerpc64le.  aarch64 would also be susceptible to the crash since
> > it also loads 16 bytes for the 12-byte struct.  x86_64 only loads 12
> > bytes (i386.c:construct_container generates a parallel with a DImode
> > and SImode load).  However the underlying bug is there and hits x86_64
> > too for the pr58744 and pr36043 testcases..
> 
> It's a very very very old bug though.  I'd be interested in any odd
> code-generation difference for compiling, say, the linux kernel
> (you _can_ get quite ugly code generated because of this fix).

Yes, all those byte loads..  As far as the kernel goes, x86_64 shows
some differences in calls to rgb_{fore,back}ground in
drivers/tty/vt/vt.c.  Both before and after look ugly to me.  :)

    4d73:       8b 82 24 02 00 00       mov    0x224(%rdx),%eax
    4d79:       48 89 df                mov    %rbx,%rdi
    4d7c:       41 83 c4 04             add    $0x4,%r12d
    4d80:       88 45 b2                mov    %al,-0x4e(%rbp)
    4d83:       8b 82 28 02 00 00       mov    0x228(%rdx),%eax
    4d89:       88 45 b3                mov    %al,-0x4d(%rbp)
    4d8c:       8b 82 2c 02 00 00       mov    0x22c(%rdx),%eax
    4d92:       88 45 b4                mov    %al,-0x4c(%rbp)
    4d95:       48 8b 75 b2             mov    -0x4e(%rbp),%rsi
    4d99:       e8 00 00 00 00          callq  <rgb_background>
 vs.
    4d73:       8b 82 24 02 00 00       mov    0x224(%rdx),%eax
    4d79:       0f b6 b2 2c 02 00 00    movzbl 0x22c(%rdx),%esi
    4d80:       48 89 df                mov    %rbx,%rdi
    4d83:       41 83 c4 04             add    $0x4,%r12d
    4d87:       88 45 b2                mov    %al,-0x4e(%rbp)
    4d8a:       8b 82 28 02 00 00       mov    0x228(%rdx),%eax
    4d90:       48 c1 e6 10             shl    $0x10,%rsi
    4d94:       88 45 b3                mov    %al,-0x4d(%rbp)
    4d97:       0f b7 45 b2             movzwl -0x4e(%rbp),%eax
    4d9b:       48 09 c6                or     %rax,%rsi
    4d9e:       e8 00 00 00 00          callq  <rgb_background>

Is the patch OK for stage1?

-- 
Alan Modra
Australia Development Lab, IBM

  reply	other threads:[~2015-04-13  4:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14 13:02 Alan Modra
2015-03-14 13:14 ` H.J. Lu
2015-03-14 13:55   ` Alan Modra
2015-03-14 13:58 ` Bernhard Reutner-Fischer
2015-03-14 17:52   ` Mike Stump
2015-03-14 17:56     ` Jakub Jelinek
2015-03-14 18:28       ` Mike Stump
2015-03-15  3:00 ` Alan Modra
2015-03-17 19:28 ` Jeff Law
2015-03-18  4:22   ` Alan Modra
2015-03-18 11:12     ` Richard Biener
2015-04-13  4:50       ` Alan Modra [this message]
2015-04-13  7:47         ` Richard Biener

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=20150413044855.GB18863@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=richard.guenther@gmail.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).