From patchwork Tue Jun 25 20:22:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 1122263 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-503725-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="c1m5uRDE"; 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 45YHrR3pX2z9s3l for ; Wed, 26 Jun 2019 06:31:51 +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=V+cIU0QyMYq8MlpheXpH Ui+8Y7wKvpDWEpqqH3WgUlLxyPnOqKnlb7iSQamRM/pnK1oHZWDhUjAqWZ5sveQd qmHrQoByQk68bv4+Attl34/Ch1J3p+eGZxPe10MbVPjxvk7JEiEtA3yDdc2+k/OA EbWg6bgjCiwscGVRQdql2Go= 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=hEe50ZJPfcuqKtXixqiAUYbR+8 E=; b=c1m5uRDEZgnvANbNJ+klSD9Q2gUXRsstku+VGDSYZ/ThA8XBDimoL3cnQY TK/UePHdvCDjmt5ItD+oJOZv+RlviBP+PK3ynudaktw9nf0rKsbfc0kbCzKXjAEm hiT8GLMnKOLAN87ZU8UfoRIWaLvINS0EcdCdkF+QI1RozH7AE= Received: (qmail 67341 invoked by alias); 25 Jun 2019 20:31:18 -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 67286 invoked by uid 89); 25 Jun 2019 20:31:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= 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:31:16 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5PKQgIj051777 for ; Tue, 25 Jun 2019 16:31:14 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tbrybc00f-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 25 Jun 2019 16:31:14 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Jun 2019 21:31:13 +0100 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e35.co.us.ibm.com (192.168.1.135) 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:31:11 +0100 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PKVAnw49611142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 20:31:10 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 25B386E053; Tue, 25 Jun 2019 20:31:10 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 091776E059; Tue, 25 Jun 2019 20:31:09 +0000 (GMT) Received: from genoa.aus.stglabs.ibm.com (unknown [9.40.192.157]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 25 Jun 2019 20:31:09 +0000 (GMT) Received: by genoa.aus.stglabs.ibm.com (Postfix, from userid 1025) id CDB8AA60E3E; Tue, 25 Jun 2019 15:31:08 -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, jasonwucj@gmail.com Subject: [PATCH 19/30] Changes to nds32 Date: Tue, 25 Jun 2019 15:22:28 -0500 In-Reply-To: References: In-Reply-To: References: x-cbid: 19062520-0012-0000-0000-00001748FDAD 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.01223213; UDB=6.00643702; IPR=6.01004385; MB=3.00027467; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-25 20:31:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062520-0013-0000-0000-000057D502E1 Message-Id: <658aededbdcea2a07c5a13b2641b81dafd62b849.1561408899.git.acsawdey@linux.ibm.com> X-IsSubscribed: yes From: Aaron Sawdey * config/nds32/nds32-memory-manipulation.c (nds32_expand_movmemsi_loop_unknown_size, nds32_expand_movmemsi_loop_known_size, nds32_expand_movmemsi_loop, nds32_expand_movmemsi_unroll, nds32_expand_movmemsi): Change movmem to cpymem. * config/nds32/nds32-multiple.md (movmemsi): Change name to cpymemsi. * config/nds32/nds32-protos.h: Change movmem to cpymem. --- gcc/config/nds32/nds32-memory-manipulation.c | 30 ++++++++++++++-------------- gcc/config/nds32/nds32-multiple.md | 4 ++-- gcc/config/nds32/nds32-protos.h | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/config/nds32/nds32-memory-manipulation.c b/gcc/config/nds32/nds32-memory-manipulation.c index 71b75dc..b3f2cd6 100644 --- a/gcc/config/nds32/nds32-memory-manipulation.c +++ b/gcc/config/nds32/nds32-memory-manipulation.c @@ -1,4 +1,4 @@ -/* Auxiliary functions for expand movmem, setmem, cmpmem, load_multiple +/* Auxiliary functions for expand cpymem, setmem, cmpmem, load_multiple and store_multiple pattern of Andes NDS32 cpu for GNU compiler Copyright (C) 2012-2019 Free Software Foundation, Inc. Contributed by Andes Technology Corporation. @@ -120,14 +120,14 @@ nds32_emit_mem_move_block (int base_regno, int count, /* ------------------------------------------------------------------------ */ -/* Auxiliary function for expand movmem pattern. */ +/* Auxiliary function for expand cpymem pattern. */ static bool -nds32_expand_movmemsi_loop_unknown_size (rtx dstmem, rtx srcmem, +nds32_expand_cpymemsi_loop_unknown_size (rtx dstmem, rtx srcmem, rtx size, rtx alignment) { - /* Emit loop version of movmem. + /* Emit loop version of cpymem. andi $size_least_3_bit, $size, #~7 add $dst_end, $dst, $size @@ -254,7 +254,7 @@ nds32_expand_movmemsi_loop_unknown_size (rtx dstmem, rtx srcmem, } static bool -nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem, +nds32_expand_cpymemsi_loop_known_size (rtx dstmem, rtx srcmem, rtx size, rtx alignment) { rtx dst_base_reg, src_base_reg; @@ -288,7 +288,7 @@ nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem, if (total_bytes < 8) { - /* Emit total_bytes less than 8 loop version of movmem. + /* Emit total_bytes less than 8 loop version of cpymem. add $dst_end, $dst, $size move $dst_itr, $dst .Lbyte_mode_loop: @@ -321,7 +321,7 @@ nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem, } else if (total_bytes % 8 == 0) { - /* Emit multiple of 8 loop version of movmem. + /* Emit multiple of 8 loop version of cpymem. add $dst_end, $dst, $size move $dst_itr, $dst @@ -370,7 +370,7 @@ nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem, else { /* Handle size greater than 8, and not a multiple of 8. */ - return nds32_expand_movmemsi_loop_unknown_size (dstmem, srcmem, + return nds32_expand_cpymemsi_loop_unknown_size (dstmem, srcmem, size, alignment); } @@ -378,19 +378,19 @@ nds32_expand_movmemsi_loop_known_size (rtx dstmem, rtx srcmem, } static bool -nds32_expand_movmemsi_loop (rtx dstmem, rtx srcmem, +nds32_expand_cpymemsi_loop (rtx dstmem, rtx srcmem, rtx size, rtx alignment) { if (CONST_INT_P (size)) - return nds32_expand_movmemsi_loop_known_size (dstmem, srcmem, + return nds32_expand_cpymemsi_loop_known_size (dstmem, srcmem, size, alignment); else - return nds32_expand_movmemsi_loop_unknown_size (dstmem, srcmem, + return nds32_expand_cpymemsi_loop_unknown_size (dstmem, srcmem, size, alignment); } static bool -nds32_expand_movmemsi_unroll (rtx dstmem, rtx srcmem, +nds32_expand_cpymemsi_unroll (rtx dstmem, rtx srcmem, rtx total_bytes, rtx alignment) { rtx dst_base_reg, src_base_reg; @@ -533,13 +533,13 @@ nds32_expand_movmemsi_unroll (rtx dstmem, rtx srcmem, This is auxiliary extern function to help create rtx template. Check nds32-multiple.md file for the patterns. */ bool -nds32_expand_movmemsi (rtx dstmem, rtx srcmem, rtx total_bytes, rtx alignment) +nds32_expand_cpymemsi (rtx dstmem, rtx srcmem, rtx total_bytes, rtx alignment) { - if (nds32_expand_movmemsi_unroll (dstmem, srcmem, total_bytes, alignment)) + if (nds32_expand_cpymemsi_unroll (dstmem, srcmem, total_bytes, alignment)) return true; if (!optimize_size && optimize > 2) - return nds32_expand_movmemsi_loop (dstmem, srcmem, total_bytes, alignment); + return nds32_expand_cpymemsi_loop (dstmem, srcmem, total_bytes, alignment); return false; } diff --git a/gcc/config/nds32/nds32-multiple.md b/gcc/config/nds32/nds32-multiple.md index a1e10c0..98d9508 100644 --- a/gcc/config/nds32/nds32-multiple.md +++ b/gcc/config/nds32/nds32-multiple.md @@ -3751,14 +3751,14 @@ ;; operands[3] is the known shared alignment. -(define_expand "movmemsi" +(define_expand "cpymemsi" [(match_operand:BLK 0 "general_operand" "") (match_operand:BLK 1 "general_operand" "") (match_operand:SI 2 "nds32_reg_constant_operand" "") (match_operand:SI 3 "const_int_operand" "")] "" { - if (nds32_expand_movmemsi (operands[0], + if (nds32_expand_cpymemsi (operands[0], operands[1], operands[2], operands[3])) diff --git a/gcc/config/nds32/nds32-protos.h b/gcc/config/nds32/nds32-protos.h index aaa65d6..7ae1954 100644 --- a/gcc/config/nds32/nds32-protos.h +++ b/gcc/config/nds32/nds32-protos.h @@ -78,7 +78,7 @@ extern rtx nds32_di_low_part_subreg(rtx); extern rtx nds32_expand_load_multiple (int, int, rtx, rtx, bool, rtx *); extern rtx nds32_expand_store_multiple (int, int, rtx, rtx, bool, rtx *); -extern bool nds32_expand_movmemsi (rtx, rtx, rtx, rtx); +extern bool nds32_expand_cpymemsi (rtx, rtx, rtx, rtx); extern bool nds32_expand_setmem (rtx, rtx, rtx, rtx, rtx, rtx); extern bool nds32_expand_strlen (rtx, rtx, rtx, rtx);