From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id 96E8C3858020 for ; Tue, 25 Jul 2023 01:56:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 96E8C3858020 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 9B84E300089; Tue, 25 Jul 2023 01:56:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1690250217; bh=Nk9fMdiqX/SaIIH4sjVSL+A6gwjvHymW1pbfb7puXBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=CgMGFbXHlmbKHjELmlAD3+qzvRYyW5gZ708B5LDMiVzAsXm051BF5RoGe8VlnsQBf QxhwgxsRb2IkIjLGjgVpD9wVZi3Rzz7P73H8BfqqKMY45ZC17GmPI8mo2khJYRHkt2 nr5I9G654Im29Vt4cDW9kGDXhpwD05EPM0m1vsow= From: Tsukasa OI To: Tsukasa OI , Nelson Chu , Kito Cheng , Palmer Dabbelt Cc: binutils@sourceware.org Subject: [PATCH 1/1] RISC-V: Enable RVC on ".option arch, +zca" etc. Date: Tue, 25 Jul 2023 01:56:28 +0000 Message-ID: <695776dc2f43c56dd2ae2f7036fb7cf74e19b46b.1690250175.git.research_trasio@irq.a4lg.com> In-Reply-To: References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,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 List-Id: From: Tsukasa OI Since the 'Zca' extension is the new base of the compressed instructions, this commit enables RVC *also* when the 'Zca' extension is enabled via ".option arch" directive. gas/ChangeLog: * config/tc-riscv.c (s_riscv_option): Enable RVC also when the 'Zca' extension is enabled after an ".option arch" directive. --- gas/config/tc-riscv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 80c14a3cd221..aaf8b9be64fd 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -4376,7 +4376,8 @@ s_riscv_option (int x ATTRIBUTE_UNUSED) riscv_reset_subsets_list_arch_str (); riscv_set_rvc (false); - if (riscv_subset_supports (&riscv_rps_as, "c")) + if (riscv_subset_supports (&riscv_rps_as, "c") + || riscv_subset_supports (&riscv_rps_as, "zca")) riscv_set_rvc (true); if (riscv_subset_supports (&riscv_rps_as, "ztso")) -- 2.41.0