From patchwork Wed Apr 27 16:39:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 615742 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qw5Kc57z5z9t4Z for ; Thu, 28 Apr 2016 02:40:04 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=LF1pjDPa; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=jvEwGiQN7N8oOKQ00JunfLNkqMeInr/d72ZBkbd8Dl6eHKRklQctm AuNkyIcJ3uGVFixqDJeKv9mITrgmwPfRK9V9YUZp/XmspzLdLQZ+8FXlYz9KOwAf h/pYfGioK0ZmFf4FnfB3G35YclLDWE0al5Yi9/zPE1K/GiNMm61Z4c= 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:from :to:cc:subject:date:message-id:references:in-reply-to :mime-version:content-type:content-transfer-encoding; s=default; bh=fBpagUygQrdwpxK2HUpehl2u2AE=; b=LF1pjDPaab9tnUFs3XD63T8s0grW CsoqdpikotANPjNiR8SAHXW3kLIEf2cpnNuJBw4xeCiFVs3G9Flbty3zClzx2aLD jK4j2rVItQps0TezlxiKqdgcDqcYtdNSLbgeC9xyN5sZNnp7u4sK8jhE6Q6XdmFm O3CYX7EDozWCiuw= Received: (qmail 118498 invoked by alias); 27 Apr 2016 16:39:52 -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 118484 invoked by uid 89); 27 Apr 2016 16:39:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=CC_C, cc_c, rk, Hx-languages-length:2793 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Apr 2016 16:39:41 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp0213.outbound.protection.outlook.com [213.199.154.213]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-17-WLqicQxYT-W8yRQAHl70qA-1; Wed, 27 Apr 2016 17:39:36 +0100 Received: from AM3PR08MB0088.eurprd08.prod.outlook.com (2a01:111:e400:8847::18) by AM3PR08MB0087.eurprd08.prod.outlook.com (2a01:111:e400:8847::17) with Microsoft SMTP Server (TLS) id 15.1.477.8; Wed, 27 Apr 2016 16:39:34 +0000 Received: from AM3PR08MB0088.eurprd08.prod.outlook.com ([fe80::6049:706:c35b:46b7]) by AM3PR08MB0088.eurprd08.prod.outlook.com ([fe80::6049:706:c35b:46b7%14]) with mapi id 15.01.0477.012; Wed, 27 Apr 2016 16:39:33 +0000 From: Wilco Dijkstra To: James Greenhalgh CC: "gcc-patches@gcc.gnu.org" , nd Subject: Re: [PATCH][AArch64] print_operand should not fallthrough from register operand into generic operand Date: Wed, 27 Apr 2016 16:39:33 +0000 Message-ID: References: , <20160427151338.GC1066@arm.com> In-Reply-To: <20160427151338.GC1066@arm.com> x-ms-office365-filtering-correlation-id: 74884a38-4f88-4c61-3e67-08d36eba8367 x-microsoft-exchange-diagnostics: 1; AM3PR08MB0087; 5:kwJXNE5YVeMm1Pt09b6zKBZ88vpLcFgO6bn5XYp08kqwXMVBqJ/vjV2y9eCWGD5X4NajC5532ukLTm+gSOBtQjSeLJTs0g7JyXt5nGORP9w6ljNapcu37D5NbGEvnBluItLWoHZtgA/MQpg1OGO7Gw==; 24:aSDB4b2l077QSPaUC5uIlSzZWnsXm25TulGirUdIL7XDZuqBTBBMF0ApRRrqdA44ZOfnd1TtYlzT2vBntvAgOPZKcewjKQ9PyHAxcDbxQ0k=; 7:0ZyhXgjjUn2TmJoOWfWw8JRausmis+E7KywZw/nYhRabvRLSe5SqSCt6M/xL44L5B1B1Q6G0FUzGilVVTzDRvfWxD+poPfV0W8cM7YIPCim4g45rbXrDb34PFpgtoqPjbG7ekzDiwg+wsm/l4asdtmqscihQR2c6a0PJzUM/Zg3UJHEImwnnrA0tmZ7+cx8p; 20:O97tNn1S8STZjJXgRylEpUr/EgR0FGX4qhwXQJGstypE8IYHmQvPBAZUwtrUe1xqBOnHhjCANQqATOdSenBL4Sk1tmr3wI4vvNpiR3P2s874OL1IRfIGvMI1e+2nxWJ5+1bKAAufn5n4a8hhsUikKfZY4XmWuIeq68q/XJ6NN14= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM3PR08MB0087; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:AM3PR08MB0087; BCL:0; PCL:0; RULEID:; SRVR:AM3PR08MB0087; x-forefront-prvs: 0925081676 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(24454002)(377424004)(54534003)(5008740100001)(54356999)(106116001)(50986999)(76176999)(2906002)(9686002)(575784001)(6116002)(66066001)(5003600100002)(586003)(1096002)(450100001)(3846002)(1220700001)(189998001)(33656002)(92566002)(2900100001)(87936001)(2950100001)(5002640100001)(5250100002)(102836003)(110136002)(5004730100002)(76576001)(19580395003)(19580405001)(74316001)(4326007)(81166005)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR08MB0087; H:AM3PR08MB0088.eurprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Apr 2016 16:39:33.5832 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR08MB0087 X-MC-Unique: WLqicQxYT-W8yRQAHl70qA-1 James Greenhalgh wrote: > So the part of this patch removing the fallthrough to general operand > is not OK for trunk. > > The other parts look reasonable to me, please resubmit just those. Right, I removed the removal of the fallthrough. Here is the revised version: ChangeLog: 2016-04-27 Wilco Dijkstra gcc/ * config/aarch64/aarch64.md (add3_compareC_cconly_imm): Remove use of %w. (add3_compareC_imm): Likewise. (si3_uxtw): Split into register and immediate variants. (andsi3_compare0_uxtw): Likewise. (and3_compare0): Likewise. (and3nr_compare0): Likewise. (stack_protect_test_): Don't use %x for memory operands. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 19981c205d3e2a6102510647bde9b29906a4fdc9..4e41b3b0f5b2369431ffec1a0029af53fc5aebd9 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1755,7 +1755,7 @@ "aarch64_zero_extend_const_eq (mode, operands[2], mode, operands[1])" "@ - cmn\\t%0, %1 + cmn\\t%0, %1 cmp\\t%0, #%n1" [(set_attr "type" "alus_imm")] ) @@ -1787,11 +1787,11 @@ "aarch64_zero_extend_const_eq (mode, operands[3], mode, operands[2])" "@ - adds\\t%0, %1, %2 + adds\\t%0, %1, %2 subs\\t%0, %1, #%n2" [(set_attr "type" "alus_imm")] ) - + (define_insn "add3_compareC" [(set (reg:CC_C CC_REGNUM) (ne:CC_C @@ -3394,7 +3394,9 @@ (LOGICAL:SI (match_operand:SI 1 "register_operand" "%r,r") (match_operand:SI 2 "aarch64_logical_operand" "r,K"))))] "" - "\\t%w0, %w1, %w2" + "@ + \\t%w0, %w1, %w2 + \\t%w0, %w1, %2" [(set_attr "type" "logic_reg,logic_imm")] ) @@ -3407,7 +3409,9 @@ (set (match_operand:GPI 0 "register_operand" "=r,r") (and:GPI (match_dup 1) (match_dup 2)))] "" - "ands\\t%0, %1, %2" + "@ + ands\\t%0, %1, %2 + ands\\t%0, %1, %2" [(set_attr "type" "logics_reg,logics_imm")] ) @@ -3421,7 +3425,9 @@ (set (match_operand:DI 0 "register_operand" "=r,r") (zero_extend:DI (and:SI (match_dup 1) (match_dup 2))))] "" - "ands\\t%w0, %w1, %w2" + "@ + ands\\t%w0, %w1, %w2 + ands\\t%w0, %w1, %2" [(set_attr "type" "logics_reg,logics_imm")] ) @@ -3775,7 +3781,9 @@ (match_operand:GPI 1 "aarch64_logical_operand" "r,")) (const_int 0)))] "" - "tst\\t%0, %1" + "@ + tst\\t%0, %1 + tst\\t%0, %1" [(set_attr "type" "logics_reg,logics_imm")] ) @@ -5170,7 +5178,7 @@ UNSPEC_SP_TEST)) (clobber (match_scratch:PTR 3 "=&r"))] "" - "ldr\t%3, %x1\;ldr\t%0, %x2\;eor\t%0, %3, %0" + "ldr\t%3, %1\;ldr\t%0, %2\;eor\t%0, %3, %0" [(set_attr "length" "12") (set_attr "type" "multiple")])