From patchwork Thu Jun 27 16:32:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 255109 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 233172C007B for ; Fri, 28 Jun 2013 02:32:16 +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:subject:references :in-reply-to:content-type; q=dns; s=default; b=ZNE/0XC25jCvC+mF8 c2UfaWYqdqup/g3CcGE+ydjUzhfs3/GM+y8q4kXnyfnxjFF+3DYTtfiHTxHZWZR0 ld4qaoOtA4vg77pHFHb2nmchenDMClI2y2rGNP675A3EHJqy4Cc/hntGgBp8CelN bsWV7eZcHowHnROiB4VM9UBPGs= 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:subject:references :in-reply-to:content-type; s=default; bh=rc6wLAqBAnxkhL5/uNl924t oHAQ=; b=TTCw2t2wjjL/iLQwBGVONdpnyE1KXS/XEJ3nuRfKdLolG7+a2ZItVzV UoJmEgYFSkGsjiTQ6Bg05UMyqZiAWSBug3vL18gLAnQUby37Uu2XslrBIAts5m6m m10N4IOazDxmzj26InCLittZNfjgrHl/WvEefMV2oYMjHpzYWbP8= Received: (qmail 2511 invoked by alias); 27 Jun 2013 16:32:11 -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 2501 invoked by uid 89); 27 Jun 2013 16:32:11 -0000 X-Spam-SWARE-Status: No, score=-7.9 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, 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 16:32:10 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5RGW8rh022680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Jun 2013 12:32:09 -0400 Received: from topor.usersys.redhat.com ([10.15.16.142]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5RGW8Ex003381; Thu, 27 Jun 2013 12:32:08 -0400 Message-ID: <51CC6908.1040005@redhat.com> Date: Thu, 27 Jun 2013 12:32:08 -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 , rdsandiford@googlemail.com Subject: RFA: patch to build GCC for arm with LRA References: <51CC6077.6050401@redhat.com> <8738s3cyx5.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> In-Reply-To: <8738s3cyx5.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> X-Virus-Found: No On 06/27/2013 12:15 PM, Richard Sandiford wrote: > Vladimir Makarov writes: >> Richard, is it ok to commit to the trunk? > Looks good to me, but I gave up the right to approve it. I think you > need ROTATERT too though (see arm_legitimate_index_p). > > Also, sorry for the nitpick, but once the full condition overflows one line, > I think each == test should be on its own line. > > Thanks for the comments. Here is the new version of the patch: 2013-06-27 Vladimir Makarov * rtlanal.c (must_be_index_p, set_address_index): Add ASHIFTRT, LSHIFTRT, and ROTATERT. Index: rtlanal.c =================================================================== --- rtlanal.c (revision 200174) +++ rtlanal.c (working copy) @@ -5480,7 +5480,11 @@ 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 + || GET_CODE (x) == ROTATERT); } /* Set the segment part of address INFO to LOC, given that INNER is the @@ -5519,7 +5523,11 @@ 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 + || GET_CODE (*inner) == ROTATERT) && CONSTANT_P (XEXP (*inner, 1))) inner = strip_address_mutations (&XEXP (*inner, 0)); gcc_checking_assert (REG_P (*inner)