Message ID | 20230224055127.2500953-1-christoph.muellner@vrull.eu |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0977B3851ABC for <patchwork@sourceware.org>; Fri, 24 Feb 2023 05:52:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 75C77385840F for <gcc-patches@gcc.gnu.org>; Fri, 24 Feb 2023 05:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75C77385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-wr1-x435.google.com with SMTP id j2so12598788wrh.9 for <gcc-patches@gcc.gnu.org>; Thu, 23 Feb 2023 21:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=E7OpSmk1rqFn8wCTbWSK19sn0rQbfAm3XV8AFsTPr10=; b=kGDGdDode/bHGnyqWajUQ2dRi5AfQMmpMHO/bZQGs+QZB3Pey5XP8Q3k6gCe+c2PUL uY/CJ6U9f45zmgCciKb+GeTUWuwdt7DswfLX9qYWopGaIq5yB1Bcxq5u8TWhjSoecHSy Dd993pwfDcwK5eQIMHXvUmlXDjAYbDVokjtLdPhSVLO29OnWPQsjFP57q2dHTATgxAHR oM2xguqynsQHD/NYwq7VhAhRW13eSiUtYjrmwv/48IGAYdnmcSJJDuRjaGSF6yXrAD/7 A1oFQbWIJnReL+WMgUAZBEZeLpJsmbuzKM6bmytpOXbMoqNgbog86oTXoVduCC73FSDW VxwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E7OpSmk1rqFn8wCTbWSK19sn0rQbfAm3XV8AFsTPr10=; b=u/H9f4bQpCe//swJ+jD04A7vW9sOJwuynP0l8Q/TFwXOOA4dUiNA0S04wVpJjT1++G 0duON+ArW7JAMuv+tysOJNPPmJblnarRqdYLq5Ldxark4TpaxN9G6dUIt4poVqn1pelD 4fyQJyvr5NsPKws50OWJQvHjtaxwpaBRD7foiB418LqgnXWtWbDdrhc4Lj+O/+wjxyoF xYfrs/tXK0m3OtvTSki5IPPMkPYMWM9bGGlfvSImK8qLfG5FvpUaPOSoxSOXfPlhyiYY zt/IyiMzLux07S+ig9nzOSfDR9c4LcNHSfsgTdcPBHvyytGtBixK6YxQOcOIv0l8xfWm FnFQ== X-Gm-Message-State: AO0yUKVGFJ1Z5rj9eC/L/v7+Bby3bBPtNwxkZ0nfsBn2zLUJP/eOTPCU 9vKPlg4axNx3z9U90LN4qXNTTeaVhNKNjdV/ X-Google-Smtp-Source: AK7set90CpGis1Cy10Mx1WvmbiiZzTwDE8RpmwYg4Rb7xiQaW32HVImplBmNOgHegQNZ2wtULuWFjw== X-Received: by 2002:adf:dd4a:0:b0:2c5:5315:a7a7 with SMTP id u10-20020adfdd4a000000b002c55315a7a7mr12459287wrm.32.1677217891562; Thu, 23 Feb 2023 21:51:31 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id f18-20020adffcd2000000b002c59e001631sm11704055wrs.77.2023.02.23.21.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 21:51:30 -0800 (PST) From: Christoph Muellner <christoph.muellner@vrull.eu> To: gcc-patches@gcc.gnu.org, Kito Cheng <kito.cheng@sifive.com>, Jim Wilson <jim.wilson.gcc@gmail.com>, Palmer Dabbelt <palmer@dabbelt.com>, Andrew Waterman <andrew@sifive.com>, Philipp Tomsich <philipp.tomsich@vrull.eu>, Jeff Law <jeffreyalaw@gmail.com>, Cooper Qu <cooper.qu@linux.alibaba.com>, Lifang Xia <lifang_xia@linux.alibaba.com>, Yunhai Shang <yunhai@linux.alibaba.com>, Zhiwei Liu <zhiwei_liu@linux.alibaba.com> Cc: =?utf-8?q?Christoph_M=C3=BCllner?= <christoph.muellner@vrull.eu> Subject: [PATCH v3 00/11] RISC-V: Add XThead* extension support Date: Fri, 24 Feb 2023 06:51:16 +0100 Message-Id: <20230224055127.2500953-1-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, KAM_MANYTO, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org> |
Series |
RISC-V: Add XThead* extension support
|
|
Message
Christoph Müllner
Feb. 24, 2023, 5:51 a.m. UTC
From: Christoph Müllner <christoph.muellner@vrull.eu>
This series introduces support for the T-Head specific RISC-V ISA extensions
which are available e.g. on the T-Head XuanTie C906.
The ISA spec can be found here:
https://github.com/T-head-Semi/thead-extension-spec
This series adds support for the following XThead* extensions:
* XTheadBa
* XTheadBb
* XTheadBs
* XTheadCmo
* XTheadCondMov
* XTheadFMemIdx
* XTheadFmv
* XTheadInt
* XTheadMac
* XTheadMemIdx
* XTheadMemPair
* XTheadSync
All extensions are properly integrated and the included tests
demonstrate the improvements of the generated code.
The series also introduces support for "-mcpu=thead-c906", which also
enables all available XThead* ISA extensions of the T-Head C906.
All patches have been tested and don't introduce regressions for RV32 or RV64.
The patches have also been tested with SPEC CPU2017 on QEMU and real HW
(D1 board).
Support patches for these extensions for Binutils, QEMU, and LLVM have
already been merged in the corresponding upstream projects.
Changes in v3:
- Bugfix in XTheadBa
- Rewrite of XTheadMemPair
- Inclusion of XTheadMemIdx and XTheadFMemIdx
Christoph Müllner (9):
riscv: Add basic XThead* vendor extension support
riscv: riscv-cores.def: Add T-Head XuanTie C906
riscv: thead: Add support for the XTheadBa ISA extension
riscv: thead: Add support for the XTheadBs ISA extension
riscv: thead: Add support for the XTheadBb ISA extension
riscv: thead: Add support for the XTheadCondMov ISA extensions
riscv: thead: Add support for the XTheadMac ISA extension
riscv: thead: Add support for the XTheadFmv ISA extension
riscv: thead: Add support for the XTheadMemPair ISA extension
moiz.hussain (2):
riscv: thead: Add support for the XTheadMemIdx ISA extension
riscv: thead: Add support for the XTheadFMemIdx ISA extension
gcc/common/config/riscv/riscv-common.cc | 26 +
gcc/config/riscv/bitmanip.md | 52 +-
gcc/config/riscv/constraints.md | 43 +
gcc/config/riscv/iterators.md | 4 +
gcc/config/riscv/peephole.md | 56 +
gcc/config/riscv/riscv-cores.def | 4 +
gcc/config/riscv/riscv-opts.h | 29 +
gcc/config/riscv/riscv-protos.h | 28 +-
gcc/config/riscv/riscv.cc | 1090 +++++++++++++++--
gcc/config/riscv/riscv.h | 8 +-
gcc/config/riscv/riscv.md | 169 ++-
gcc/config/riscv/riscv.opt | 3 +
gcc/config/riscv/thead.md | 351 ++++++
.../gcc.target/riscv/mcpu-thead-c906.c | 28 +
.../gcc.target/riscv/xtheadba-addsl.c | 55 +
gcc/testsuite/gcc.target/riscv/xtheadba.c | 14 +
gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c | 20 +
.../gcc.target/riscv/xtheadbb-extu-2.c | 22 +
.../gcc.target/riscv/xtheadbb-extu.c | 22 +
gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c | 18 +
gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c | 45 +
.../gcc.target/riscv/xtheadbb-srri.c | 21 +
gcc/testsuite/gcc.target/riscv/xtheadbb.c | 14 +
gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c | 13 +
gcc/testsuite/gcc.target/riscv/xtheadbs.c | 14 +
gcc/testsuite/gcc.target/riscv/xtheadcmo.c | 14 +
.../riscv/xtheadcondmov-mveqz-imm-eqz.c | 38 +
.../riscv/xtheadcondmov-mveqz-imm-not.c | 38 +
.../riscv/xtheadcondmov-mveqz-reg-eqz.c | 38 +
.../riscv/xtheadcondmov-mveqz-reg-not.c | 38 +
.../riscv/xtheadcondmov-mvnez-imm-cond.c | 38 +
.../riscv/xtheadcondmov-mvnez-imm-nez.c | 38 +
.../riscv/xtheadcondmov-mvnez-reg-cond.c | 38 +
.../riscv/xtheadcondmov-mvnez-reg-nez.c | 38 +
.../gcc.target/riscv/xtheadcondmov.c | 14 +
.../riscv/xtheadfmemidx-fldr-fstr.c | 58 +
.../gcc.target/riscv/xtheadfmemidx.c | 14 +
.../gcc.target/riscv/xtheadfmv-fmv.c | 24 +
gcc/testsuite/gcc.target/riscv/xtheadfmv.c | 14 +
gcc/testsuite/gcc.target/riscv/xtheadint.c | 14 +
.../gcc.target/riscv/xtheadmac-mula-muls.c | 43 +
gcc/testsuite/gcc.target/riscv/xtheadmac.c | 14 +
.../gcc.target/riscv/xtheadmemidx-ldi-sdi.c | 72 ++
.../riscv/xtheadmemidx-ldr-str-32.c | 23 +
.../riscv/xtheadmemidx-ldr-str-64.c | 53 +
.../gcc.target/riscv/xtheadmemidx-macros.h | 110 ++
gcc/testsuite/gcc.target/riscv/xtheadmemidx.c | 14 +
.../gcc.target/riscv/xtheadmempair-1.c | 98 ++
.../gcc.target/riscv/xtheadmempair-2.c | 84 ++
.../gcc.target/riscv/xtheadmempair-3.c | 29 +
.../gcc.target/riscv/xtheadmempair.c | 13 +
gcc/testsuite/gcc.target/riscv/xtheadsync.c | 14 +
52 files changed, 3048 insertions(+), 124 deletions(-)
create mode 100644 gcc/config/riscv/thead.md
create mode 100644 gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba-addsl.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu-2.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-srri.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcmo.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-eqz.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-not.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-cond.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-nez.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx-fldr-fstr.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv-fmv.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadint.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac-mula-muls.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldi-sdi.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-32.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-64.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-macros.h
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-1.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-2.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-3.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair.c
create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadsync.c
Comments
Hi Christoph: OK for trunk for the 1~8, feel free to commit 1~8 after you address those minor comments, and could you also prepare release notes for those extensions? And 9~11 needs to take a few more rounds of review and test. On Fri, Feb 24, 2023 at 1:52 PM Christoph Muellner <christoph.muellner@vrull.eu> wrote: > > From: Christoph Müllner <christoph.muellner@vrull.eu> > > This series introduces support for the T-Head specific RISC-V ISA extensions > which are available e.g. on the T-Head XuanTie C906. > > The ISA spec can be found here: > https://github.com/T-head-Semi/thead-extension-spec > > This series adds support for the following XThead* extensions: > * XTheadBa > * XTheadBb > * XTheadBs > * XTheadCmo > * XTheadCondMov > * XTheadFMemIdx > * XTheadFmv > * XTheadInt > * XTheadMac > * XTheadMemIdx > * XTheadMemPair > * XTheadSync > > All extensions are properly integrated and the included tests > demonstrate the improvements of the generated code. > > The series also introduces support for "-mcpu=thead-c906", which also > enables all available XThead* ISA extensions of the T-Head C906. > > All patches have been tested and don't introduce regressions for RV32 or RV64. > The patches have also been tested with SPEC CPU2017 on QEMU and real HW > (D1 board). > > Support patches for these extensions for Binutils, QEMU, and LLVM have > already been merged in the corresponding upstream projects. > > Changes in v3: > - Bugfix in XTheadBa > - Rewrite of XTheadMemPair > - Inclusion of XTheadMemIdx and XTheadFMemIdx > > Christoph Müllner (9): > riscv: Add basic XThead* vendor extension support > riscv: riscv-cores.def: Add T-Head XuanTie C906 > riscv: thead: Add support for the XTheadBa ISA extension > riscv: thead: Add support for the XTheadBs ISA extension > riscv: thead: Add support for the XTheadBb ISA extension > riscv: thead: Add support for the XTheadCondMov ISA extensions > riscv: thead: Add support for the XTheadMac ISA extension > riscv: thead: Add support for the XTheadFmv ISA extension > riscv: thead: Add support for the XTheadMemPair ISA extension > > moiz.hussain (2): > riscv: thead: Add support for the XTheadMemIdx ISA extension > riscv: thead: Add support for the XTheadFMemIdx ISA extension > > gcc/common/config/riscv/riscv-common.cc | 26 + > gcc/config/riscv/bitmanip.md | 52 +- > gcc/config/riscv/constraints.md | 43 + > gcc/config/riscv/iterators.md | 4 + > gcc/config/riscv/peephole.md | 56 + > gcc/config/riscv/riscv-cores.def | 4 + > gcc/config/riscv/riscv-opts.h | 29 + > gcc/config/riscv/riscv-protos.h | 28 +- > gcc/config/riscv/riscv.cc | 1090 +++++++++++++++-- > gcc/config/riscv/riscv.h | 8 +- > gcc/config/riscv/riscv.md | 169 ++- > gcc/config/riscv/riscv.opt | 3 + > gcc/config/riscv/thead.md | 351 ++++++ > .../gcc.target/riscv/mcpu-thead-c906.c | 28 + > .../gcc.target/riscv/xtheadba-addsl.c | 55 + > gcc/testsuite/gcc.target/riscv/xtheadba.c | 14 + > gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c | 20 + > .../gcc.target/riscv/xtheadbb-extu-2.c | 22 + > .../gcc.target/riscv/xtheadbb-extu.c | 22 + > gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c | 18 + > gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c | 45 + > .../gcc.target/riscv/xtheadbb-srri.c | 21 + > gcc/testsuite/gcc.target/riscv/xtheadbb.c | 14 + > gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c | 13 + > gcc/testsuite/gcc.target/riscv/xtheadbs.c | 14 + > gcc/testsuite/gcc.target/riscv/xtheadcmo.c | 14 + > .../riscv/xtheadcondmov-mveqz-imm-eqz.c | 38 + > .../riscv/xtheadcondmov-mveqz-imm-not.c | 38 + > .../riscv/xtheadcondmov-mveqz-reg-eqz.c | 38 + > .../riscv/xtheadcondmov-mveqz-reg-not.c | 38 + > .../riscv/xtheadcondmov-mvnez-imm-cond.c | 38 + > .../riscv/xtheadcondmov-mvnez-imm-nez.c | 38 + > .../riscv/xtheadcondmov-mvnez-reg-cond.c | 38 + > .../riscv/xtheadcondmov-mvnez-reg-nez.c | 38 + > .../gcc.target/riscv/xtheadcondmov.c | 14 + > .../riscv/xtheadfmemidx-fldr-fstr.c | 58 + > .../gcc.target/riscv/xtheadfmemidx.c | 14 + > .../gcc.target/riscv/xtheadfmv-fmv.c | 24 + > gcc/testsuite/gcc.target/riscv/xtheadfmv.c | 14 + > gcc/testsuite/gcc.target/riscv/xtheadint.c | 14 + > .../gcc.target/riscv/xtheadmac-mula-muls.c | 43 + > gcc/testsuite/gcc.target/riscv/xtheadmac.c | 14 + > .../gcc.target/riscv/xtheadmemidx-ldi-sdi.c | 72 ++ > .../riscv/xtheadmemidx-ldr-str-32.c | 23 + > .../riscv/xtheadmemidx-ldr-str-64.c | 53 + > .../gcc.target/riscv/xtheadmemidx-macros.h | 110 ++ > gcc/testsuite/gcc.target/riscv/xtheadmemidx.c | 14 + > .../gcc.target/riscv/xtheadmempair-1.c | 98 ++ > .../gcc.target/riscv/xtheadmempair-2.c | 84 ++ > .../gcc.target/riscv/xtheadmempair-3.c | 29 + > .../gcc.target/riscv/xtheadmempair.c | 13 + > gcc/testsuite/gcc.target/riscv/xtheadsync.c | 14 + > 52 files changed, 3048 insertions(+), 124 deletions(-) > create mode 100644 gcc/config/riscv/thead.md > create mode 100644 gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba-addsl.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu-2.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-srri.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcmo.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-eqz.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-not.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-cond.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-nez.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx-fldr-fstr.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv-fmv.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadint.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac-mula-muls.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldi-sdi.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-32.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-64.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-macros.h > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-1.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-2.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-3.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair.c > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadsync.c > > -- > 2.39.2 >
On Fri, Feb 24, 2023 at 9:09 AM Kito Cheng <kito.cheng@gmail.com> wrote: > > Hi Christoph: > > OK for trunk for the 1~8, feel free to commit 1~8 after you address > those minor comments, and could you also prepare release notes for > those extensions? I addressed the comment regarding XTheadBs. But I have not done anything regarding XTheadB* and Zb*. Release notes patch can be found here: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612763.html > And 9~11 needs to take a few more rounds of review and test. I've seen the comments regarding patch 10 and 11. We will try to clean this up asap. In the patch for XTheadMemPair there was this nasty typo in one of the tests, is there anything else that is needed? I believe that patch should be in a better shape than the last two patches and it is much less invasive. Further similar code can be found in other backends. Thanks, Christoph > > > > > On Fri, Feb 24, 2023 at 1:52 PM Christoph Muellner > <christoph.muellner@vrull.eu> wrote: > > > > From: Christoph Müllner <christoph.muellner@vrull.eu> > > > > This series introduces support for the T-Head specific RISC-V ISA extensions > > which are available e.g. on the T-Head XuanTie C906. > > > > The ISA spec can be found here: > > https://github.com/T-head-Semi/thead-extension-spec > > > > This series adds support for the following XThead* extensions: > > * XTheadBa > > * XTheadBb > > * XTheadBs > > * XTheadCmo > > * XTheadCondMov > > * XTheadFMemIdx > > * XTheadFmv > > * XTheadInt > > * XTheadMac > > * XTheadMemIdx > > * XTheadMemPair > > * XTheadSync > > > > All extensions are properly integrated and the included tests > > demonstrate the improvements of the generated code. > > > > The series also introduces support for "-mcpu=thead-c906", which also > > enables all available XThead* ISA extensions of the T-Head C906. > > > > All patches have been tested and don't introduce regressions for RV32 or RV64. > > The patches have also been tested with SPEC CPU2017 on QEMU and real HW > > (D1 board). > > > > Support patches for these extensions for Binutils, QEMU, and LLVM have > > already been merged in the corresponding upstream projects. > > > > Changes in v3: > > - Bugfix in XTheadBa > > - Rewrite of XTheadMemPair > > - Inclusion of XTheadMemIdx and XTheadFMemIdx > > > > Christoph Müllner (9): > > riscv: Add basic XThead* vendor extension support > > riscv: riscv-cores.def: Add T-Head XuanTie C906 > > riscv: thead: Add support for the XTheadBa ISA extension > > riscv: thead: Add support for the XTheadBs ISA extension > > riscv: thead: Add support for the XTheadBb ISA extension > > riscv: thead: Add support for the XTheadCondMov ISA extensions > > riscv: thead: Add support for the XTheadMac ISA extension > > riscv: thead: Add support for the XTheadFmv ISA extension > > riscv: thead: Add support for the XTheadMemPair ISA extension > > > > moiz.hussain (2): > > riscv: thead: Add support for the XTheadMemIdx ISA extension > > riscv: thead: Add support for the XTheadFMemIdx ISA extension > > > > gcc/common/config/riscv/riscv-common.cc | 26 + > > gcc/config/riscv/bitmanip.md | 52 +- > > gcc/config/riscv/constraints.md | 43 + > > gcc/config/riscv/iterators.md | 4 + > > gcc/config/riscv/peephole.md | 56 + > > gcc/config/riscv/riscv-cores.def | 4 + > > gcc/config/riscv/riscv-opts.h | 29 + > > gcc/config/riscv/riscv-protos.h | 28 +- > > gcc/config/riscv/riscv.cc | 1090 +++++++++++++++-- > > gcc/config/riscv/riscv.h | 8 +- > > gcc/config/riscv/riscv.md | 169 ++- > > gcc/config/riscv/riscv.opt | 3 + > > gcc/config/riscv/thead.md | 351 ++++++ > > .../gcc.target/riscv/mcpu-thead-c906.c | 28 + > > .../gcc.target/riscv/xtheadba-addsl.c | 55 + > > gcc/testsuite/gcc.target/riscv/xtheadba.c | 14 + > > gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c | 20 + > > .../gcc.target/riscv/xtheadbb-extu-2.c | 22 + > > .../gcc.target/riscv/xtheadbb-extu.c | 22 + > > gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c | 18 + > > gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c | 45 + > > .../gcc.target/riscv/xtheadbb-srri.c | 21 + > > gcc/testsuite/gcc.target/riscv/xtheadbb.c | 14 + > > gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c | 13 + > > gcc/testsuite/gcc.target/riscv/xtheadbs.c | 14 + > > gcc/testsuite/gcc.target/riscv/xtheadcmo.c | 14 + > > .../riscv/xtheadcondmov-mveqz-imm-eqz.c | 38 + > > .../riscv/xtheadcondmov-mveqz-imm-not.c | 38 + > > .../riscv/xtheadcondmov-mveqz-reg-eqz.c | 38 + > > .../riscv/xtheadcondmov-mveqz-reg-not.c | 38 + > > .../riscv/xtheadcondmov-mvnez-imm-cond.c | 38 + > > .../riscv/xtheadcondmov-mvnez-imm-nez.c | 38 + > > .../riscv/xtheadcondmov-mvnez-reg-cond.c | 38 + > > .../riscv/xtheadcondmov-mvnez-reg-nez.c | 38 + > > .../gcc.target/riscv/xtheadcondmov.c | 14 + > > .../riscv/xtheadfmemidx-fldr-fstr.c | 58 + > > .../gcc.target/riscv/xtheadfmemidx.c | 14 + > > .../gcc.target/riscv/xtheadfmv-fmv.c | 24 + > > gcc/testsuite/gcc.target/riscv/xtheadfmv.c | 14 + > > gcc/testsuite/gcc.target/riscv/xtheadint.c | 14 + > > .../gcc.target/riscv/xtheadmac-mula-muls.c | 43 + > > gcc/testsuite/gcc.target/riscv/xtheadmac.c | 14 + > > .../gcc.target/riscv/xtheadmemidx-ldi-sdi.c | 72 ++ > > .../riscv/xtheadmemidx-ldr-str-32.c | 23 + > > .../riscv/xtheadmemidx-ldr-str-64.c | 53 + > > .../gcc.target/riscv/xtheadmemidx-macros.h | 110 ++ > > gcc/testsuite/gcc.target/riscv/xtheadmemidx.c | 14 + > > .../gcc.target/riscv/xtheadmempair-1.c | 98 ++ > > .../gcc.target/riscv/xtheadmempair-2.c | 84 ++ > > .../gcc.target/riscv/xtheadmempair-3.c | 29 + > > .../gcc.target/riscv/xtheadmempair.c | 13 + > > gcc/testsuite/gcc.target/riscv/xtheadsync.c | 14 + > > 52 files changed, 3048 insertions(+), 124 deletions(-) > > create mode 100644 gcc/config/riscv/thead.md > > create mode 100644 gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba-addsl.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadba.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ext.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu-2.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-extu.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-ff1.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-rev.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb-srri.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbb.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs-tst.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadbs.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcmo.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-eqz.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-imm-not.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-eqz.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mveqz-reg-not.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-cond.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-imm-nez.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-cond.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov-mvnez-reg-nez.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadcondmov.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx-fldr-fstr.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmemidx.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv-fmv.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadfmv.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadint.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac-mula-muls.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmac.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldi-sdi.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-32.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-ldr-str-64.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx-macros.h > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmemidx.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-1.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-2.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair-3.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadmempair.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/xtheadsync.c > > > > -- > > 2.39.2 > >