From patchwork Tue Sep 13 18:03:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 114527 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 34235B71C5 for ; Wed, 14 Sep 2011 04:04:24 +1000 (EST) Received: (qmail 2620 invoked by alias); 13 Sep 2011 18:04:18 -0000 Received: (qmail 2608 invoked by uid 22791); 13 Sep 2011 18:04:17 -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 18:03:59 +0000 Received: by wyf19 with SMTP id 19so810742wyf.20 for ; Tue, 13 Sep 2011 11:03:58 -0700 (PDT) Received: by 10.227.38.22 with SMTP id z22mr2985020wbd.7.1315937037978; Tue, 13 Sep 2011 11:03:57 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk. [82.133.89.107]) by mx.google.com with ESMTPS id fa3sm1276962wbb.3.2011.09.13.11.03.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Sep 2011 11:03:57 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, hpenner@de.ibm.com, uweigand@de.ibm.com, Andreas.Krebbel@de.ibm.com, rdsandiford@googlemail.com Cc: hpenner@de.ibm.com, uweigand@de.ibm.com, Andreas.Krebbel@de.ibm.com Subject: [S390] Use match_test rather than eq/ne symbol_ref Date: Tue, 13 Sep 2011 19:03:55 +0100 Message-ID: <87wrdc5ng4.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 s390-linux-gnu, and that there were no changes in the assembly output for the C and C++ testsuite. OK to install? Richard gcc/ * config/s390/s390.md: Use match_test rather than eq/ne symbol_ref throughout file. Index: gcc/config/s390/s390.md =================================================================== --- gcc/config/s390/s390.md 2011-09-13 18:43:39.000000000 +0100 +++ gcc/config/s390/s390.md 2011-09-13 19:02:44.000000000 +0100 @@ -283,31 +283,31 @@ (define_attr "enabled" "" (const_int 1) (and (eq_attr "cpu_facility" "ieee") - (ne (symbol_ref "TARGET_CPU_IEEE_FLOAT") (const_int 0))) + (match_test "TARGET_CPU_IEEE_FLOAT")) (const_int 1) (and (eq_attr "cpu_facility" "zarch") - (ne (symbol_ref "TARGET_ZARCH") (const_int 0))) + (match_test "TARGET_ZARCH")) (const_int 1) (and (eq_attr "cpu_facility" "longdisp") - (ne (symbol_ref "TARGET_LONG_DISPLACEMENT") (const_int 0))) + (match_test "TARGET_LONG_DISPLACEMENT")) (const_int 1) (and (eq_attr "cpu_facility" "extimm") - (ne (symbol_ref "TARGET_EXTIMM") (const_int 0))) + (match_test "TARGET_EXTIMM")) (const_int 1) (and (eq_attr "cpu_facility" "dfp") - (ne (symbol_ref "TARGET_DFP") (const_int 0))) + (match_test "TARGET_DFP")) (const_int 1) (and (eq_attr "cpu_facility" "z10") - (ne (symbol_ref "TARGET_Z10") (const_int 0))) + (match_test "TARGET_Z10")) (const_int 1) (and (eq_attr "cpu_facility" "z196") - (ne (symbol_ref "TARGET_Z196") (const_int 0))) + (match_test "TARGET_Z196")) (const_int 1)] (const_int 0))) @@ -7726,7 +7726,7 @@ (define_insn "*cjump_31" [(set_attr "op_type" "RI") (set_attr "type" "branch") (set (attr "length") - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) + (if_then_else (not (match_test "flag_pic")) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) (const_int 4) (const_int 6)) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) @@ -7789,7 +7789,7 @@ (define_insn "*icjump_31" [(set_attr "op_type" "RI") (set_attr "type" "branch") (set (attr "length") - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) + (if_then_else (not (match_test "flag_pic")) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) (const_int 4) (const_int 6)) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) @@ -8170,7 +8170,7 @@ (define_insn_and_split "doloop_si31" (set_attr "z10prop" "z10_super_E1") (set_attr "type" "branch") (set (attr "length") - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) + (if_then_else (not (match_test "flag_pic")) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) (const_int 4) (const_int 6)) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) @@ -8282,7 +8282,7 @@ (define_insn "*jump31" [(set_attr "op_type" "RI") (set_attr "type" "branch") (set (attr "length") - (if_then_else (eq (symbol_ref "flag_pic") (const_int 0)) + (if_then_else (not (match_test "flag_pic")) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) (const_int 4) (const_int 6)) (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000)) @@ -9102,7 +9102,7 @@ (define_insn "main_pool" gcc_unreachable (); } [(set (attr "type") - (if_then_else (ne (symbol_ref "TARGET_CPU_ZARCH") (const_int 0)) + (if_then_else (match_test "TARGET_CPU_ZARCH") (const_string "larl") (const_string "la")))]) (define_insn "reload_base_31"