aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-11 23:22:45 +0000
committerChris Lattner <sabre@nondot.org>2006-12-11 23:22:45 +0000
commit57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8 (patch)
tree617a5f64b9a640f0a39f610fe14696373a1a3bc2 /lib/Target/PowerPC/PPCTargetMachine.cpp
parenta77fa7edbfb999c487c6da89fcfecafb4b9e83be (diff)
downloadexternal_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.zip
external_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.tar.gz
external_llvm-57fc62c8d2bf056b0d2a0e3d1b82b3b787b899f8.tar.bz2
Another step forward in PPC64 JIT support: we now no-longer need stubs
emitted for external globals in PPC64-JIT-PIC mode (which is good because we didn't handle them before!). This also fixes a bug handling the picbase delta, which we would get wrong in some cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 9dcbc04..8cf85d1 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -81,7 +81,7 @@ unsigned PPC64TargetMachine::getModuleMatchQuality(const Module &M) {
PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS,
bool is64Bit)
- : Subtarget(M, FS, is64Bit),
+ : Subtarget(*this, M, FS, is64Bit),
DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this),
FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this),
InstrItins(Subtarget.getInstrItineraryData()) {
@@ -146,6 +146,9 @@ bool PPCTargetMachine::addCodeEmitter(FunctionPassManager &PM, bool Fast,
setRelocationModel(Reloc::Static);
}
+ // Inform the subtarget that we are in JIT mode. FIXME: does this break macho
+ // writing?
+ Subtarget.SetJITMode();
// Machine code emitter pass for PowerPC.
PM.add(createPPCCodeEmitterPass(*this, MCE));