From patchwork Tue Jun 25 20:22:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 1122257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-503719-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="OAf5kasD"; dkim-atps=neutral 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 45YHn56nQPz9s3l for ; Wed, 26 Jun 2019 06:28:57 +1000 (AEST) 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:in-reply-to:references:in-reply-to :references:message-id; q=dns; s=default; b=W05svtl33Rl8DkxozlNJ hHnj9A/syNcvGlasYEHGZHNjmOYjxalgub0ZoZa27G/zPe3FKppn6qlJcMoTTlnW gxwyBIhx+Ug+oRnFP1IlW8vx2FzqEgH26hKCmxu4BWbKFBMJO6MJ/pk7sEi/d0IO MFfck0AqJFVJLZ6xS8BCbUs= 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:in-reply-to:references:in-reply-to :references:message-id; s=default; bh=ItVaSXML+dsDOnRZHP3l80BGS7 Y=; b=OAf5kasD+/V9m3og7b6uWO2m4OCqYa1FAF8wTwiyxVwf8kRL820XwDhnE+ EoXQ4Wl0QIwhN/PRYTlIZ3RkF8Y6jUszQFAGdqXtmR/D68+isdRNxQY9pdw9Mm2m Vbsl9KxhFESJaCJnNQ8fQRVja32G0tRH2zzyuAWtk8Pesjw4s= Received: (qmail 56757 invoked by alias); 25 Jun 2019 20:28:50 -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 56745 invoked by uid 89); 25 Jun 2019 20:28:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=desta X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Jun 2019 20:28:48 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5PKQgb1127549 for ; Tue, 25 Jun 2019 16:28:47 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tbs8fug3y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 25 Jun 2019 16:28:47 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Jun 2019 21:28:46 +0100 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 25 Jun 2019 21:28:44 +0100 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PKShrO52756766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 20:28:43 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A21D5124053; Tue, 25 Jun 2019 20:28:43 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85FAC124052; Tue, 25 Jun 2019 20:28:43 +0000 (GMT) Received: from genoa.aus.stglabs.ibm.com (unknown [9.40.192.157]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 25 Jun 2019 20:28:43 +0000 (GMT) Received: by genoa.aus.stglabs.ibm.com (Postfix, from userid 1025) id 48ACDA60E3E; Tue, 25 Jun 2019 15:28:42 -0500 (CDT) From: acsawdey@linux.ibm.com To: gcc-patches@gcc.gnu.org Cc: segher@kernel.crashing.org, wschmidt@linux.ibm.com, dje.gcc@gmail.com, acsawdey@linux.ibm.com Subject: [PATCH 14/30] Changes to m32c Date: Tue, 25 Jun 2019 15:22:23 -0500 In-Reply-To: References: In-Reply-To: References: x-cbid: 19062520-0060-0000-0000-00000355743A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011329; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01223212; UDB=6.00643701; IPR=6.01004384; MB=3.00027467; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-25 20:28:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062520-0061-0000-0000-000049E7D3DE Message-Id: <9a2e6c36e5caefeafc69af5d413a379264af1461.1561408899.git.acsawdey@linux.ibm.com> X-IsSubscribed: yes From: Aaron Sawdey * config/m32c/blkmov.md (movmemhi, movmemhi_bhi_op, movmemhi_bpsi_op, movmemhi_whi_op, movmemhi_wpsi_op): Change movmem to cpymem. * config/m32c/m32c-protos.h: Change movmem to cpymem. * config/m32c/m32c.c (m32c_expand_movmemhi): Change movmem to cpymem. --- gcc/config/m32c/blkmov.md | 12 ++++++------ gcc/config/m32c/m32c-protos.h | 2 +- gcc/config/m32c/m32c.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gcc/config/m32c/blkmov.md b/gcc/config/m32c/blkmov.md index d7da439..e5cdc80 100644 --- a/gcc/config/m32c/blkmov.md +++ b/gcc/config/m32c/blkmov.md @@ -40,14 +40,14 @@ ;; 1 = source (mem:BLK ...) ;; 2 = count ;; 3 = alignment -(define_expand "movmemhi" +(define_expand "cpymemhi" [(match_operand 0 "ap_operand" "") (match_operand 1 "ap_operand" "") (match_operand 2 "m32c_r3_operand" "") (match_operand 3 "" "") ] "" - "if (m32c_expand_movmemhi(operands)) DONE; FAIL;" + "if (m32c_expand_cpymemhi(operands)) DONE; FAIL;" ) ;; We can't use mode iterators for these because M16C uses r1h to extend @@ -60,7 +60,7 @@ ;; 3 = dest (in) ;; 4 = src (in) ;; 5 = count (in) -(define_insn "movmemhi_bhi_op" +(define_insn "cpymemhi_bhi_op" [(set (mem:QI (match_operand:HI 3 "ap_operand" "0")) (mem:QI (match_operand:HI 4 "ap_operand" "1"))) (set (match_operand:HI 2 "m32c_r3_operand" "=R3w") @@ -75,7 +75,7 @@ "TARGET_A16" "mov.b:q\t#0,r1h\n\tsmovf.b\t; %0[0..%2-1]=r1h%1[]" ) -(define_insn "movmemhi_bpsi_op" +(define_insn "cpymemhi_bpsi_op" [(set (mem:QI (match_operand:PSI 3 "ap_operand" "0")) (mem:QI (match_operand:PSI 4 "ap_operand" "1"))) (set (match_operand:HI 2 "m32c_r3_operand" "=R3w") @@ -89,7 +89,7 @@ "TARGET_A24" "smovf.b\t; %0[0..%2-1]=%1[]" ) -(define_insn "movmemhi_whi_op" +(define_insn "cpymemhi_whi_op" [(set (mem:HI (match_operand:HI 3 "ap_operand" "0")) (mem:HI (match_operand:HI 4 "ap_operand" "1"))) (set (match_operand:HI 2 "m32c_r3_operand" "=R3w") @@ -104,7 +104,7 @@ "TARGET_A16" "mov.b:q\t#0,r1h\n\tsmovf.w\t; %0[0..%2-1]=r1h%1[]" ) -(define_insn "movmemhi_wpsi_op" +(define_insn "cpymemhi_wpsi_op" [(set (mem:HI (match_operand:PSI 3 "ap_operand" "0")) (mem:HI (match_operand:PSI 4 "ap_operand" "1"))) (set (match_operand:HI 2 "m32c_r3_operand" "=R3w") diff --git a/gcc/config/m32c/m32c-protos.h b/gcc/config/m32c/m32c-protos.h index 7d4d478..fe926fd 100644 --- a/gcc/config/m32c/m32c-protos.h +++ b/gcc/config/m32c/m32c-protos.h @@ -43,7 +43,7 @@ void m32c_emit_eh_epilogue (rtx); int m32c_expand_cmpstr (rtx *); int m32c_expand_insv (rtx *); int m32c_expand_movcc (rtx *); -int m32c_expand_movmemhi (rtx *); +int m32c_expand_cpymemhi (rtx *); int m32c_expand_movstr (rtx *); void m32c_expand_neg_mulpsi3 (rtx *); int m32c_expand_setmemhi (rtx *); diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c index 1a0d0c68..d0d24bb 100644 --- a/gcc/config/m32c/m32c.c +++ b/gcc/config/m32c/m32c.c @@ -3592,7 +3592,7 @@ m32c_expand_setmemhi(rtx *operands) addresses, not [mem] syntax. $0 is the destination (MEM:BLK), $1 is the source (MEM:BLK), and $2 the count (HI). */ int -m32c_expand_movmemhi(rtx *operands) +m32c_expand_cpymemhi(rtx *operands) { rtx desta, srca, count; rtx desto, srco, counto; @@ -3620,9 +3620,9 @@ m32c_expand_movmemhi(rtx *operands) { count = copy_to_mode_reg (HImode, GEN_INT (INTVAL (count) / 2)); if (TARGET_A16) - emit_insn (gen_movmemhi_whi_op (desto, srco, counto, desta, srca, count)); + emit_insn (gen_cpymemhi_whi_op (desto, srco, counto, desta, srca, count)); else - emit_insn (gen_movmemhi_wpsi_op (desto, srco, counto, desta, srca, count)); + emit_insn (gen_cpymemhi_wpsi_op (desto, srco, counto, desta, srca, count)); return 1; } @@ -3632,9 +3632,9 @@ m32c_expand_movmemhi(rtx *operands) count = copy_to_mode_reg (HImode, count); if (TARGET_A16) - emit_insn (gen_movmemhi_bhi_op (desto, srco, counto, desta, srca, count)); + emit_insn (gen_cpymemhi_bhi_op (desto, srco, counto, desta, srca, count)); else - emit_insn (gen_movmemhi_bpsi_op (desto, srco, counto, desta, srca, count)); + emit_insn (gen_cpymemhi_bpsi_op (desto, srco, counto, desta, srca, count)); return 1; }