]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: error handling for subset parsing
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Jun 2026 09:10:28 +0000 (11:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Jun 2026 09:10:28 +0000 (11:10 +0200)
commit11cbe94d245c06313541e4e4c87745f74856d5dd
tree045000094e8737580a91be02aa98ed37ffef61ef
parent413cf36d8e816f8fbbe30d73e118416281c231e4
RISC-V: error handling for subset parsing

The parsing of both the argument of -march= and the operand(s) of
".option arch, ..." can fail. In such a case for .option (and equally
for .attribute) prior state should continue to be used, while for -march=
defaults should be put in place. In particular, extensions conflicting
with previously enabled extensions should not suddenly become available.

While re-indenting riscv_set_rvc() invocations, leverage that C implies
Zca (and hence a check for the latter suffices). Mirror that change to
riscv_set_arch() for consistency.

Reviewed-by: Jiawei <jiawei@iscas.ac.cn>
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/x-thead-vector-fail.d