From patchwork Tue Sep 13 17:54:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 114520 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 4BE09B71C5 for ; Wed, 14 Sep 2011 03:55:24 +1000 (EST) Received: (qmail 25386 invoked by alias); 13 Sep 2011 17:55:16 -0000 Received: (qmail 25369 invoked by uid 22791); 13 Sep 2011 17:55:14 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Sep 2011 17:54:56 +0000 Received: by wyf19 with SMTP id 19so802235wyf.20 for ; Tue, 13 Sep 2011 10:54:55 -0700 (PDT) Received: by 10.216.80.70 with SMTP id j48mr1275104wee.29.1315936494789; Tue, 13 Sep 2011 10:54:54 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk. [82.133.89.107]) by mx.google.com with ESMTPS id fd4sm1211368wbb.21.2011.09.13.10.54.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Sep 2011 10:54:54 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, nickc@redhat.com, rdsandiford@googlemail.com Cc: nickc@redhat.com Subject: [M32R] Use match_test rather than eq/ne symbol_ref Date: Tue, 13 Sep 2011 18:54:51 +0100 Message-ID: <87r53k72fo.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 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 As per the subject. Tested by making sure that there were no new warnings building m32r-elf, and that there were no changes in the assembly output for the C and C++ testsuite. OK to install? Richard gcc/ * config/m32r/m32r.md: Use match_test rather than eq/ne symbol_ref throughout file. Index: gcc/config/m32r/m32r.md =================================================================== --- gcc/config/m32r/m32r.md 2011-09-13 18:43:39.000000000 +0100 +++ gcc/config/m32r/m32r.md 2011-09-13 18:53:40.000000000 +0100 @@ -69,9 +69,9 @@ (define_attr "insn_size" "short,long" ;; The target CPU we're compiling for. (define_attr "cpu" "m32r,m32r2,m32rx" - (cond [(ne (symbol_ref "TARGET_M32RX") (const_int 0)) + (cond [(match_test "TARGET_M32RX") (const_string "m32rx") - (ne (symbol_ref "TARGET_M32R2") (const_int 0)) + (match_test "TARGET_M32R2") (const_string "m32r2")] (const_string "m32r"))) @@ -2012,8 +2012,7 @@ (define_insn "*call_via_label" }" [(set_attr "type" "call") (set (attr "length") - (if_then_else (eq (symbol_ref "call26_operand (operands[0], FUNCTION_MODE)") - (const_int 0)) + (if_then_else (not (match_test "call26_operand (operands[0], FUNCTION_MODE)")) (const_int 12) ; 10 + 2 for nop filler ; The return address must be on a 4 byte boundary so ; there's no point in using a value of 2 here. A 2 byte @@ -2072,8 +2071,7 @@ (define_insn "*call_value_via_label" }" [(set_attr "type" "call") (set (attr "length") - (if_then_else (eq (symbol_ref "call26_operand (operands[1], FUNCTION_MODE)") - (const_int 0)) + (if_then_else (not (match_test "call26_operand (operands[1], FUNCTION_MODE)")) (const_int 12) ; 10 + 2 for nop filler ; The return address must be on a 4 byte boundary so ; there's no point in using a value of 2 here. A 2 byte