aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNelson Chu <nelson.chu@sifive.com>2021-11-22 18:21:15 +0800
committerNelson Chu <nelson.chu@sifive.com>2021-11-22 19:31:29 +0800
commite7e599a156fe24631f313e95818dfc79fb3112d7 (patch)
tree096d29a2cbffb669478590dce52b2f5de29dcb53 /gas/config
parenta92d031d7ef6e192fb404a86d53fa834e1e3eb8c (diff)
downloadgdb-e7e599a156fe24631f313e95818dfc79fb3112d7.zip
gdb-e7e599a156fe24631f313e95818dfc79fb3112d7.tar.gz
gdb-e7e599a156fe24631f313e95818dfc79fb3112d7.tar.bz2
RISC-V: Replace .option rvc/norvc with .option arch, +c/-c.
Since the .option rvc/norvc directives are obsolete, replace them with the new proposed diretives: .option arch, +c/-c. And also reset the riscv_opts.rvc flag for the .option arch directives. gas/ * config/tc-riscv.c (s_riscv_option): Reset the riscv_opts.rvc for the .option arch directives. * testsuite/gas/riscv/align-1.s: Replace the obsolete .option rvc/norvc with .option arch, +c/-c. * testsuite/gas/riscv/c-add-addi.s: Likewise. * testsuite/gas/riscv/c-nonzero-imm.s: Likewise. * testsuite/gas/riscv/c-nonzero-reg.s: Likewise. * testsuite/gas/riscv/c-zero-imm-64.s: Likewise. * testsuite/gas/riscv/c-zero-imm.s: Likewise. * testsuite/gas/riscv/c-zero-reg.s: Likewise. * testsuite/gas/riscv/ext.s: Likewise. * testsuite/gas/riscv/mapping-01.s: Likewise. * testsuite/gas/riscv/mapping-02.s: Likewise. * testsuite/gas/riscv/mapping-03.s: Likewise. * testsuite/gas/riscv/mapping-04.s: Likewise. * testsuite/gas/riscv/no-relax-align-2.s: Likewise. * testsuite/gas/riscv/shamt-32.s: Likewise. * testsuite/gas/riscv/shamt-64.s: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-riscv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index da3d911..e806121 100644
--- a/gas/config/tc-riscv.c
+++ b/gas/config/tc-riscv.c
@@ -3773,6 +3773,10 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
if (ISSPACE (*name) && *name != '\0')
name++;
riscv_update_subset (&riscv_rps_as, name);
+
+ riscv_set_rvc (false);
+ if (riscv_subset_supports (&riscv_rps_as, "c"))
+ riscv_set_rvc (true);
}
else if (strcmp (name, "push") == 0)
{