[PATCH] D51450: [MinGW] [ARM] Add stubs for potential automatic dllimported variables

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 12:32:50 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: rnk, compnerd, efriedma, t.p.northover, peter.smith.
Herald added a reviewer: javed.absar.
Herald added subscribers: chrib, kristof.beyls.

The runtime pseudo relocations can't handle the ARM format embedded addresses in movw/movt pairs. By using stubs, the potentially dllimported addresses can be touched up by the runtime pseudo relocation framework.

The MachineOperand TargetFlags range (8 bits) is just about exhausted; this allocates the last bit to MO_COFFSTUB. (In the X86 target, the TargetFlags are just direct values, while most of it is used as a bitfield on ARM and AArch64.) An alternative, to conserve bits, would be to use MO_GOT (which doesn't have much meaning in a COFF context right now).


Repository:
  rL LLVM

https://reviews.llvm.org/D51450

Files:
  lib/Target/ARM/ARMAsmPrinter.cpp
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
  test/CodeGen/ARM/Windows/mingw-refptr.ll
  test/CodeGen/ARM/Windows/pic.ll
  test/CodeGen/ARM/emutls_generic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51450.163157.patch
Type: text/x-patch
Size: 7308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180829/194a66be/attachment.bin>


More information about the llvm-commits mailing list