[RISCV] Modify arch string parsing order according to latest riscv spec
authorJun Sha (Joshua) <cooper.joshua@linux.alibaba.com>
Tue, 18 Apr 2023 08:20:08 +0000 (16:20 +0800)
committerJun Sha (Joshua) <cooper.joshua@linux.alibaba.com>
Tue, 18 Apr 2023 08:20:08 +0000 (16:20 +0800)
commitf98ca363bed7405a23ad4b77167e39505a1ca9dd
treeac2ec9e2bf55a66f499d9e71e34f372057c8be46
parent9984cfc86ed6d5c1558d8dd82d82448e50d704ad
[RISCV] Modify arch string parsing order according to latest riscv spec

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 in parseArchString().

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D148315
clang/test/Driver/riscv-arch.c
llvm/lib/Support/RISCVISAInfo.cpp