From e7e599a156fe24631f313e95818dfc79fb3112d7 Mon Sep 17 00:00:00 2001 From: Nelson Chu Date: Mon, 22 Nov 2021 18:21:15 +0800 Subject: 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. --- gas/config/tc-riscv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gas/config') 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) { -- cgit v1.1