[PATCH] D51733: [RISCV][MC] Use a custom ParserMethod for the bare_symbol operand type

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 06:54:54 PDT 2018


asb created this revision.
asb added reviewers: apazos, rogfer01.
Herald added subscribers: jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, mgrang, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar.

This allows the hard-coded shouldForceImmediate logic to be removed because the generated MatchOperandParserImpl makes use of the current context (i.e. the current mnemonic) to determine parsing behaviour, and so won't first try to parse a register before parsing a symbol name.

No functional change is intended. gas accepts immediate arguments for call, tail and lla. This patch doesn't address this discrepancy.


https://reviews.llvm.org/D51733

Files:
  lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
  lib/Target/RISCV/RISCVInstrInfo.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51733.164208.patch
Type: text/x-patch
Size: 4781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180906/10aafb32/attachment.bin>


More information about the llvm-commits mailing list