[PATCH] D84895: [X86] Teach the assembler parser to handle a '*' between segment register and base/index/displacement part of an address

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 15:40:22 PDT 2020


craig.topper created this revision.
craig.topper added reviewers: MaskRay, RKSimon, echristo.
Herald added subscribers: arphaman, hiraditya.
Herald added a project: LLVM.
craig.topper requested review of this revision.

A '*' after the segment is equivalent to a '*' before the segment register. To make the AsmMatcher table work we need to place the '*' token into the operand vector before the full memory operand. To accomplish this I've modified some portions of operand parsing to expose the operand vector to ParseATTOperand so that the token can be pushed to the vector after parsing the segment register and before creating the memory operand using that segment register.

Fixes PR46879


https://reviews.llvm.org/D84895

Files:
  llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
  llvm/test/MC/X86/x86-32.s
  llvm/test/MC/X86/x86-64.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84895.281753.patch
Type: text/x-patch
Size: 5856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200729/9d52a9b5/attachment.bin>


More information about the llvm-commits mailing list