Skip to content

Commit 695776d

Browse files
committed
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.
1 parent 3dfee72 commit 695776d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gas/config/tc-riscv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4376,7 +4376,8 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
43764376
riscv_reset_subsets_list_arch_str ();
43774377

43784378
riscv_set_rvc (false);
4379-
if (riscv_subset_supports (&riscv_rps_as, "c"))
4379+
if (riscv_subset_supports (&riscv_rps_as, "c")
4380+
|| riscv_subset_supports (&riscv_rps_as, "zca"))
43804381
riscv_set_rvc (true);
43814382

43824383
if (riscv_subset_supports (&riscv_rps_as, "ztso"))

0 commit comments

Comments
 (0)