From patchwork Tue Jun 25 20:22:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 1122269 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-503731-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="pBGUB6PZ"; 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 45YJ1S1fs4z9s3l for ; Wed, 26 Jun 2019 06:39:40 +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=GeRo4eJshflhoNH36KG+ 8lrogx6j7saj0MLRVhGAUBCrVChqch9On259fVweRWDyehzV31/6Om74t3dLPs2N k5UFwiPA9ss4jbUMer8iPmQsD4zMAzWMZLv8usuIOdqeea9tbHbiNDA6x37bjGdp DcyiYU7Oil7HF/7uc4Lzrvs= 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=n8BpVn+F6mQimlm8xfbVxej6tg Q=; b=pBGUB6PZjU7kdnAV7+6PBeoSjMe9+ibCy5y7273D7hdQnPkBv8gtANI9MP LeePk2FEpuwBAdLc65Rpi+Sh2qEfkPaUaJqTUUI1Rob86VmwO6FhW4NSUNY868oE SrkYnU5ObnJDUhI11GozbWVHj/+33osvt++EiQXvKm2LOYEpc= Received: (qmail 123095 invoked by alias); 25 Jun 2019 20:39:33 -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 123082 invoked by uid 89); 25 Jun 2019 20:39:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.5 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 mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Jun 2019 20:39:31 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5PKbCvx025711 for ; Tue, 25 Jun 2019 16:39:29 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tbqvjqfkr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 25 Jun 2019 16:39:29 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Jun 2019 21:39:28 +0100 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e33.co.us.ibm.com (192.168.1.133) 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:39:25 +0100 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PKdJUM63963468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 20:39:19 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE00A6E050; Tue, 25 Jun 2019 20:39:19 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A494C6E04E; Tue, 25 Jun 2019 20:39:19 +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:39:19 +0000 (GMT) Received: by genoa.aus.stglabs.ibm.com (Postfix, from userid 1025) id 69DBEA60E3E; Tue, 25 Jun 2019 15:39:18 -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, uweigand@de.ibm.com Subject: [PATCH 25/30] Changes to s390 Date: Tue, 25 Jun 2019 15:22:34 -0500 In-Reply-To: References: In-Reply-To: References: x-cbid: 19062520-0036-0000-0000-00000AD0B9FE 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.01223215; UDB=6.00643704; IPR=6.01004388; MB=3.00027467; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-25 20:39:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062520-0037-0000-0000-00004C5C342D Message-Id: <1f2932780b877ff479c0e1eaf87b7e0fb7fe08b4.1561408899.git.acsawdey@linux.ibm.com> X-IsSubscribed: yes From: Aaron Sawdey * config/s390/s390-protos.h: Change movmem to cpymem. * config/s390/s390.c (s390_expand_movmem, s390_expand_setmem, s390_expand_insv): Change movmem to cpymem. * config/s390/s390.md (movmem, movmem_short, *movmem_short, movmem_long, *movmem_long, *movmem_long_31z): Change movmem to cpymem. --- gcc/config/s390/s390-protos.h | 2 +- gcc/config/s390/s390.c | 18 +++++++++--------- gcc/config/s390/s390.md | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h index aa04479..b162b26 100644 --- a/gcc/config/s390/s390-protos.h +++ b/gcc/config/s390/s390-protos.h @@ -104,7 +104,7 @@ extern void s390_reload_symref_address (rtx , rtx , rtx , bool); extern void s390_expand_plus_operand (rtx, rtx, rtx); extern void emit_symbolic_move (rtx *); extern void s390_load_address (rtx, rtx); -extern bool s390_expand_movmem (rtx, rtx, rtx); +extern bool s390_expand_cpymem (rtx, rtx, rtx); extern void s390_expand_setmem (rtx, rtx, rtx); extern bool s390_expand_cmpmem (rtx, rtx, rtx, rtx); extern void s390_expand_vec_strlen (rtx, rtx, rtx); diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 3ae1219..5ec26a059 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5394,7 +5394,7 @@ legitimize_reload_address (rtx ad, machine_mode mode ATTRIBUTE_UNUSED, /* Emit code to move LEN bytes from DST to SRC. */ bool -s390_expand_movmem (rtx dst, rtx src, rtx len) +s390_expand_cpymem (rtx dst, rtx src, rtx len) { /* When tuning for z10 or higher we rely on the Glibc functions to do the right thing. Only for constant lengths below 64k we will @@ -5419,14 +5419,14 @@ s390_expand_movmem (rtx dst, rtx src, rtx len) { rtx newdst = adjust_address (dst, BLKmode, o); rtx newsrc = adjust_address (src, BLKmode, o); - emit_insn (gen_movmem_short (newdst, newsrc, + emit_insn (gen_cpymem_short (newdst, newsrc, GEN_INT (l > 256 ? 255 : l - 1))); } } else if (TARGET_MVCLE) { - emit_insn (gen_movmem_long (dst, src, convert_to_mode (Pmode, len, 1))); + emit_insn (gen_cpymem_long (dst, src, convert_to_mode (Pmode, len, 1))); } else @@ -5488,7 +5488,7 @@ s390_expand_movmem (rtx dst, rtx src, rtx len) emit_insn (prefetch); } - emit_insn (gen_movmem_short (dst, src, GEN_INT (255))); + emit_insn (gen_cpymem_short (dst, src, GEN_INT (255))); s390_load_address (dst_addr, gen_rtx_PLUS (Pmode, dst_addr, GEN_INT (256))); s390_load_address (src_addr, @@ -5505,7 +5505,7 @@ s390_expand_movmem (rtx dst, rtx src, rtx len) emit_jump (loop_start_label); emit_label (loop_end_label); - emit_insn (gen_movmem_short (dst, src, + emit_insn (gen_cpymem_short (dst, src, convert_to_mode (Pmode, count, 1))); emit_label (end_label); } @@ -5557,7 +5557,7 @@ s390_expand_setmem (rtx dst, rtx len, rtx val) if (l > 1) { rtx newdstp1 = adjust_address (dst, BLKmode, o + 1); - emit_insn (gen_movmem_short (newdstp1, newdst, + emit_insn (gen_cpymem_short (newdstp1, newdst, GEN_INT (l > 257 ? 255 : l - 2))); } } @@ -5664,7 +5664,7 @@ s390_expand_setmem (rtx dst, rtx len, rtx val) /* Set the first byte in the block to the value and use an overlapping mvc for the block. */ emit_move_insn (adjust_address (dst, QImode, 0), val); - emit_insn (gen_movmem_short (dstp1, dst, GEN_INT (254))); + emit_insn (gen_cpymem_short (dstp1, dst, GEN_INT (254))); } s390_load_address (dst_addr, gen_rtx_PLUS (Pmode, dst_addr, GEN_INT (256))); @@ -5688,7 +5688,7 @@ s390_expand_setmem (rtx dst, rtx len, rtx val) emit_move_insn (adjust_address (dst, QImode, 0), val); /* execute only uses the lowest 8 bits of count that's exactly what we need here. */ - emit_insn (gen_movmem_short (dstp1, dst, + emit_insn (gen_cpymem_short (dstp1, dst, convert_to_mode (Pmode, count, 1))); } @@ -6330,7 +6330,7 @@ s390_expand_insv (rtx dest, rtx op1, rtx op2, rtx src) dest = adjust_address (dest, BLKmode, 0); set_mem_size (dest, size); - s390_expand_movmem (dest, src_mem, GEN_INT (size)); + s390_expand_cpymem (dest, src_mem, GEN_INT (size)); return true; } diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 714d8b0..d06aea9 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -3196,17 +3196,17 @@ ; -; movmemM instruction pattern(s). +; cpymemM instruction pattern(s). ; -(define_expand "movmem" +(define_expand "cpymem" [(set (match_operand:BLK 0 "memory_operand" "") ; destination (match_operand:BLK 1 "memory_operand" "")) ; source (use (match_operand:GPR 2 "general_operand" "")) ; count (match_operand 3 "" "")] "" { - if (s390_expand_movmem (operands[0], operands[1], operands[2])) + if (s390_expand_cpymem (operands[0], operands[1], operands[2])) DONE; else FAIL; @@ -3215,7 +3215,7 @@ ; Move a block that is up to 256 bytes in length. ; The block length is taken as (operands[2] % 256) + 1. -(define_expand "movmem_short" +(define_expand "cpymem_short" [(parallel [(set (match_operand:BLK 0 "memory_operand" "") (match_operand:BLK 1 "memory_operand" "")) @@ -3225,7 +3225,7 @@ "" "operands[3] = gen_rtx_SCRATCH (Pmode);") -(define_insn "*movmem_short" +(define_insn "*cpymem_short" [(set (match_operand:BLK 0 "memory_operand" "=Q,Q,Q,Q") (match_operand:BLK 1 "memory_operand" "Q,Q,Q,Q")) (use (match_operand 2 "nonmemory_operand" "n,a,a,a")) @@ -3293,7 +3293,7 @@ ; Move a block of arbitrary length. -(define_expand "movmem_long" +(define_expand "cpymem_long" [(parallel [(clobber (match_dup 2)) (clobber (match_dup 3)) @@ -3327,7 +3327,7 @@ operands[3] = reg1; }) -(define_insn "*movmem_long" +(define_insn "*cpymem_long" [(clobber (match_operand: 0 "register_operand" "=d")) (clobber (match_operand: 1 "register_operand" "=d")) (set (mem:BLK (subreg:P (match_operand: 2 "register_operand" "0") 0)) @@ -3340,7 +3340,7 @@ [(set_attr "length" "8") (set_attr "type" "vs")]) -(define_insn "*movmem_long_31z" +(define_insn "*cpymem_long_31z" [(clobber (match_operand:TI 0 "register_operand" "=d")) (clobber (match_operand:TI 1 "register_operand" "=d")) (set (mem:BLK (subreg:SI (match_operand:TI 2 "register_operand" "0") 4))