[all-commits] [llvm/llvm-project] 1d3719: [X86] Preserve redundant Address-Size override prefix

Amir Ayupov via All-commits all-commits at lists.llvm.org
Wed Mar 16 08:30:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1d3719820faf0e35a83d1a82173e46deacccee07
      https://github.com/llvm/llvm-project/commit/1d3719820faf0e35a83d1a82173e46deacccee07
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.h
    M llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp
    M llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h
    A llvm/test/MC/Disassembler/X86/addr32.s
    M llvm/test/MC/X86/code16gcc.s
    M llvm/test/MC/X86/index-operations.s

  Log Message:
  -----------
  [X86] Preserve redundant Address-Size override prefix

Print and emit redundant Address-Size override prefix if it's set on the
instruction.

Reviewed By: skan

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


  Commit: 2c4e38fa6f33d371f9169715f97046343095bba0
      https://github.com/llvm/llvm-project/commit/2c4e38fa6f33d371f9169715f97046343095bba0
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2022-03-16 (Wed, 16 Mar 2022)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
    M llvm/test/MC/Disassembler/X86/moffs.txt
    M llvm/test/MC/X86/I186-32.s
    M llvm/test/MC/X86/I186-64.s
    M llvm/test/MC/X86/I386-32.s
    M llvm/test/MC/X86/I386-64.s
    M llvm/test/MC/X86/I86-32.s
    M llvm/test/MC/X86/I86-64.s
    M llvm/test/MC/X86/code16gcc.s
    M llvm/test/MC/X86/index-operations.s
    M llvm/test/MC/X86/x86-16.s

  Log Message:
  -----------
  [X86] Emit REX prefix immediately before the opcode

Fix prefix emission order to emit REX immediately before the opcode (SDM vol2,
2.1, Figure 2-1). According to SDM vol2 2.2.1, "Other placements are ignored".

This fix has a side effect of outputting segment override prefix in a different
order than previously (benign).

Follow-up to https://reviews.llvm.org/D120592

Reviewed By: skan, craig.topper

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


Compare: https://github.com/llvm/llvm-project/compare/e5b1b9edb8b6...2c4e38fa6f33


More information about the All-commits mailing list