[PATCH] D28468: [X86] Fix for bugzilla 31576 - add support for "data32" instruction prefix

Marina Yatsina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 16 14:33:59 PST 2017


myatsina updated this revision to Diff 84595.
myatsina added a comment.

I've added the test that check for errors.

Regarding the disassembly, when data16/data32 is adjacent to an instruction like lgdt, then the encoding and the decoding is correct and the asm printer prints the right instruction. I've added  disassembly tests for these cases.
When data16/data32 stands on its own the 0x66 byte by is disassembled correctly, but the asm printer always prints "data16" and not "data32" for the 16 bit mode.

I've found somebody already added an exception for CALLpcrel32 instruction in X86ATTInstPrinter because there's seems to be some lack of support of the "Requires" attribute.
I can add an exception there as well, but I'm not sure if this is the right thing to do because data16/data32 shouldn't really stand on it's own, it's a prefix to the instruction that follows.


Repository:
  rL LLVM

https://reviews.llvm.org/D28468

Files:
  lib/Target/X86/AsmParser/X86AsmParser.cpp
  lib/Target/X86/X86InstrInfo.td
  test/MC/X86/data-prefix-fail.s
  test/MC/X86/data-prefix16.s
  test/MC/X86/data-prefix32.s
  test/MC/X86/data-prefix64.s
  test/MC/X86/x86-16.s
  test/MC/X86/x86-32.s
  test/MC/X86/x86-64.s
  utils/TableGen/X86DisassemblerTables.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28468.84595.patch
Type: text/x-patch
Size: 5718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170116/e2dfcfd4/attachment.bin>


More information about the llvm-commits mailing list