[PATCH] D91735: [PowerPC] Allow a '%' prefix for registers in CFI directives
Bill Wendling via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 15:37:05 PST 2020
void added a comment.
In D91735#2403921 <https://reviews.llvm.org/D91735#2403921>, @nickdesaulniers wrote:
> I was thinking "would it be better to move this logic down into `PPCAsmParser::MatchRegisterName`? Well, I would suppose that would depend on if the `%` prefix on registers is valid in other contexts, for instance maybe other places that directly call `PPCAsmParser::MatchRegisterName` rather than ``PPCAsmParser::tryParseRegister` which you've modified here.
When I do that, I get several register parsing failures, including for this testcase. I wanted to restrict this change to the CFI directives (this function seems to be used by those instead of normal functions). X86 has similar code in the same place.
I think what may be happening is that the `MatchRegisterName` function is looking at the token that's sometimes already lexed, and so isn't always "current" when the function calls.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91735/new/
https://reviews.llvm.org/D91735
More information about the llvm-commits
mailing list