From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39505 invoked by alias); 13 Apr 2015 07:47:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 39486 invoked by uid 89); 13 Apr 2015 07:47:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vn0-f46.google.com Received: from mail-vn0-f46.google.com (HELO mail-vn0-f46.google.com) (209.85.216.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 13 Apr 2015 07:47:55 +0000 Received: by vnbg129 with SMTP id g129so16895408vnb.4 for ; Mon, 13 Apr 2015 00:47:53 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.177.212 with SMTP id a203mr6368150oif.46.1428911273262; Mon, 13 Apr 2015 00:47:53 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Mon, 13 Apr 2015 00:47:53 -0700 (PDT) In-Reply-To: <20150413044855.GB18863@bubble.grove.modra.org> References: <20150314130238.GD16488@bubble.grove.modra.org> <55088069.3010802@redhat.com> <20150318042208.GD24573@bubble.grove.modra.org> <20150413044855.GB18863@bubble.grove.modra.org> Date: Mon, 13 Apr 2015 07:47:00 -0000 Message-ID: Subject: Re: Fix for PRs 36043, 58744 and 65408 From: Richard Biener To: Richard Biener , Jeff Law , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00550.txt.bz2 On Mon, Apr 13, 2015 at 6:48 AM, Alan Modra wrote: > On Wed, Mar 18, 2015 at 12:12:17PM +0100, Richard Biener wrote: >> On Wed, Mar 18, 2015 at 5:22 AM, Alan Modra 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 > 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 > > Is the patch OK for stage1? Yes. Thanks, Richard. > -- > Alan Modra > Australia Development Lab, IBM