[PATCH] D145893: Fix wrong action for encode movdir64b

Wang, Xin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 20:50:35 PDT 2023


XinWang10 created this revision.
Herald added subscribers: pengfei, arphaman, hiraditya.
Herald added a project: All.
XinWang10 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Movdir64b is special for its mem operand, 67 prefex can not only modify its add size,
so it's mem base and index reg should be the same type as source reg, such as
movdir64b (%rdx), rcx, and could not be movdir64b (%edx), rcx.
Now llvm-mc can encode the asm 'movdir64b (%edx), rcx' but the result is the same as 
'movdir64b (%edx), ecx', which offend users' intention, while gcc will object this 
action and give a warning.
I add 3 new mem discriptions to let llvm-mc to report the same error.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145893

Files:
  llvm/lib/Target/X86/AsmParser/X86Operand.h
  llvm/lib/Target/X86/X86InstrInfo.td
  llvm/lib/Target/X86/X86InstrMisc.td
  llvm/test/MC/X86/index-operations.s
  llvm/utils/TableGen/X86RecognizableInstr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145893.504503.patch
Type: text/x-patch
Size: 5643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230313/5cf31da1/attachment.bin>


More information about the llvm-commits mailing list