From patchwork Fri Aug 3 20:45:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 175045 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 E85392C007E for ; Sat, 4 Aug 2012 06:45:43 +1000 (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=1344631544; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=WvZBRFN G3duSxVCS7Qkt4K6AqoM=; b=AlixtliJvgYIzRTj/MyVMp1r0sjtu70l0TPYNZw lmYvzZkJ/nDAt8jkVFTz2gxJBzbMWfDwRuWFa/iMPMt7e7PzlEGG/x20MGagDlpI JS8Mflw8XnfDT1Zuakob0F5ueXhQxmC21kOoRv+pGL1C+4EFnSZbzVg0hQGesrTf fmxE= 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:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PXzee0jAxFR3CheL776sOF7uVQhK6BiA2AwRGbnI2S5TNzaBLn75HTXyefOvfu a7EhKOCB6hr4YFgNiVWl2q4l6mS+nonbUdlDgXD180RLdGNBng9peQRShgac/lVL TI0GCcnnJn0A2mj1cP1KWm7syN7k3X0oDQp0sspdBfSXE=; Received: (qmail 6634 invoked by alias); 3 Aug 2012 20:45:33 -0000 Received: (qmail 6179 invoked by uid 22791); 3 Aug 2012 20:45:30 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 03 Aug 2012 20:45:17 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q73KjHE1016990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 3 Aug 2012 16:45:17 -0400 Received: from ivy.local (ovpn-113-126.phx2.redhat.com [10.3.113.126]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q73KjGHl001309 for ; Fri, 3 Aug 2012 16:45:16 -0400 Message-ID: <501C385C.4080107@redhat.com> Date: Fri, 03 Aug 2012 16:45:16 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: GCC Patches Subject: [lra] patch to fix ppc bootstrap after last merge 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 The following patch fixes a bug occuring during the ppc bootstrap. The patch was successfully bootstrapped on x86/x86-64 and ppc. Committed as rev. 190133. 2012-08-03 Vladimir Makarov * lra-assign.c (find_hard_regno_for): Check paradoxical subregs. Index: lra-assigns.c =================================================================== --- lra-assigns.c (revision 190127) +++ lra-assigns.c (working copy) @@ -307,7 +307,7 @@ find_hard_regno_for (int regno, int *cos int hr, conflict_hr, nregs; enum machine_mode biggest_mode; unsigned int k, conflict_regno; - int val; + int val, biggest_nregs, nregs_diff; enum reg_class rclass; bitmap_iterator bi; bool *rclass_intersect_p; @@ -435,6 +435,10 @@ find_hard_regno_for (int regno, int *cos lra_assert (rclass != NO_REGS); rclass_size = ira_class_hard_regs_num[rclass]; best_hard_regno = -1; + hard_regno = ira_class_hard_regs[rclass][0]; + biggest_nregs = hard_regno_nregs[hard_regno][biggest_mode]; + nregs_diff = (biggest_nregs + - hard_regno_nregs[hard_regno][PSEUDO_REGNO_MODE (regno)]); for (i = 0; i < rclass_size; i++) { if (try_only_hard_regno >= 0) @@ -447,7 +451,17 @@ find_hard_regno_for (int regno, int *cos /* We can not use prohibited_class_mode_regs because it is defined not for all classes. */ && HARD_REGNO_MODE_OK (hard_regno, PSEUDO_REGNO_MODE (regno)) - && ! TEST_HARD_REG_BIT (impossible_start_hard_regs, hard_regno)) + && ! TEST_HARD_REG_BIT (impossible_start_hard_regs, hard_regno) + && (nregs_diff == 0 +#ifdef WORDS_BIG_ENDIAN + || (hard_regno - nregs_diff >= 0 + && TEST_HARD_REG_BIT (reg_class_contents[rclass], + hard_regno - nregs_diff)) +#else + || TEST_HARD_REG_BIT (reg_class_contents[rclass], + hard_regno + nregs_diff) +#endif + )) { if (hard_regno_costs_check[hard_regno] != curr_hard_regno_costs_check)