aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-riscv.c
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2023-07-25 01:40:09 +0000
committerTsukasa OI <research_trasio@irq.a4lg.com>2023-07-25 01:42:44 +0000
commit695776dc2f43c56dd2ae2f7036fb7cf74e19b46b (patch)
tree4e44329a84781eda480789b88c0c08d1b1c62dba /gas/config/tc-riscv.c
parent3dfee72010248aca5932a27b4c34d3b79ab9f057 (diff)
downloadgdb-695776dc2f43c56dd2ae2f7036fb7cf74e19b46b.zip
gdb-695776dc2f43c56dd2ae2f7036fb7cf74e19b46b.tar.gz
gdb-695776dc2f43c56dd2ae2f7036fb7cf74e19b46b.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-riscv.c')
-rw-r--r--gas/config/tc-riscv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 80c14a3..aaf8b9b 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"))