From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by sourceware.org (Postfix) with ESMTPS id ECB2F3858400 for ; Thu, 22 Sep 2022 14:06:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ECB2F3858400 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-qv1-xf31.google.com with SMTP id y9so6866455qvo.4 for ; Thu, 22 Sep 2022 07:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=t34zVmvJ9cZrWU6FzZ0I4k9vyDrBTjuCCK36c5u+Ak8=; b=BHPGkqVv7bL4HFVS1DiVv8RByMe5dBAbVmO2aYDNReU24/f1UOcmWNMgzwbbZpulYN GgaEQfPgoAsTdEa+cr+aGvd1K1a2NSN++OEd9qN/09X6vvnxk0tHrxuMSoYd3z0jGmEv VRoXMUfDQj7Iny2jhHpwdouox2RdpD67a3KX4u66cDRwJFhmZxAMSSCr1WwOPEyjlMii Y5pGOFpyWza6GvjULqrIdtlhhwhEy1JGJtCmbNlwtaJnYSs+XgeSU32nFlEY0ick4ltn Uj6ot7cDiJ7GN1yb9htzK9TtD0S3hpwfyMSW99/ytazno4Jf1TrDv4Pi5sDzvitsF3sI jWyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=t34zVmvJ9cZrWU6FzZ0I4k9vyDrBTjuCCK36c5u+Ak8=; b=SKCfBPGOwlLYH4lPmeQRDmoNvTbsVi5tG+48pPZwj0GHogv4JE4a4g24ti5vhTYw6k KbQf6mBdB63y1UEXQrwlXTktI4iz8M/hrCYUV944h5Zcc50JLMI8TdSSqMyiqjAoX1jZ otKjYhRR8J4iHlUbPKTNipq8cN1r7yZ1KDhEoTq/il28Zi5m3TylnNpDbzFtAo8MxxtS EC/Sp34q5hWb6Bi+zQhguhneXKMWrf2OF0PM1oIklLmbWWcR/BKSmiS/iBV3EDmtBHGh YQXnonE0mngI7VDEI2Jc2asQJyYI8zSfFFp2XqhLRhagCzmFg/7Fd6g+tdT0dpulcugo XFkA== X-Gm-Message-State: ACrzQf3IbGHPZSzbFrFm41oMLoadrU2snyw/qUyj1BKKCMWJ5pJiyHDH VY4Ylit8nwaXAuNKgk6ocQZqY9I757C7S0gXp3X1eg== X-Google-Smtp-Source: AMsMyM6FontdPGiqSB5DwzZFb6KjHp45lQwLgi9u577Zrb7ge5kA9TjotgRL2ZirnShgvTB2E+YkqZWcG5pEgjrwGOE= X-Received: by 2002:a0c:db05:0:b0:4ac:d6ad:379e with SMTP id d5-20020a0cdb05000000b004acd6ad379emr2711511qvk.121.1663855574404; Thu, 22 Sep 2022 07:06:14 -0700 (PDT) MIME-Version: 1.0 References: <20220918072356.2496130-1-christoph.muellner@vrull.eu> In-Reply-To: From: =?UTF-8?Q?Christoph_M=C3=BCllner?= Date: Thu, 22 Sep 2022 16:06:02 +0200 Message-ID: Subject: Re: [PATCH v2 00/11] Add support for the T-Head vendor extensions To: Nelson Chu Cc: binutils@sourceware.org, Kito Cheng , Jim Wilson , Philipp Tomsich , Palmer Dabbelt , Cooper Qu , Lifang Xia , Yunhai Shang , Zhiwei Liu Content-Type: multipart/alternative; boundary="0000000000007864a205e944907c" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,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 List-Id: --0000000000007864a205e944907c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2022 at 3:55 PM Nelson Chu wrote: > On Sun, Sep 18, 2022 at 3:24 PM Christoph Muellner > wrote: > > > > From: Christoph M=C3=BCllner > > > > This series introduces support for the T-Head vendor extensions, > > which are implemented e.g. in the XuanTie C906 and XuanTie C910 > > processors: > > * XTheadBa > > * XTheadBb > > * XTheadBs > > * XTheadCmo > > * XTheadCondMov > > * XTheadFMemIdx > > * XTheadMac > > * XTheadMemIdx > > * XTheadMemPair > > * XTheadSync > > > > The xthead* extensions are documented here: > > > https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.0= .0/xthead-2022-09-05-2.0.0.pdf > > > > The "th." instruction prefix prevents future conflicts with standard > > extensions and has been documentented in the RISC-V toolchain > conventions: > > https://github.com/riscv-non-isa/riscv-toolchain-conventions/pull/19 > > > > The goal of this patchset is to provide access to these instructions > > so that compilers/users can optimize SW accordingly. > > > > Note, that the T-Head vendor extensions do not contain all > > vendor-specific functionality of the T-Head SoCs (e.g. no vendor-specif= ic > > CSRs are included). Instead the extensions cover coherent functionality, > > that is exposed to S and U mode. > > > > The patchset attempts to minimize code changes in generic/infrastructure > code. > > All patches in this series come with tests to avoid future regressions. > > > > v2: > > * Drop -mcpu=3D support patches > > * Add extensions to riscv_multi_subset_supports_ext > > * Rename operand 'L' to 'Xl' > > Thanks for updating these. > > > Christoph M=C3=BCllner (11): > > RISC-V: Add generic support for vendor extensions > > RISC-V: Add T-Head CMO vendor extension > > RISC-V: Add T-Head SYNC vendor extension > > RISC-V: Add support for arbitrary immediate encoding formats > > RISC-V: Add T-Head Bitmanip vendor extension > > RISC-V: Add T-Head CondMov vendor extension > > RISC-V: Add T-Head MAC vendor extension > > RISC-V: Add T-Head FMemIdx vendor extension > > RISC-V: Add T-Head MemIdx vendor extension > > RISC-V: Add support for literal instruction arguments > > RISC-V: Add T-Head MemPair vendor extension > > Looks good to me, I had heard from many people that we need the > support of t-head vendor extensions for al long time, so please commit > them if you think it's time. > I don't have write access, but Philipp Tomsich will push changes upstream later today. Thank you for the review! > > Thanks for all your contribution > Nelson > > > bfd/elfxx-riscv.c | 59 +++- > > gas/config/tc-riscv.c | 84 +++++ > > gas/doc/c-riscv.texi | 63 ++++ > > gas/testsuite/gas/riscv/x-thead-ba-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-ba-fail.l | 3 + > > gas/testsuite/gas/riscv/x-thead-ba-fail.s | 3 + > > gas/testsuite/gas/riscv/x-thead-ba.d | 13 + > > gas/testsuite/gas/riscv/x-thead-ba.s | 6 + > > gas/testsuite/gas/riscv/x-thead-bb-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-bb-fail.l | 7 + > > gas/testsuite/gas/riscv/x-thead-bb-fail.s | 7 + > > gas/testsuite/gas/riscv/x-thead-bb.d | 30 ++ > > gas/testsuite/gas/riscv/x-thead-bb.s | 22 ++ > > gas/testsuite/gas/riscv/x-thead-bs-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-bs-fail.l | 3 + > > gas/testsuite/gas/riscv/x-thead-bs-fail.s | 3 + > > gas/testsuite/gas/riscv/x-thead-bs.d | 14 + > > gas/testsuite/gas/riscv/x-thead-bs.s | 6 + > > gas/testsuite/gas/riscv/x-thead-cmo-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-cmo-fail.l | 22 ++ > > gas/testsuite/gas/riscv/x-thead-cmo-fail.s | 22 ++ > > gas/testsuite/gas/riscv/x-thead-cmo.d | 30 ++ > > gas/testsuite/gas/riscv/x-thead-cmo.s | 22 ++ > > gas/testsuite/gas/riscv/x-thead-condmov.d | 11 + > > gas/testsuite/gas/riscv/x-thead-condmov.s | 3 + > > .../gas/riscv/x-thead-fmemidx-fail.d | 3 + > > .../gas/riscv/x-thead-fmemidx-fail.l | 18 + > > .../gas/riscv/x-thead-fmemidx-fail.s | 17 + > > gas/testsuite/gas/riscv/x-thead-fmemidx.d | 25 ++ > > gas/testsuite/gas/riscv/x-thead-fmemidx.s | 17 + > > gas/testsuite/gas/riscv/x-thead-mac.d | 15 + > > gas/testsuite/gas/riscv/x-thead-mac.s | 7 + > > gas/testsuite/gas/riscv/x-thead-memidx-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-memidx-fail.l | 14 + > > gas/testsuite/gas/riscv/x-thead-memidx-fail.s | 14 + > > gas/testsuite/gas/riscv/x-thead-memidx.d | 53 +++ > > gas/testsuite/gas/riscv/x-thead-memidx.s | 48 +++ > > .../gas/riscv/x-thead-mempair-fail.d | 3 + > > .../gas/riscv/x-thead-mempair-fail.l | 30 ++ > > .../gas/riscv/x-thead-mempair-fail.s | 30 ++ > > gas/testsuite/gas/riscv/x-thead-mempair.d | 14 + > > gas/testsuite/gas/riscv/x-thead-mempair.s | 6 + > > gas/testsuite/gas/riscv/x-thead-sync-fail.d | 3 + > > gas/testsuite/gas/riscv/x-thead-sync-fail.l | 6 + > > gas/testsuite/gas/riscv/x-thead-sync-fail.s | 6 + > > gas/testsuite/gas/riscv/x-thead-sync.d | 14 + > > gas/testsuite/gas/riscv/x-thead-sync.s | 6 + > > include/opcode/riscv-opc.h | 326 ++++++++++++++++++ > > include/opcode/riscv.h | 27 ++ > > opcodes/riscv-dis.c | 43 +++ > > opcodes/riscv-opc.c | 155 +++++++++ > > 51 files changed, 1346 insertions(+), 2 deletions(-) > > create mode 100644 gas/testsuite/gas/riscv/x-thead-ba-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-ba-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-ba-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-ba.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-ba.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bb-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bb-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bb-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bb.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bb.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bs-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bs-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bs-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bs.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-bs.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-cmo-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-cmo-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-cmo-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-cmo.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-cmo.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-condmov.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-condmov.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-fmemidx-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-fmemidx-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-fmemidx-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-fmemidx.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-fmemidx.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mac.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mac.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-memidx-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-memidx-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-memidx-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-memidx.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-memidx.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mempair-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mempair-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mempair-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mempair.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-mempair.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-sync-fail.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-sync-fail.l > > create mode 100644 gas/testsuite/gas/riscv/x-thead-sync-fail.s > > create mode 100644 gas/testsuite/gas/riscv/x-thead-sync.d > > create mode 100644 gas/testsuite/gas/riscv/x-thead-sync.s > > > > -- > > 2.37.2 > > > --0000000000007864a205e944907c--