]> gcc.gnu.org Git - gcc.git/commit
RISC-V: Adjust the parsing order of extensions to be consistent with riscv-spec and...
authorJin Ma <jinma@linux.alibaba.com>
Tue, 18 Apr 2023 09:26:49 +0000 (17:26 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Tue, 18 Apr 2023 10:13:04 +0000 (18:13 +0800)
commit4204ed2dc74390ab3689d1d6a53001761338baf6
tree22ded9f6c83f48aaf400974adb50f630ca44839e
parent2349e69125335d4c8c5e43cf3643844519d154c3
RISC-V: Adjust the parsing order of extensions to be consistent with riscv-spec and binutils.

The current order of gcc and binutils parsing extensions is inconsistent.

According to latest risc-v spec, the canonical order in which extension names must
appear in the name string specified in Table 29.1 is different from before.

In the latest table, non-standard extensions must be listed after all standard
extensions. To keep consistent, we now change the parsing order.

Related llvm patch links:
 https://reviews.llvm.org/D148315

gcc/ChangeLog:

* common/config/riscv/riscv-common.cc (multi_letter_subset_rank): Swap the order
of z-extensions and s-extensions.
(riscv_subset_list::parse): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/arch-5.c: Likewise.
gcc/common/config/riscv/riscv-common.cc
gcc/testsuite/gcc.target/riscv/arch-5.c
This page took 0.060428 seconds and 5 git commands to generate.