From patchwork Sat Nov 10 18:58:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 198204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 834842C007E for ; Sun, 11 Nov 2012 05:58:42 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1353178722; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=Jgnck4agW64/KVButV9KN4OAy+U=; b=x/4w/8LGR6ykqz4t0ETDhQUcP1sqy6xfOepa60tLrIEEg5H/iiLFHMJ8nzMPt7 WSv3Jssd0qfADvRWSrJOg6BH60Z5bLY25RKWiqmy9oyeFpoKzlnhluEwZKfwuwM3 PYL+0w7W2H5UkLNO2E7qu1dT4yLRSTptoeNKtQCm7opQg= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:In-Reply-To:References:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=MNAIAiu1vxvEZyipg53oEjD6S0GOWrbejfdol65yvzLfE/vyMyBg4vUAggYfn3 gJqhwjgGiTumQooi2YfSXOl1JWtFPOMYztj5OcQUziIsBawVNpNxmR9xK1kfODtd WcLv/+OojbJw9kyohoKuScS3rSmDrjDDAqm5n6KtCflEY=; Received: (qmail 12389 invoked by alias); 10 Nov 2012 18:58:39 -0000 Received: (qmail 12381 invoked by uid 22791); 10 Nov 2012 18:58:38 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Nov 2012 18:58:31 +0000 Received: by mail-pa0-f47.google.com with SMTP id fa11so3286527pad.20 for ; Sat, 10 Nov 2012 10:58:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.217.67 with SMTP id ow3mr44891299pbc.26.1352573911442; Sat, 10 Nov 2012 10:58:31 -0800 (PST) Received: by 10.68.19.138 with HTTP; Sat, 10 Nov 2012 10:58:31 -0800 (PST) In-Reply-To: References: Date: Sat, 10 Nov 2012 10:58:31 -0800 Message-ID: Subject: Re: [PATCH, i386]: Fix PR 55247, ICE: Max. number of generated reload insns per insn is achieved From: "H.J. Lu" To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org, Vladimir Makarov X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sat, Nov 10, 2012 at 3:43 AM, Uros Bizjak wrote: > Hello! > > Attached patch disparages riF->o alternative of *movti_internal_rex64 > insn, as described by Vlad in comment #2 [1] > > The core of the problem however is, that gcc is unable to detect > zero-extended address as offsetable. H.J. will propose a patch for > this [2]. My updated patch is at http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00799.html > 2012-11-10 Vladimir Makarov > Uros Bizjak > > PR target/55247 > * config/i386/i386.md (*movti_internal_rex64): Add "!" to riF->o > alternative. > > testsuite/ChangeLog: > > 2012-11-10 Uros Bizjak > > PR target/55247 > * gcc.target/i386/pr55247.c: New test. > > Tested on x86_64-linux-gnu {,m32} and committed to mainline SVN. > > [1] gcc.gnu.org/bugzilla/show_bug.cgi?id=55247#c2 > [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55247#c6 > > Uros. I checked in this patch to compile pr55247.c with -mno-sse -mno-mmx, which triggers the bug. H.J. --- symbind32 (&sym); } Index: ChangeLog =================================================================== --- ChangeLog (revision 193393) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2012-11-10 H.J. Lu + + * gcc.target/i386/pr55247.c: Require maybe_x32 target. Add + -mno-sse -mno-mmx to dg-options. Reformat. + 2012-11-10 David Edelsohn * c-c++-common/scal-to-vec2.c: Ignore non-standard ABI message. Index: gcc.target/i386/pr55247.c =================================================================== --- gcc.target/i386/pr55247.c (revision 193393) +++ gcc.target/i386/pr55247.c (working copy) @@ -1,8 +1,8 @@ /* { dg-do compile { target { ! { ia32 } } } } */ -/* { dg-options "-O2 -mx32 -maddress-mode=long -mno-sse" } */ +/* { dg-require-effective-target maybe_x32 } */ +/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */ typedef unsigned int uint32_t; -typedef unsigned int uintptr_t; typedef uint32_t Elf32_Word; typedef uint32_t Elf32_Addr; typedef struct { @@ -16,7 +16,7 @@ } Elf32_Rela; typedef struct { - union { + union { Elf32_Addr d_ptr; } d_un; @@ -24,15 +24,12 @@ struct link_map { Elf32_Dyn *l_info[34]; }; -typedef struct link_map *lookup_t; extern void symbind32 (Elf32_Sym *); void _dl_profile_fixup (struct link_map *l, Elf32_Word reloc_arg) { - const Elf32_Sym *const symtab = (const void *) (l)->l_info[6]->d_un.d_ptr; - const Elf32_Rela *const reloc = (const void *) ((l)->l_info[23]->d_un.d_ptr + reloc_arg * sizeof (Elf32_Rela)); - const Elf32_Sym *refsym = &symtab[((reloc->r_info) >> 8)]; - const Elf32_Sym *defsym = refsym; - Elf32_Sym sym = *defsym; + const Elf32_Sym *const symtab = (const void *) l->l_info[6]->d_un.d_ptr; + const Elf32_Rela *const reloc = (const void *) (l->l_info[23]->d_un.d_ptr + reloc_arg * sizeof (Elf32_Rela)); + Elf32_Sym sym = symtab[(reloc->r_info) >> 8];