Message ID | 20230607125641.727633-1-jiawei@iscas.ac.cn |
---|---|
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 F3EF7385C6E8 for <patchwork@sourceware.org>; Wed, 7 Jun 2023 12:57:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from cstnet.cn (smtp80.cstnet.cn [159.226.251.80]) by sourceware.org (Postfix) with ESMTPS id F3109385771F for <gcc-patches@gcc.gnu.org>; Wed, 7 Jun 2023 12:57:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3109385771F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from localhost.localdomain (unknown [47.106.175.39]) by APP-01 (Coremail) with SMTP id qwCowADX3haXfoBkAQ8HDQ--.38410S2; Wed, 07 Jun 2023 20:56:56 +0800 (CST) From: Jiawei <jiawei@iscas.ac.cn> To: gcc-patches@gcc.gnu.org Cc: kito.cheng@sifive.com, palmer@dabbelt.com, christoph.muellner@vrull.eu, jeremy.bennett@embecosm.com, mary.bennett@embecosm.com, nandni.jamnadas@embecosm.com, charlie.keaney@embecosm.com, simon.cook@embecosm.com, tariq.kurd@codasip.com, ibrahim.abu.kharmeh1@huawei.com, gaofei@eswincomputing.com, sinan.lin@linux.alibaba.com, wuwei2016@iscas.ac.cn, shihua@iscas.ac.cn, shiyulong@iscas.ac.cn, chenyixuan@iscas.ac.cn, Jiawei <jiawei@iscas.ac.cn> Subject: [PATCH v2 0/3] RISC-V: Support ZC* extensions. Date: Wed, 7 Jun 2023 20:56:38 +0800 Message-Id: <20230607125641.727633-1-jiawei@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qwCowADX3haXfoBkAQ8HDQ--.38410S2 X-Coremail-Antispam: 1UD129KBjvJXoWxJFyrZF1xZFy7tr15GFWrAFb_yoW5GFW8pF sYkr1Fkas8GrZ7A3yfta47Xw45KasYgr43Zws7tw18AayUJrWrZF95tw43C3W5JF45W3sx Ca4S9r98u3W2vaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvv14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCY02Avz4vE174l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr 1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE 14v26r4a6rW5MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7 IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E 87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73Uj IFyTuYvjfUUqXdUUUUU X-Originating-IP: [47.106.175.39] X-CM-SenderInfo: 5mld4v3l6l2u1dvotugofq/1tbiCQcPAGSAdOkYDgAAsu X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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: Support ZC* extensions. | |
Message
Jiawei
June 7, 2023, 12:56 p.m. UTC
RISC-V Code Size Reduction(ZC*) extensions is a group of extensions which define subsets of the existing C extension (Zca, Zcd, Zcf) and new extensions(Zcb, Zcmp, Zcmt) which only contain 16-bit encodings.[1] The implementation of the RISC-V Code Size Reduction extension in GCC is an important step towards making the RISC-V architecture more efficient. The cooperation with OpenHW group has played a crucial role in this effort, with facilitating the implementation, testing and validation. Currently works can also find in OpenHW group's github repo.[2] Thanks to Tariq Kurd, Ibrahim Abu Kharmeh for help with explain the specification, and Jeremy Bennett's patient guidance throughout the whole development process.a V2 changes: Fix Kito's comments in first version, Eswin assisted in optimizing the implementation of Zcmp extension: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617440.html https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617442.html https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620869.html [1] github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification [2] github.com/openhwgroup/corev-gcc Co-Authored by: Charlie Keaney <charlie.keaney@embecosm.com> Co-Authored by: Mary Bennett <mary.bennett@embecosm.com> Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com> Co-Authored by: Sinan Lin <sinan.lin@linux.alibaba.com> Co-Authored by: Simon Cook <simon.cook@embecosm.com> Co-Authored by: Shihua Liao <shihua@iscas.ac.cn> Co-Authored by: Yulong Shi <yulong@iscas.ac.cn> RISC-V: Minimal support for ZC extensions. RISC-V: Enable compressible features when use ZC* extensions. RISC-V: Add ZC* test for march args being passed. Jiawei (3): RISC-V: Minimal support for ZC* extensions. RISC-V: Enable compressible features when use ZC* extensions. RISC-V: Add ZC* test for failed march args being passed. gcc/common/config/riscv/riscv-common.cc | 38 +++++++++++++++++++++++ gcc/config/riscv/riscv-c.cc | 2 +- gcc/config/riscv/riscv-opts.h | 16 ++++++++++ gcc/config/riscv/riscv-shorten-memrefs.cc | 3 +- gcc/config/riscv/riscv.cc | 11 ++++--- gcc/config/riscv/riscv.h | 2 +- gcc/config/riscv/riscv.opt | 3 ++ gcc/testsuite/gcc.target/riscv/arch-22.c | 5 +++ gcc/testsuite/gcc.target/riscv/arch-23.c | 5 +++ 9 files changed, 78 insertions(+), 7 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/arch-22.c create mode 100644 gcc/testsuite/gcc.target/riscv/arch-23.c
Comments
Thanks Jiawei, v2 patch set are LGTM, but I would like to defer this until binutils part has merged, I know you guys already implement that for a while, so I think it’s almost there :) Jiawei <jiawei@iscas.ac.cn>於 2023年6月7日 週三,20:57寫道: > RISC-V Code Size Reduction(ZC*) extensions is a group of extensions > which define subsets of the existing C extension (Zca, Zcd, Zcf) and new > extensions(Zcb, Zcmp, Zcmt) which only contain 16-bit encodings.[1] > > The implementation of the RISC-V Code Size Reduction extension in GCC is > an important step towards making the RISC-V architecture more efficient. > > The cooperation with OpenHW group has played a crucial role in this effort, > with facilitating the implementation, testing and validation. Currently > works can also find in OpenHW group's github repo.[2] > > Thanks to Tariq Kurd, Ibrahim Abu Kharmeh for help with explain the > specification, and Jeremy Bennett's patient guidance throughout the whole > development process.a > > V2 changes: > Fix Kito's comments in first version, Eswin assisted in optimizing the > implementation of Zcmp extension: > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617440.html > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617442.html > > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620869.html > > > [1] github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification > > [2] github.com/openhwgroup/corev-gcc > > Co-Authored by: Charlie Keaney <charlie.keaney@embecosm.com> > Co-Authored by: Mary Bennett <mary.bennett@embecosm.com> > Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com> > Co-Authored by: Sinan Lin <sinan.lin@linux.alibaba.com> > Co-Authored by: Simon Cook <simon.cook@embecosm.com> > Co-Authored by: Shihua Liao <shihua@iscas.ac.cn> > Co-Authored by: Yulong Shi <yulong@iscas.ac.cn> > > RISC-V: Minimal support for ZC extensions. > RISC-V: Enable compressible features when use ZC* extensions. > RISC-V: Add ZC* test for march args being passed. > > > Jiawei (3): > RISC-V: Minimal support for ZC* extensions. > RISC-V: Enable compressible features when use ZC* extensions. > RISC-V: Add ZC* test for failed march args being passed. > > gcc/common/config/riscv/riscv-common.cc | 38 +++++++++++++++++++++++ > gcc/config/riscv/riscv-c.cc | 2 +- > gcc/config/riscv/riscv-opts.h | 16 ++++++++++ > gcc/config/riscv/riscv-shorten-memrefs.cc | 3 +- > gcc/config/riscv/riscv.cc | 11 ++++--- > gcc/config/riscv/riscv.h | 2 +- > gcc/config/riscv/riscv.opt | 3 ++ > gcc/testsuite/gcc.target/riscv/arch-22.c | 5 +++ > gcc/testsuite/gcc.target/riscv/arch-23.c | 5 +++ > 9 files changed, 78 insertions(+), 7 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/riscv/arch-22.c > create mode 100644 gcc/testsuite/gcc.target/riscv/arch-23.c > > -- > 2.25.1 > >
Pushed to the trunk, with slight updates like rename and update testcases :) On Wed, Jun 7, 2023 at 10:28 PM Kito Cheng via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Thanks Jiawei, v2 patch set are LGTM, but I would like to defer this until > binutils part has merged, I know you guys already implement that for a > while, so I think it’s almost there :) > > Jiawei <jiawei@iscas.ac.cn>於 2023年6月7日 週三,20:57寫道: > > > RISC-V Code Size Reduction(ZC*) extensions is a group of extensions > > which define subsets of the existing C extension (Zca, Zcd, Zcf) and new > > extensions(Zcb, Zcmp, Zcmt) which only contain 16-bit encodings.[1] > > > > The implementation of the RISC-V Code Size Reduction extension in GCC is > > an important step towards making the RISC-V architecture more efficient. > > > > The cooperation with OpenHW group has played a crucial role in this effort, > > with facilitating the implementation, testing and validation. Currently > > works can also find in OpenHW group's github repo.[2] > > > > Thanks to Tariq Kurd, Ibrahim Abu Kharmeh for help with explain the > > specification, and Jeremy Bennett's patient guidance throughout the whole > > development process.a > > > > V2 changes: > > Fix Kito's comments in first version, Eswin assisted in optimizing the > > implementation of Zcmp extension: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617440.html > > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617442.html > > > > https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620869.html > > > > > > [1] github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification > > > > [2] github.com/openhwgroup/corev-gcc > > > > Co-Authored by: Charlie Keaney <charlie.keaney@embecosm.com> > > Co-Authored by: Mary Bennett <mary.bennett@embecosm.com> > > Co-Authored by: Nandni Jamnadas <nandni.jamnadas@embecosm.com> > > Co-Authored by: Sinan Lin <sinan.lin@linux.alibaba.com> > > Co-Authored by: Simon Cook <simon.cook@embecosm.com> > > Co-Authored by: Shihua Liao <shihua@iscas.ac.cn> > > Co-Authored by: Yulong Shi <yulong@iscas.ac.cn> > > > > RISC-V: Minimal support for ZC extensions. > > RISC-V: Enable compressible features when use ZC* extensions. > > RISC-V: Add ZC* test for march args being passed. > > > > > > Jiawei (3): > > RISC-V: Minimal support for ZC* extensions. > > RISC-V: Enable compressible features when use ZC* extensions. > > RISC-V: Add ZC* test for failed march args being passed. > > > > gcc/common/config/riscv/riscv-common.cc | 38 +++++++++++++++++++++++ > > gcc/config/riscv/riscv-c.cc | 2 +- > > gcc/config/riscv/riscv-opts.h | 16 ++++++++++ > > gcc/config/riscv/riscv-shorten-memrefs.cc | 3 +- > > gcc/config/riscv/riscv.cc | 11 ++++--- > > gcc/config/riscv/riscv.h | 2 +- > > gcc/config/riscv/riscv.opt | 3 ++ > > gcc/testsuite/gcc.target/riscv/arch-22.c | 5 +++ > > gcc/testsuite/gcc.target/riscv/arch-23.c | 5 +++ > > 9 files changed, 78 insertions(+), 7 deletions(-) > > create mode 100644 gcc/testsuite/gcc.target/riscv/arch-22.c > > create mode 100644 gcc/testsuite/gcc.target/riscv/arch-23.c > > > > -- > > 2.25.1 > > > >