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.
16 files changed:
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)
{
- .option norvc
+ .option arch, -c
.align 2
.align 1
-.option rvc
+.option arch, +c
addi a2, zero, 1
add a0, zero, a1
- .option rvc
+ .option arch, +c
c.nop 0
c.nop 1
- .option rvc
+ .option arch, +c
c.addiw x0, 10
c.jr x0
- .option rvc
+ .option arch, +c
# These are valid instructions.
addiw a6,a6,0
c.addiw a7,0
- .option rvc
+ .option arch, +c
# These are valid instructions.
li a0,0
c.li a1,0
- .option rvc
+ .option arch, +c
# These are hints.
c.li x0, 1
c.lui x0, 2
target:
- .option norvc
+ .option arch, -c
zext.b a0, a0
zext.h a0, a0
sext.b a0, a0
sext.w a1, a2
.endif
- .option rvc
+ .option arch, +c
zext.b a0, a0
zext.h a0, a0
sext.b a0, a0
- .option norvc
+ .option arch, -c
.text
.global funcA
funcA:
- .option norvc
+ .option arch, -c
.text
.word 1
add a0, a0, a0
- .option norvc
+ .option arch, -c
.text
add a0, a0, a0
.long 0
.text
- .option norvc
+ .option arch, -c
.fill 2, 4, 0x1001
.byte 1
.word 0
.option norelax
- .option rvc
+ .option arch, +c
.byte 0
.align 4
nop
- .option norvc
+ .option arch, -c
slli a0, a0, 0
slli a0, a0, 31
slli a0, a0, 32
srai a0, a0, 32
srai a0, a0, 63
- .option rvc
+ .option arch, +c
slli a0, a0, 0
slli a0, a0, 31
slli a0, a0, 32
- .option norvc
+ .option arch, -c
slli a0, a0, 0
slli a0, a0, 31
slli a0, a0, 32
sraiw a0, a0, 32
sraiw a0, a0, 63
- .option rvc
+ .option arch, +c
slli a0, a0, 0
slli a0, a0, 31
slli a0, a0, 32