[PATCH] D31949: [AArch64] Fix handling of zero immediate in fmov instructions
Renato Golin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 19 10:03:33 PDT 2017
rengolin accepted this revision.
rengolin added a comment.
This revision is now accepted and ready to land.
LGTM. Thanks!
================
Comment at: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:2125
+ Operands.push_back(AArch64Operand::CreateToken("#0", false, S, getContext()));
+ Operands.push_back(AArch64Operand::CreateToken(".0", false, S, getContext()));
+ return MatchOperand_Success;
----------------
john.brawn wrote:
> rengolin wrote:
> > Why two tokens?
> Because that's what the MatchTable in AArch64GenAsmMatcher.inc expects for the #0.0 in the fmov InstAlias. After a bit of poking around it looks like this is because the AsmParserVariants defined in AArch64.td sets '.' to be a break character which starts a new token, probably so that the instruction qualifiers (which start with a '.') get treated as operands not as part of the mnemonic.
Right, I expected as much.
https://reviews.llvm.org/D31949
More information about the llvm-commits
mailing list