diff options
author | imkiva <imkiva@islovely.icu> | 2023-08-15 01:03:26 +0800 |
---|---|---|
committer | imkiva <imkiva@islovely.icu> | 2023-08-15 01:06:41 +0800 |
commit | a98f374eea3135f82da439dbf730012a55c02918 (patch) | |
tree | 74b9a3b54237ce7adc27210ac8167cffa3f5644c /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 53d40b973913f60caee2e21908a48bf865e5ba1c (diff) | |
download | llvm-a98f374eea3135f82da439dbf730012a55c02918.zip llvm-a98f374eea3135f82da439dbf730012a55c02918.tar.gz llvm-a98f374eea3135f82da439dbf730012a55c02918.tar.bz2 |
[RISCV] Fix rlist grammar for cm.push, cm.popret, cm.popretz and cm.pop in RISCV zcmp Extension
The register list in the arg string is declared as `{$rlist}`. This patch removes the wrapping curly brackets because of the following:
- Curly brackets are the syntax for variant selection, e.g. given `X = {v0 | v1}`, the result after `CodeGenInstruction::FlattenAsmStringVariants` should be `X[AsmVariantNo]`.
- ARM also supports the register list, and they do not use the bracket wrapper.
- Parse of curly brackets are handled by `RISCVAsmParser::parseReglist`, the brackets in the td file do not correspond to asm syntax. Thus no testcase is affected.
So the curly brackets here are redundant and will become dangerous if RISCV needs more asm parser variants (took me several hours to figure out some wired assertion failures in a downstream fork)
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D157472
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions