OSDN Git Service

Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code models"
authorReid Kleckner <rnk@google.com>
Mon, 23 Jul 2018 21:14:35 +0000 (21:14 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 23 Jul 2018 21:14:35 +0000 (21:14 +0000)
commitd3db945575b2ea5a11e0bf304e17590ead7bc795
tree113626e1e1718ab94dd38c83b8dbbbf258b8e056
parente6aaf315db3bfeb265febd0d3115d63d2257265f
Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code models"

Don't try to generate large PIC code for non-ELF targets. Neither COFF
nor MachO have relocations for large position independent code, and
users have been using "large PIC" code models to JIT 64-bit code for a
while now. With this change, if they are generating ELF code, their
JITed code will truly be PIC, but if they target MachO or COFF, it will
contain 64-bit immediates that directly reference external symbols. For
a JIT, that's perfectly fine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337740 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.cpp
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86Subtarget.cpp
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/cleanuppad-large-codemodel.ll
test/CodeGen/X86/code-model-elf.ll [new file with mode: 0644]
test/CodeGen/X86/fast-isel-call-cleanup.ll
test/CodeGen/X86/hipe-cc64.ll
test/CodeGen/X86/variadic-node-pic.ll
test/ExecutionEngine/MCJIT/eh-lg-pic.ll
test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
utils/UpdateTestChecks/asm.py
utils/update_llc_test_checks.py