From: Tsukasa OI Date: Tue, 25 Jul 2023 01:40:09 +0000 (+0000) Subject: RISC-V: Enable RVC on ".option arch, +zca" etc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=695776dc2f43c56dd2ae2f7036fb7cf74e19b46b;p=binutils-gdb.git RISC-V: Enable RVC on ".option arch, +zca" etc. 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. --- diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 80c14a3cd22..aaf8b9be64f 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"))