[all-commits] [llvm/llvm-project] f61e5e: [X86] Avoid data16 prefix for lea in x32 mode

Harald van Dijk via All-commits all-commits at lists.llvm.org
Sat Dec 12 09:05:48 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f61e5ecb919b3901590328e69d3e4a557eefd788
      https://github.com/llvm/llvm-project/commit/f61e5ecb919b3901590328e69d3e4a557eefd788
  Author: Harald van Dijk <harald at gigawatt.nl>
  Date:   2020-12-12 (Sat, 12 Dec 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    M llvm/test/CodeGen/X86/pic.ll

  Log Message:
  -----------
  [X86] Avoid data16 prefix for lea in x32 mode

The ABI demands a data16 prefix for lea in 64-bit LP64 mode, but not in
64-bit ILP32 mode. In both modes this prefix would ordinarily be
ignored, but the instructions may be changed by the linker to
instructions that are affected by the prefix.

Reviewed By: RKSimon

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




More information about the All-commits mailing list