From patchwork Thu Jun 27 15:55:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 255102 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id C00B32C00A2 for ; Fri, 28 Jun 2013 01:55:46 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=WnEdXFuxH7SNIgvhXOAStcquJ0W56XajhkmI+FNgiBT 1o28LYlcSM6TLyIjF1ddazASl7vqHIJJpxYLpqTDFLCAWHg8gYMeGGj9dZmi9gRw IA5l6mhNWXoWzYKTQLxcGG3WUBDwrZR63phQhjpBYgE85uFGM2/Ir8uJ/Sefxsws = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=c7u9JnZBEiTD/83vCEzyS8yvIts=; b=qo6WUagpQr7HyxRE7 ehbVaNogt4cvkcR2X5yecQS9cnW44bE+74RlnKMHh4b1J7tGWro1ZlemKiYzBV5Q gv1rUnfwhqzTQWrtG8JwvoXsqs6hvaZhIxpm3Sv5j4FGiBUaS/BDA0WkBqKZC15k ErCHYNv3/lmJ1XP/1ZSfs9y8jc= Received: (qmail 30935 invoked by alias); 27 Jun 2013 15:55:40 -0000 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 Received: (qmail 30914 invoked by uid 89); 27 Jun 2013 15:55:39 -0000 X-Spam-SWARE-Status: No, score=-7.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 15:55:38 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5RFtaLb008465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Jun 2013 11:55:37 -0400 Received: from topor.usersys.redhat.com ([10.15.16.142]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5RFtZLb018220; Thu, 27 Jun 2013 11:55:36 -0400 Message-ID: <51CC6077.6050401@redhat.com> Date: Thu, 27 Jun 2013 11:55:35 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: gcc-patches CC: Richard Sandiford Subject: patch to build GCC for arm with LRA X-Virus-Found: No The following patch is for building arm GCC with LRA. I found that ASHIFTRT and LSHIFTRT are used in address calculation for arm, e.g. (insn 78 76 79 8 (set (reg/v:SI 153 [ offset ]) (mem:SI (plus:SI (ashiftrt:SI (reg:SI 151 [ D.6620 ]) (const_int 8 [0x8])) (reg/f:SI 183 [ MEM[(const void * const *)obj_ptr_5(D)] ])) [5 *_27+0 S4 A32])) /home/cygnus/vmakarov/build1/trunk5/gcc/libstdc++-v3/libsupc++/tinfo.h:88 197 {*arm_movsi_insn} (expr_list:REG_DEAD (reg/f:SI 183 [ MEM[(const void * const *)obj_ptr_5(D)] ]) (expr_list:REG_DEAD (reg:SI 151 [ D.6620 ]) (nil)))) The patch was successfully bootstrapped on arm-hfp. Richard, is it ok to commit to the trunk? 2013-06-27 Vladimir Makarov * rtlanal.c (must_be_index_p, set_address_index): Add ASHIFTRT and LSHIFTRT. Index: rtlanal.c =================================================================== --- rtlanal.c (revision 200174) +++ rtlanal.c (working copy) @@ -5480,7 +5480,8 @@ must_be_base_p (rtx x) static bool must_be_index_p (rtx x) { - return GET_CODE (x) == MULT || GET_CODE (x) == ASHIFT; + return (GET_CODE (x) == MULT || GET_CODE (x) == ASHIFT + || GET_CODE (x) == ASHIFTRT || GET_CODE (x) == LSHIFTRT); } /* Set the segment part of address INFO to LOC, given that INNER is the @@ -5519,7 +5520,8 @@ set_address_base (struct address_info *i static void set_address_index (struct address_info *info, rtx *loc, rtx *inner) { - if ((GET_CODE (*inner) == MULT || GET_CODE (*inner) == ASHIFT) + if ((GET_CODE (*inner) == MULT || GET_CODE (*inner) == ASHIFT + || GET_CODE (*inner) == ASHIFTRT || GET_CODE (*inner) == LSHIFTRT) && CONSTANT_P (XEXP (*inner, 1))) inner = strip_address_mutations (&XEXP (*inner, 0)); gcc_checking_assert (REG_P (*inner)