From patchwork Tue Jun 25 20:22:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 1122248 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-503712-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="pwqVlSsn"; 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 45YHkN50lsz9s4Y for ; Wed, 26 Jun 2019 06:26:36 +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:message-id:in-reply-to:references :in-reply-to:references; q=dns; s=default; b=nZNuJ+KHn0UBmQ5V7rY UbJmGj+8C7O5Iw9r8gst5N8b3OPAvpiFDOW6nPXO/gUSZEDnYnaWEMd4+FNvDuKf A1ziIxhRlYbWa4zPHfbZX57B7p3T2KcXw0eBsKFjppBemserhUwgX8sheuz/LB7j Evtr7G5xuUDOkRpk0LZ1c3q0= 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:in-reply-to:references :in-reply-to:references; s=default; bh=x/aFB6G580op5MffJsfOyrkjc 68=; b=pwqVlSsnAC4iaE9hy7VTrdt3hVSPqnd7hZo195d9wMElZzyxVmjlBylKe xj2VH1nVyrADyUEgZ2K/0jt0U8pUML6ECTUroV7vapTeBQ9OfmZFUxlIpmTbdQNz sd2O/8TQEPFHA7eC9YnwEKrV9XOMVvBRF4Csu+GLFVBPtnnxzM= Received: (qmail 42219 invoked by alias); 25 Jun 2019 20:25:59 -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 42158 invoked by uid 89); 25 Jun 2019 20:25:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 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= 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:25:56 +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 x5PKMJJb012054; Tue, 25 Jun 2019 16:25:55 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tbrybbtca-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 16:25:55 -0400 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x5PKOiKR033740; Tue, 25 Jun 2019 16:25:54 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2tbrybbtbw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 16:25:54 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x5PKOfDk015177; Tue, 25 Jun 2019 20:25:53 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04dal.us.ibm.com with ESMTP id 2t9by6tj7u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 20:25:53 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PKPqff60031266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 20:25:52 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E67C0C605A; Tue, 25 Jun 2019 20:25:51 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D022EC6057; Tue, 25 Jun 2019 20:25:51 +0000 (GMT) Received: from genoa.aus.stglabs.ibm.com (unknown [9.40.192.157]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 25 Jun 2019 20:25:51 +0000 (GMT) Received: by genoa.aus.stglabs.ibm.com (Postfix, from userid 1025) id A33AAA60E3E; Tue, 25 Jun 2019 15:25:50 -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, jzhang918@gmail.com Subject: [PATCH 07/30] Changes to bfin Date: Tue, 25 Jun 2019 15:22:16 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes From: Aaron Sawdey * config/bfin/bfin-protos.h: Change movmem to cpymem. * config/bfin/bfin.c (single_move_for_movmem, bfin_expand_movmem): Change movmem to cpymem. * config/bfin/bfin.h: Change movmem to cpymem in comment. * config/bfin/bfin.md (movmemsi): Change name to cpymemsi. --- gcc/config/bfin/bfin-protos.h | 2 +- gcc/config/bfin/bfin.c | 12 ++++++------ gcc/config/bfin/bfin.h | 2 +- gcc/config/bfin/bfin.md | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/config/bfin/bfin-protos.h b/gcc/config/bfin/bfin-protos.h index 64a1842..7d0f705 100644 --- a/gcc/config/bfin/bfin-protos.h +++ b/gcc/config/bfin/bfin-protos.h @@ -81,7 +81,7 @@ extern bool expand_move (rtx *, machine_mode); extern void bfin_expand_call (rtx, rtx, rtx, rtx, int); extern bool bfin_longcall_p (rtx, int); extern bool bfin_dsp_memref_p (rtx); -extern bool bfin_expand_movmem (rtx, rtx, rtx, rtx); +extern bool bfin_expand_cpymem (rtx, rtx, rtx, rtx); extern enum reg_class secondary_input_reload_class (enum reg_class, machine_mode, diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index e520115..319d7e2 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -3208,7 +3208,7 @@ output_pop_multiple (rtx insn, rtx *operands) /* Adjust DST and SRC by OFFSET bytes, and generate one move in mode MODE. */ static void -single_move_for_movmem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offset) +single_move_for_cpymem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offset) { rtx scratch = gen_reg_rtx (mode); rtx srcmem, dstmem; @@ -3224,7 +3224,7 @@ single_move_for_movmem (rtx dst, rtx src, machine_mode mode, HOST_WIDE_INT offse back on a different method. */ bool -bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp) +bfin_expand_cpymem (rtx dst, rtx src, rtx count_exp, rtx align_exp) { rtx srcreg, destreg, countreg; HOST_WIDE_INT align = 0; @@ -3269,7 +3269,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp) { if ((count & ~3) == 4) { - single_move_for_movmem (dst, src, SImode, offset); + single_move_for_cpymem (dst, src, SImode, offset); offset = 4; } else if (count & ~3) @@ -3282,7 +3282,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp) } if (count & 2) { - single_move_for_movmem (dst, src, HImode, offset); + single_move_for_cpymem (dst, src, HImode, offset); offset += 2; } } @@ -3290,7 +3290,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp) { if ((count & ~1) == 2) { - single_move_for_movmem (dst, src, HImode, offset); + single_move_for_cpymem (dst, src, HImode, offset); offset = 2; } else if (count & ~1) @@ -3304,7 +3304,7 @@ bfin_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp) } if (count & 1) { - single_move_for_movmem (dst, src, QImode, offset); + single_move_for_cpymem (dst, src, QImode, offset); } return true; } diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index 19b7f81..4aba596 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -793,7 +793,7 @@ typedef struct { #define MOVE_MAX UNITS_PER_WORD /* If a memory-to-memory move would take MOVE_RATIO or more simple - move-instruction pairs, we will do a movmem or libcall instead. */ + move-instruction pairs, we will do a cpymem or libcall instead. */ #define MOVE_RATIO(speed) 5 diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index ac58924..6ac208d 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -2316,14 +2316,14 @@ (set_attr "length" "16") (set_attr "seq_insns" "multi")]) -(define_expand "movmemsi" +(define_expand "cpymemsi" [(match_operand:BLK 0 "general_operand" "") (match_operand:BLK 1 "general_operand" "") (match_operand:SI 2 "const_int_operand" "") (match_operand:SI 3 "const_int_operand" "")] "" { - if (bfin_expand_movmem (operands[0], operands[1], operands[2], operands[3])) + if (bfin_expand_cpymem (operands[0], operands[1], operands[2], operands[3])) DONE; FAIL; })