[llvm] [llvm][SystemZ] Fix parsing of `.cfi_undefined` with percent-less registers. (PR #107032)
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 08:30:25 PDT 2024
https://github.com/uweigand requested changes to this pull request.
This doesn't look right. I agree that .cfi directives should support percent-less registers to match GAS behavior, but this patch would accept them in a lot of other places.
Note that this changes the `SystemZAsmParser::parseRegister(Register &Reg, bool RestoreOnFailure)` routine, which is called internally from various places - in some of those, accepting percent-less register names would definitely be wrong (e.g. when parsing an index register in an address).
I think all callers need to be reviewed, and explicitly check for percent where needed (or add another parameter to this routine to specific whether or not percent needs to be mandatory).
https://github.com/llvm/llvm-project/pull/107032
More information about the llvm-commits
mailing list