[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86JITInfo.cpp X86JITInfo.h
Evan Cheng
evan.cheng at apple.com
Thu Jul 27 11:21:26 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.111 -> 1.112
X86JITInfo.cpp updated: 1.24 -> 1.25
X86JITInfo.h updated: 1.9 -> 1.10
---
Log message:
Resolve BB references with relocation.
---
Diffs of the changes: (+2 -13)
X86CodeEmitter.cpp | 3 ++-
X86JITInfo.cpp | 10 ----------
X86JITInfo.h | 2 --
3 files changed, 2 insertions(+), 13 deletions(-)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.111 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.112
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.111 Tue Jul 25 15:40:54 2006
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Thu Jul 27 13:21:10 2006
@@ -111,7 +111,8 @@
void Emitter::emitPCRelativeBlockAddress(MachineBasicBlock *MBB) {
// Remember where this reference was and where it is to so we can
// deal with it later.
- TM.getJITInfo()->addBBRef(MBB, MCE.getCurrentPCValue());
+ MCE.addRelocation(MachineRelocation::getBB(MCE.getCurrentPCOffset(),
+ X86::reloc_pcrel_word, MBB));
MCE.emitWordLE(0);
}
Index: llvm/lib/Target/X86/X86JITInfo.cpp
diff -u llvm/lib/Target/X86/X86JITInfo.cpp:1.24 llvm/lib/Target/X86/X86JITInfo.cpp:1.25
--- llvm/lib/Target/X86/X86JITInfo.cpp:1.24 Tue Jul 25 15:40:54 2006
+++ llvm/lib/Target/X86/X86JITInfo.cpp Thu Jul 27 13:21:10 2006
@@ -203,13 +203,3 @@
}
}
}
-
-void X86JITInfo::resolveBBRefs(MachineCodeEmitter &MCE) {
- // Resolve all forward branches now.
- for (unsigned i = 0, e = BBRefs.size(); i != e; ++i) {
- unsigned Location = MCE.getMachineBasicBlockAddress(BBRefs[i].first);
- intptr_t Ref = BBRefs[i].second;
- *((unsigned*)Ref) = Location-Ref-4;
- }
- BBRefs.clear();
-}
Index: llvm/lib/Target/X86/X86JITInfo.h
diff -u llvm/lib/Target/X86/X86JITInfo.h:1.9 llvm/lib/Target/X86/X86JITInfo.h:1.10
--- llvm/lib/Target/X86/X86JITInfo.h:1.9 Tue Jul 25 15:40:54 2006
+++ llvm/lib/Target/X86/X86JITInfo.h Thu Jul 27 13:21:10 2006
@@ -51,8 +51,6 @@
/// referenced global symbols.
virtual void relocate(void *Function, MachineRelocation *MR,
unsigned NumRelocs, unsigned char* GOTBase);
-
- virtual void resolveBBRefs(MachineCodeEmitter &MCE);
};
}
More information about the llvm-commits
mailing list