From patchwork Fri Aug 17 09:48:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 178179 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 64C922C0089 for ; Fri, 17 Aug 2012 19:55:12 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1345802112; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Subject:Date:Message-ID:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=ssB9QFBlVQMM4ZsBKDih PypAz8U=; b=mhungdEawebfhNiGI7IFbRwEUtVtGjmhMEH5QMBY3/5eX+uQCkcL YVYHuUtpPLm0nSS3qUFbhoMqUgbGZMBRTc/cbkcDPCaKDTqh2mb4ZZxfIeuhtAYA 7E7ixpOTRJT6RmnmdLNE4UQHyObQz+b9u36oc/RZVivEfkAd96GD5yw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=vTHN2Jz0xBX+cqMd5IAUosvdAs5jq1AlPPGsV2lzvqGettZWOGTwDMC5Zs+xiR kjk2g/QiZP29X0jnCvrruDa/aW6dc0AASOZnsA1lWEjosiGQRfZRljgyb1Df0ngY K5zL74kHyPrKn6P7gKYQt4XSp+jhknV9wRbYqymb2oLDU=; Received: (qmail 4081 invoked by alias); 17 Aug 2012 09:54:49 -0000 Received: (qmail 3882 invoked by uid 22791); 17 Aug 2012 09:54:45 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Aug 2012 09:54:25 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7H9sO9x031047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 17 Aug 2012 05:54:25 -0400 Received: from Cadeux.redhat.com (vpn1-6-38.ams2.redhat.com [10.36.6.38]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7H9sCaW022120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 17 Aug 2012 05:54:20 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: Commit: IQ2000: Remove modes from Date: Fri, 17 Aug 2012 10:48:25 +0100 Message-ID: <87pq6psvbq.fsf@redhat.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 Hi Guys, I am applying the patch below to fix some problems building an iq2000-elf toolchain. The main problem is that the conditional branch patterns were specifying a mode for the comparison operator, which then fails to match the rtl generated by the compiler. The other problem is that the two extend-and-compare patterns were running into reload problems when building libstdc++-v3. I have disabled them until I have time to investigate further. Cheers Nick gcc/ChangeLog 2012-08-17 Nick Clifton * config/iq2000/iq2000.md (cbranchsi4): Remove mode from comparison and label. (branch_zero): Likewise. (branch_zero_inverted): Likewise. (branch_equality): Likewise. (branch_equality_inverted): Likewise. (extend-and-compare): Disable until reload issues can be resolved. * config/iq2000/iq2000.c (gen_conditional_branch): Use VOIDmode for comparison. (iq2000_function_arg_advance): Remove CONST_CAST2. Index: gcc/config/iq2000/iq2000.md =================================================================== --- gcc/config/iq2000/iq2000.md (revision 190466) +++ gcc/config/iq2000/iq2000.md (working copy) @@ -1001,10 +1001,10 @@ (define_expand "cbranchsi4" [(set (pc) (if_then_else - (match_operator:SI 0 "ordered_comparison_operator" - [(match_operand:SI 1 "register_operand") - (match_operand:SI 2 "reg_or_const_operand")]) - (label_ref (match_operand:SI 3 "")) + (match_operator 0 "ordered_comparison_operator" + [(match_operand:SI 1 "register_operand") + (match_operand:SI 2 "reg_or_const_operand")]) + (label_ref (match_operand 3 "")) (pc)))] "" " @@ -1019,9 +1019,9 @@ (define_insn "branch_zero" [(set (pc) (if_then_else - (match_operator:SI 0 "cmp_op" - [(match_operand:SI 2 "register_operand" "d") - (const_int 0)]) + (match_operator 0 "cmp_op" + [(match_operand:SI 2 "register_operand" "d") + (const_int 0)]) (label_ref (match_operand 1 "" "")) (pc)))] "" @@ -1040,9 +1040,9 @@ (define_insn "branch_zero_inverted" [(set (pc) (if_then_else - (match_operator:SI 0 "cmp_op" - [(match_operand:SI 2 "register_operand" "d") - (const_int 0)]) + (match_operator 0 "cmp_op" + [(match_operand:SI 2 "register_operand" "d") + (const_int 0)]) (pc) (label_ref (match_operand 1 "" ""))))] "" @@ -1063,9 +1063,9 @@ (define_insn "branch_equality" [(set (pc) (if_then_else - (match_operator:SI 0 "equality_op" - [(match_operand:SI 2 "register_operand" "d") - (match_operand:SI 3 "register_operand" "d")]) + (match_operator 0 "equality_op" + [(match_operand:SI 2 "register_operand" "d") + (match_operand:SI 3 "register_operand" "d")]) (label_ref (match_operand 1 "" "")) (pc)))] "" @@ -1084,9 +1084,9 @@ (define_insn "branch_equality_inverted" [(set (pc) (if_then_else - (match_operator:SI 0 "equality_op" - [(match_operand:SI 2 "register_operand" "d") - (match_operand:SI 3 "register_operand" "d")]) + (match_operator 0 "equality_op" + [(match_operand:SI 2 "register_operand" "d") + (match_operand:SI 3 "register_operand" "d")]) (pc) (label_ref (match_operand 1 "" ""))))] "" @@ -1145,7 +1145,7 @@ (const_int 0)) (match_operand 2 "pc_or_label_operand" "") (match_operand 3 "pc_or_label_operand" "")))] - "" + "0" "bb%A2\\t%0(31-%1),%P2%P3" [(set_attr "length" "4") (set_attr "type" "branch")]) @@ -1159,7 +1159,7 @@ (const_int 0)) (match_operand 2 "pc_or_label_operand" "") (match_operand 3 "pc_or_label_operand" "")))] - "" + "0" "bb%A3\\t%0(31-%1),%P2%P3" [(set_attr "length" "4") (set_attr "type" "branch")]) Index: gcc/config/iq2000/iq2000.c =================================================================== --- gcc/config/iq2000/iq2000.c (revision 190466) +++ gcc/config/iq2000/iq2000.c (working copy) @@ -1076,7 +1076,7 @@ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, gen_rtx_IF_THEN_ELSE (VOIDmode, gen_rtx_fmt_ee (test_code, - mode, + VOIDmode, cmp0, cmp1), label1, label2))); } @@ -1140,7 +1140,7 @@ "function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ", cum->gp_reg_found, cum->arg_number, cum->arg_words, GET_MODE_NAME (mode)); - fprintf (stderr, "%p", CONST_CAST2 (void *, const_tree, type)); + fprintf (stderr, "%p", type); fprintf (stderr, ", %d )\n\n", named); }