From patchwork Tue Oct 8 06:06:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Zeng X-Patchwork-Id: 98477 Return-Path: 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 3B247385DDE4 for ; Tue, 8 Oct 2024 06:07:36 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by sourceware.org (Postfix) with ESMTP id A6D3A3858D29 for ; Tue, 8 Oct 2024 06:07:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6D3A3858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eswincomputing.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A6D3A3858D29 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.97.181.73 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728367631; cv=none; b=pXPu+smJn7ZJsLIZPwQmoYa7vdZGfMWvS19oqiSflc9u3FBZ60QjVAOjgAOGhqUJG8XDnKwBSNnadhd6edv7Bc3VK7PvauC8LkxwMlZkrCK604Stjzcfx4lQl3cb87WbMAMuMFZcai8GMim9kUmOcDV6zNeqhscBV6Vldskddfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728367631; c=relaxed/simple; bh=wAYem23auqq7dmNhfcQcL17TDKizHtAIK8/Z5Wfm/0M=; h=From:To:Subject:Date:Message-Id; b=lGJYJT8lHWnUMVk/rpS2o4n/zv42pkaVJGwvjk58HIAbK/rAEpIVEp2hoLApriGcHI9udGQXYL9OFjC5shIbZGfxnv3EMJ40OiukZFLh5bwBdOrhsAwqtThJjf/H6ZiOje4V5jzJwTnkJEZOY3rL/IVfqUyxxHpZZRWLTrpVE+8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost.localdomain (unknown [10.12.130.38]) by app2 (Coremail) with SMTP id TQJkCgCHS+UDzARn+U0MAA--.59092S4; Tue, 08 Oct 2024 14:07:00 +0800 (CST) From: Xiao Zeng To: binutils@sourceware.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, nelson@rivosinc.com, zhengyu@eswincomputing.com, jiawei@iscas.ac.cn, Xiao Zeng Subject: [PATCH] RISC-V: Add an implicit dependency for Zawrs Date: Tue, 8 Oct 2024 14:06:58 +0800 Message-Id: <20241008060658.92112-1-zengxiao@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: TQJkCgCHS+UDzARn+U0MAA--.59092S4 X-Coremail-Antispam: 1UD129KBjvJXoW7CF45Gr1rXw15KrWUWF17KFg_yoW5JF1fpF W3JF10kF95Xa97JrnrJF18Zr47XrnYgryY9r1xZ347WF4rJrZrtFnIyw1ruFs8JFZ8Cw13 ua1SqFWrZF1jvaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkF14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26rxl 6s0DM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s 0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVCm-wCF04k2 0xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI 8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41l IxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIx AIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2 jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUdHUDUUUUU= X-CM-SenderInfo: p2hqw5xldrqvxvzl0uprps33xlqjhudrp/ X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL, SPF_HELO_NONE, SPF_PASS, TXREP 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org There is a description in : "The instructions in the Zawrs extension are only useful in conjunction with the LR instruction, which is provided by the Zalrsc component of the A extension." It can be concluded that: zawrs -> zalrsc. The implementation in gcc is as follows: bfd/ChangeLog: * elfxx-riscv.c: zawrs -> zalrsc. gas/ChangeLog: * testsuite/gas/riscv/imply.d: Add implicit dependency testing for zawrs. * testsuite/gas/riscv/imply.s: Updated. Signed-off-by: Xiao Zeng --- bfd/elfxx-riscv.c | 1 + gas/testsuite/gas/riscv/imply.d | 1 + gas/testsuite/gas/riscv/imply.s | 1 + 3 files changed, 3 insertions(+) diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 4b48d8ee9f0..b7b4d95195e 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1184,6 +1184,7 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] = {"zabha", "+zaamo", check_implicit_always}, {"zacas", "+zaamo", check_implicit_always}, + {"zawrs", "+zalrsc", check_implicit_always}, {"a", "+zaamo,+zalrsc", check_implicit_always}, {"xsfvcp", "+zve32x", check_implicit_always}, diff --git a/gas/testsuite/gas/riscv/imply.d b/gas/testsuite/gas/riscv/imply.d index 26eff8c650a..64dda77a9f8 100644 --- a/gas/testsuite/gas/riscv/imply.d +++ b/gas/testsuite/gas/riscv/imply.d @@ -17,6 +17,7 @@ SYMBOL TABLE: [0-9a-f]+ l .text 0+000 \$xrv32i2p1_m2p0_zmmul1p0 [0-9a-f]+ l .text 0+000 \$xrv32i2p1_zaamo1p0_zabha1p0 [0-9a-f]+ l .text 0+000 \$xrv32i2p1_zaamo1p0_zacas1p0 +[0-9a-f]+ l .text 0+000 \$xrv32i2p1_zalrsc1p0_zawrs1p0 [0-9a-f]+ l .text 0+000 \$xrv32i2p1_a2p1_zaamo1p0_zalrsc1p0 [0-9a-f]+ l .text 0+000 \$xrv32i2p1_zicsr2p0_zve32x1p0_zvl32b1p0_xsfvcp1p0 [0-9a-f]+ l .text 0+000 \$xrv32i2p1_f2p2_d2p2_v1p0_zicsr2p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0 diff --git a/gas/testsuite/gas/riscv/imply.s b/gas/testsuite/gas/riscv/imply.s index dabb08d8c8b..c831ea63f04 100644 --- a/gas/testsuite/gas/riscv/imply.s +++ b/gas/testsuite/gas/riscv/imply.s @@ -18,6 +18,7 @@ imply m imply zabha imply zacas +imply zawrs imply a imply xsfvcp