[PATCH] D148315: [RISCV] Modify arch string parsing order according to latest riscv spec
Jun Sha via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 19 00:14:12 PDT 2023
joshua-arch1 added a comment.
In D148315#4279486 <https://reviews.llvm.org/D148315#4279486>, @asb wrote:
> I'm starting to think we should just remove the ordering rules for z/s/x altogether when parsing arch strings I see that gcc 12.2.0 actually requires s and then z:
>
> [asb at purge ~]$ riscv64-linux-gnu-gcc -march=rv64imafdc_svinval_zicbom t.c -c
> [asb at purge ~]$ riscv64-linux-gnu-gcc -march=rv64imafdc_zicbom_svinval t.c -c
> riscv64-linux-gnu-gcc: error: '-march=rv64imafdc_zicbom_svinval': unexpected ISA string at end: 'svinval'
>
> So ISA naming strings aren't easily portable between clang and GCC right now, even if the same extension names are recognised.
One of my colleagues working on GCC posted a patch to modify this order in GCC yesterday. Also, Binutils requires z and then s, which is inconsistent with GCC now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148315/new/
https://reviews.llvm.org/D148315
More information about the cfe-commits
mailing list