summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86CodeEmitter.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-02-22 20:19:42 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-02-22 20:19:42 +0000
commit73136dfecceeadfd549d5ac2c00ed1df023e5b20 (patch)
treea6aab29afc7200b4253a7c278ee6c1c03fe69264 /llvm/lib/Target/X86/X86CodeEmitter.cpp
parent2fa33a989dfd4bf53e282b73858f235651bc77a9 (diff)
downloadbcm5719-llvm-73136dfecceeadfd549d5ac2c00ed1df023e5b20.tar.gz
bcm5719-llvm-73136dfecceeadfd549d5ac2c00ed1df023e5b20.zip
- Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default. PPC and x86 default is dynamic-no-pic for Darwin, pic for others. - Removed options -enable-pic and -ppc-static. llvm-svn: 26315
Diffstat (limited to 'llvm/lib/Target/X86/X86CodeEmitter.cpp')
-rw-r--r--llvm/lib/Target/X86/X86CodeEmitter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp
index 0c0ed538ab2..772f1abc204 100644
--- a/llvm/lib/Target/X86/X86CodeEmitter.cpp
+++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp
@@ -77,6 +77,9 @@ FunctionPass *llvm::createX86CodeEmitterPass(MachineCodeEmitter &MCE) {
}
bool Emitter::runOnMachineFunction(MachineFunction &MF) {
+ assert((MF.getTarget().getRelocationModel() != Reloc::Default ||
+ MF.getTarget().getRelocationModel() != Reloc::Static) &&
+ "JIT relocation model must be set to static or default!");
II = ((X86TargetMachine&)MF.getTarget()).getInstrInfo();
MCE.startFunction(MF);
@@ -97,7 +100,6 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) {
}
void Emitter::emitBasicBlock(const MachineBasicBlock &MBB) {
- assert(!PICEnabled && "CodeEmitter does not support PIC!");
if (uint64_t Addr = MCE.getCurrentPCValue())
BasicBlockAddrs[&MBB] = Addr;
OpenPOWER on IntegriCloud