Message ID | 20220830062752.94761-1-juzhe.zhong@rivai.ai |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp1727295wro; Mon, 29 Aug 2022 23:29:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR4CjdSklsjKts5C9E7S65dz3VP7Eu+r0c6XqjzrmENOoAJSIkGPRjNFYZL1ifjNnyYzzv5Y X-Received: by 2002:a17:907:9606:b0:72f:826d:21b4 with SMTP id gb6-20020a170907960600b0072f826d21b4mr15869534ejc.510.1661840941225; Mon, 29 Aug 2022 23:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661840941; cv=none; d=google.com; s=arc-20160816; b=RfsKT5cqo7Krz8AGHzcDVQ/NRdqjiB5rfz6DQ7VESONsz1toCBHGKIIebM4alp7gab nuYyXeisjm21LZ8BPLPCCmU70lnvsThc7mAkh+cmFdce1ylytpkXFc75SI6RmEqK2M1/ zTyGRFwvcCiMpU5upLaSQLvTwSiEr3TtAjg7QnZg5zPYYj8HjowvZOuWm+B02lwTgf5u qpvuY1zH8CxYFwGyidZ1vvJ/TPKBSiaSXohhpp5Cn2fD7GS6vRm2bkxJl8PP8hJe0PPJ r6xur6Zrk6jL8PmmErUJefZFX+Kaswc8obwkNZkQWdvZZlFedwiLzz7QihPX67l6bBtY NutA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:feedback-id :content-transfer-encoding:mime-version:message-id:date:subject:to :from:dmarc-filter:delivered-to; bh=YjHoy00oSG/hgn/nGhj0d0MYgKVu06IlFm//M4kSyE8=; b=zYBJyHoEKncvSbG8FUiLVheuu4Od7pa5rO1FTLsD1/LGlc5tWBNR0WwzTnl84yqfZz tr3RbUndlN/703x8LQxXbx7ZC/OTrBZwg2e9kRwxaRWLptG739hF+mEJbFQLwyyGcEmk pDEBlEGsAgtUVrmutcrwdOwINQ8Rw4NLLvNk0+T7wdM1eP7ytsqGu39Og/DiCql9AU4q JoRopBUhMTlVd8OxH+8gBOgDcuucwgGOVsKfH8KStFA1tD3jGQkc/25CujSVlwkKHDuR +G0OmQPHZzUF0R2UsmOKv3l+3A+XJrPY1Xs0J+BkXaDS35bOKbphjIpfrDtb2pEq7GFZ QuvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id i15-20020a1709064fcf00b007314b427e96si9229725ejw.633.2022.08.29.23.29.00 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 23:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE89D3AA8023 for <ouuuleilei@gmail.com>; Tue, 30 Aug 2022 06:28:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbgjp3.qq.com (smtpbgjp3.qq.com [54.92.39.34]) by sourceware.org (Postfix) with ESMTPS id F06A8385E00A for <gcc-patches@gcc.gnu.org>; Tue, 30 Aug 2022 06:28:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F06A8385E00A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp66t1661840874twbnbikk Received: from server1.localdomain ( [42.247.22.66]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 30 Aug 2022 14:27:53 +0800 (CST) X-QQ-SSF: 01400000000000C0I000000A0000000 X-QQ-FEAT: D6RqbDSxuq4Cud6Q73Dai6NLwRwSJDbMaRlgC6EppfKzNFzmujXIElDBBdRFZ aNFY0ef85MQT7dTE5rrYq5AVArFLScBOxrA9YMUMXG8kSIPOfOc3j9eYm9zipCljeMxzGnq bk/EnE9PCcHlo85Nuu0DsJYw25Oq6ET5Dp+b4cCF18d9AyfNKyHVipOwEbBQ+JAVMcFpDrV hVCh4eXfK62B3NlVxTb7Tf3aoCqgVXDrrPTb5fLiC51CwbkZdwk4unx/9pZ3iIF6uyQKYJ+ KiiZsWDrav68OzHeQigD95dxfXkbJsnXzNHvT6siyikU4nClTkEZI69piQFWJK2AdUmq96V 5v9coyjj46Zdem5ZPE+waimRRZnZz8hpc5etME9Od2ew4Bijaxo0aWYNt5aArl0iou9bKhl X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V: Add RVV registers in TARGET_CONDITION_AL_REGISTER_USAGE Date: Tue, 30 Aug 2022 14:27:52 +0800 Message-Id: <20220830062752.94761-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, URIBL_BLACK 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> Cc: kito.cheng@gmail.com, zhongjuzhe <juzhe.zhong@rivai.ai> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742566526941298185?= X-GMAIL-MSGID: =?utf-8?q?1742566526941298185?= |
Series |
RISC-V: Add RVV registers in TARGET_CONDITION_AL_REGISTER_USAGE
|
|
Commit Message
juzhe.zhong@rivai.ai
Aug. 30, 2022, 6:27 a.m. UTC
From: zhongjuzhe <juzhe.zhong@rivai.ai>
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_conditional_register_usage): Add RVV registers.
---
gcc/config/riscv/riscv.cc | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
Committed with title fix, that should be TARGET_CONDITIONAL_REGISTER_USAGE On Tue, Aug 30, 2022 at 2:28 PM <juzhe.zhong@rivai.ai> wrote: > > From: zhongjuzhe <juzhe.zhong@rivai.ai> > > gcc/ChangeLog: > > * config/riscv/riscv.cc (riscv_conditional_register_usage): Add RVV registers. > > --- > gcc/config/riscv/riscv.cc | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc > index 50de6a83cba..aebe3c0ab6b 100644 > --- a/gcc/config/riscv/riscv.cc > +++ b/gcc/config/riscv/riscv.cc > @@ -5439,6 +5439,15 @@ riscv_conditional_register_usage (void) > for (int regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) > call_used_regs[regno] = 1; > } > + > + if (!TARGET_VECTOR) > + { > + for (int regno = V_REG_FIRST; regno <= V_REG_LAST; regno++) > + fixed_regs[regno] = call_used_regs[regno] = 1; > + > + fixed_regs[VTYPE_REGNUM] = call_used_regs[VTYPE_REGNUM] = 1; > + fixed_regs[VL_REGNUM] = call_used_regs[VL_REGNUM] = 1; > + } > } > > /* Return a register priority for hard reg REGNO. */ > -- > 2.36.1 >
diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 50de6a83cba..aebe3c0ab6b 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -5439,6 +5439,15 @@ riscv_conditional_register_usage (void) for (int regno = FP_REG_FIRST; regno <= FP_REG_LAST; regno++) call_used_regs[regno] = 1; } + + if (!TARGET_VECTOR) + { + for (int regno = V_REG_FIRST; regno <= V_REG_LAST; regno++) + fixed_regs[regno] = call_used_regs[regno] = 1; + + fixed_regs[VTYPE_REGNUM] = call_used_regs[VTYPE_REGNUM] = 1; + fixed_regs[VL_REGNUM] = call_used_regs[VL_REGNUM] = 1; + } } /* Return a register priority for hard reg REGNO. */