summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-04 10:50:28 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-04 10:50:28 +0000
commitc1d1e54fc4bdb0b0a5711cf1a6c13f2a66f0729d (patch)
tree90acc414cbc4deca00a56990c1625eba8e259370 /llvm/lib
parent49ff8ecd0347364505a86e4f04d10de841b71d48 (diff)
downloadbcm5719-llvm-c1d1e54fc4bdb0b0a5711cf1a6c13f2a66f0729d.tar.gz
bcm5719-llvm-c1d1e54fc4bdb0b0a5711cf1a6c13f2a66f0729d.zip
Unbreak tailcall opt in JIT.
llvm-svn: 45576
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86CodeEmitter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp
index 150d1a13a3b..24d75b6446f 100644
--- a/llvm/lib/Target/X86/X86CodeEmitter.cpp
+++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp
@@ -619,7 +619,8 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
if (MO.isMachineBasicBlock()) {
emitPCRelativeBlockAddress(MO.getMBB());
} else if (MO.isGlobalAddress()) {
- bool NeedStub = Is64BitMode && TM.getCodeModel() == CodeModel::Large;
+ bool NeedStub = (Is64BitMode && TM.getCodeModel() == CodeModel::Large)
+ || Opcode == X86::TAILJMPd;
emitGlobalAddress(MO.getGlobal(), X86::reloc_pcrel_word,
0, 0, NeedStub);
} else if (MO.isExternalSymbol()) {
OpenPOWER on IntegriCloud