[all-commits] [llvm/llvm-project] 4dd5e9: [X86][MC]Fix wrong action for encode movdir64b

XinWang10 via All-commits all-commits at lists.llvm.org
Fri Mar 17 00:30:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4dd5e9c60efa980b62aff72d358e7679476399e8
      https://github.com/llvm/llvm-project/commit/4dd5e9c60efa980b62aff72d358e7679476399e8
  Author: Wang, Xin10 <xin10.wang at intel.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

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

  Log Message:
  -----------
  [X86][MC]Fix wrong action for encode movdir64b

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 descriptions to let llvm-mc to report the same error.

Reviewed By: skan, craig.topper

Differential Revision: https://reviews.llvm.org/D145893




More information about the All-commits mailing list