From patchwork Tue Jun 25 20:22:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Sawdey X-Patchwork-Id: 1122242 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-503706-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="rsHGuovx"; 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 45YHfk1dqHz9s3l for ; Wed, 26 Jun 2019 06:23:26 +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; q=dns; s=default; b=XEv3Mm7hpvtG d3avsguSdCkp1rRkAsM1Ulfxj9huFWW0EOfn6zkSQdLQGBDPUR+PxGcZ55T3jNKw r3UUL/jrOvYM36Uq8ghuEgtDYk2IYiJn8THwmZMlXEWIr+5uqr3eBdZ77Ii6Jjen txJrcqUCMxDxRxEf84ILO5Q4yvvtxks= 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; s=default; bh=hPPpL/7hFlAv9qCwc6 j9+ygLa5I=; b=rsHGuovxVVkKwwvCt9Jut9ryQ76e+Fbz4+bHUUrw8dAlL9sUoI 3SvuZZ5s49pv9qIm6QykBBJcqJqGpl7BfFttnPoDkiN8ZltgWJhif3dVZwq7vo5s Y2jThLae3FQ8U6kTbJ9VOo4tNMcuIosH2Xa45GgzXEFDJrFUen9CbSmAs= Received: (qmail 32295 invoked by alias); 25 Jun 2019 20:23:19 -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 32287 invoked by uid 89); 25 Jun 2019 20:23:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=unavailable 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:23:16 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5PKMJM1028941 for ; Tue, 25 Jun 2019 16:23:12 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tbrv3vges-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 25 Jun 2019 16:23:11 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Jun 2019 21:23:11 +0100 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e31.co.us.ibm.com (192.168.1.131) 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:23:03 +0100 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PKN2Gi43123070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 20:23:02 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 56F766E050; Tue, 25 Jun 2019 20:23:02 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B8186E04E; Tue, 25 Jun 2019 20:23:02 +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:23:02 +0000 (GMT) Received: by genoa.aus.stglabs.ibm.com (Postfix, from userid 1025) id BB8D1A60E3E; Tue, 25 Jun 2019 15:23:00 -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, rguenther@suse.de, jakub@redhat.com, matz@suse.de, richard.earnshaw@arm.com, rth@twiddle.net, gnu@amylaar.uk, nickc@redhat.com, chertykov@gmail.com, jzhang918@gmail.com, bernds_cb1@t-online.de, aoliva@redhat.com, james.bowman@ftdichip.com, law@redhat.com, ubizjak@gmail.com, sebastien@milkymist.org, eager@eagercon.com, mfortune@gmail.com, jasonwucj@gmail.com, dave.anglin@bell.net, ni1d@arrl.net, jimw@sifive.com, uweigand@de.ibm.com, olegendo@gcc.gnu.org, davem@redhat.com, matt@3am-software.com, ebotcazou@libertysurf.fr, augustine.sterling@gmail.com, hubicka@ucw.cz Subject: [PATCH 00/30] Rename movmem pattern to cpymem Date: Tue, 25 Jun 2019 15:22:09 -0500 x-cbid: 19062520-8235-0000-0000-00000EAE9C3A 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.01223210; UDB=6.00643700; IPR=6.01004382; MB=3.00027467; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-25 20:23:10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19062520-8236-0000-0000-000046288C5B Message-Id: X-IsSubscribed: yes From: Aaron Sawdey As we discussed on gcc-list back in mid-May, this is the first set of patches to unscramble things so we can have sensible inline expansion of both memcpy() and memmove(). This patch renames the movmem optab entry and all uses of it to cpymem to reflect the fact that this pattern is used to expand memcpy() and expects that the source and destination blocks do not overlap. I have split this out into the machine independent piece and the changes for each target directory to make review easier. The patches will all need to be committed I changed the pattern names in the .md files and also functions that used "movmem" in the function name to keep everything consistent. I did not change function names like "*_block_move_*". A couple targets have support functions with the name movmem in libgcc but I did not change any of that because I wasn't sure if that was going to cause backward/forward compatibility issues. Bootstrap/regtest passes on i386, x86_64, aarch64, and ppc64le. Using Segher's cross compile build scripts I was able to build a cross-compiler and use it to build the linux kernel on the following targets: alpha arc arm64 armhf arm csky h8300 i386 ia64 m68k microblaze mips64 nds32 openrisc parisc64 parisc powerpc64le powerpc64 riscv32 riscv64 s390 sh sparc64 sparc x86_64 xtensa On these targets I was able to build a cross-compiler but could not build the linux kernel because of unrelated errors or because linux did not support that target: avr blackfin c6x frv ft32 lm32 m32r mcore mips nios2 pdp11 powerpc rx vax visium OK for trunk? Thanks! Aaron Aaron Sawdey (30): Changes to machine independent code Changes for aarch64 Changes for alpha Changes to arc Changes to arm Changes to avr Changes to bfin Changes to c6x Changes to frv Changes to ft32 Changes to h8300 Changes to i386 Changes to lm32 Changes to m32c Changes to m32r Changes to mcore Changes to microblaze Changes to mips Changes to nds32 Changes to pa Changes to pdp11 Changes to riscv Changes to rs6000 Changes to rx Changes to s390 Changes to sh Changes to sparc Changes to vax Changes to visium Changes to xtensa gcc/builtins.c | 2 +- gcc/config/aarch64/aarch64-protos.h | 4 ++-- gcc/config/aarch64/aarch64.c | 4 ++-- gcc/config/aarch64/aarch64.h | 2 +- gcc/config/aarch64/aarch64.md | 6 ++--- gcc/config/alpha/alpha.h | 2 +- gcc/config/alpha/alpha.md | 6 ++--- gcc/config/arc/arc-protos.h | 2 +- gcc/config/arc/arc.c | 6 ++--- gcc/config/arc/arc.h | 2 +- gcc/config/arc/arc.md | 4 ++-- gcc/config/arm/arm-protos.h | 6 ++--- gcc/config/arm/arm.c | 18 +++++++------- gcc/config/arm/arm.md | 8 +++---- gcc/config/arm/thumb1.md | 4 ++-- gcc/config/avr/avr-protos.h | 4 ++-- gcc/config/avr/avr.c | 14 +++++------ gcc/config/avr/avr.md | 32 ++++++++++++------------- 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 ++-- gcc/config/c6x/c6x-protos.h | 2 +- gcc/config/c6x/c6x.c | 4 ++-- gcc/config/c6x/c6x.md | 4 ++-- gcc/config/frv/frv.md | 2 +- gcc/config/ft32/ft32.md | 2 +- gcc/config/h8300/h8300.md | 4 ++-- gcc/config/i386/i386-expand.c | 36 ++++++++++++++-------------- gcc/config/i386/i386-protos.h | 2 +- gcc/config/i386/i386.h | 2 +- gcc/config/i386/i386.md | 6 ++--- gcc/config/lm32/lm32.md | 2 +- gcc/config/m32c/blkmov.md | 12 +++++----- gcc/config/m32c/m32c-protos.h | 2 +- gcc/config/m32c/m32c.c | 10 ++++---- gcc/config/m32r/m32r.c | 4 ++-- gcc/config/m32r/m32r.md | 4 ++-- gcc/config/mcore/mcore.md | 2 +- gcc/config/microblaze/microblaze.c | 2 +- gcc/config/microblaze/microblaze.md | 2 +- gcc/config/mips/mips.c | 10 ++++---- gcc/config/mips/mips.h | 10 ++++---- gcc/config/mips/mips.md | 2 +- gcc/config/nds32/nds32-memory-manipulation.c | 30 +++++++++++------------ gcc/config/nds32/nds32-multiple.md | 4 ++-- gcc/config/nds32/nds32-protos.h | 2 +- gcc/config/pa/pa.c | 6 ++--- gcc/config/pa/pa.md | 14 +++++------ gcc/config/pdp11/pdp11.md | 16 ++++++------- gcc/config/riscv/riscv.c | 2 +- gcc/config/riscv/riscv.h | 8 +++---- gcc/config/riscv/riscv.md | 2 +- gcc/config/rs6000/rs6000.md | 2 +- gcc/config/rx/rx.md | 12 +++++----- gcc/config/s390/s390-protos.h | 2 +- gcc/config/s390/s390.c | 18 +++++++------- gcc/config/s390/s390.md | 16 ++++++------- gcc/config/sh/sh.md | 2 +- gcc/config/sparc/sparc.h | 2 +- gcc/config/vax/vax-protos.h | 1 - gcc/config/vax/vax.h | 2 +- gcc/config/vax/vax.md | 8 +++---- gcc/config/visium/visium.h | 4 ++-- gcc/config/visium/visium.md | 2 +- gcc/config/xtensa/xtensa.md | 2 +- gcc/defaults.h | 6 ++--- gcc/expr.c | 10 ++++---- gcc/optabs.def | 2 +- gcc/targhooks.c | 6 ++--- 70 files changed, 226 insertions(+), 227 deletions(-)