From patchwork Tue Jun 25 16:04:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yufeng Zhang X-Patchwork-Id: 254218 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 E04ED2C0077 for ; Wed, 26 Jun 2013 02:04:42 +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=lrwQzZVSBeZNIB5x0QDf476mImIDzm8Rx565vqAVLLL JrPnF4OL1ib0otLXQrtTOHycIqBf+Dlxq/SzNhgRsQFC1IdF+r8dHtHYJxlGX9Gs sdS33W3jOjS27WbdS27jpolAoBsXErnvad9xPS7G1bFU6FiMld14PL7GZn+dFTCo = 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=Lcub3QeRiKf/9xbyDEmVVSiw1jQ=; b=mTLXoM8ZeOhv9oVj4 mLW/w3mRKsOJUSOWr1uODg9vBODYXTDd6QFZs98PhHuHhMtVSeZ8SS7MJM+k7/54 HXDP9lgGYbBHDArucoWkYqq/fLt+pj49NRjJXOSEGpV56PrgBm6b9Z9Xe5G+ipA1 QzMm026PCihEA6OdAl1cK+w4ns= Received: (qmail 27299 invoked by alias); 25 Jun 2013 16:04:09 -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 27236 invoked by uid 89); 25 Jun 2013 16:04:08 -0000 X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 25 Jun 2013 16:04:07 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 25 Jun 2013 17:04:04 +0100 Received: from [10.1.201.52] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 25 Jun 2013 17:04:03 +0100 Message-ID: <51C9BF73.4090001@arm.com> Date: Tue, 25 Jun 2013 17:04:03 +0100 From: Yufeng Zhang User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Marcus Shawcroft Subject: [PATCH, AArch64] Minor refactoring of aarch64_add_offset X-MC-Unique: 113062517040407701 X-Virus-Found: No This patch carries out minor refactoring on aarch64_add_offset; it replaces 'DImode' and 'Pmode' with 'mode'. OK for the trunk? Thanks, Yufeng gcc/ * config/aarch64/aarch64.c (aarch64_add_offset): Change to pass 'mode' to aarch64_plus_immediate and gen_rtx_PLUS. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 527b00d..81c6fd9 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -804,7 +804,7 @@ aarch64_force_temporary (rtx x, rtx value) static rtx aarch64_add_offset (enum machine_mode mode, rtx temp, rtx reg, HOST_WIDE_INT offset) { - if (!aarch64_plus_immediate (GEN_INT (offset), DImode)) + if (!aarch64_plus_immediate (GEN_INT (offset), mode)) { rtx high; /* Load the full offset into a register. This @@ -812,7 +812,7 @@ aarch64_add_offset (enum machine_mode mode, rtx temp, rtx reg, HOST_WIDE_INT off high = GEN_INT (offset); offset = 0; high = aarch64_force_temporary (temp, high); - reg = aarch64_force_temporary (temp, gen_rtx_PLUS (Pmode, high, reg)); + reg = aarch64_force_temporary (temp, gen_rtx_PLUS (mode, high, reg)); } return plus_constant (mode, reg, offset); }