[llvm-commits] CVS: reopt/lib/TraceJIT/TraceJITEmitter.cpp
Tanya Brethour
tbrethou at cs.uiuc.edu
Sun Nov 21 15:01:19 PST 2004
Changes in directory reopt/lib/TraceJIT:
TraceJITEmitter.cpp updated: 1.4 -> 1.5
---
Log message:
Update to work with changes in JIT interfaces
---
Diffs of the changes: (+13 -4)
Index: reopt/lib/TraceJIT/TraceJITEmitter.cpp
diff -u reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.4 reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.5
--- reopt/lib/TraceJIT/TraceJITEmitter.cpp:1.4 Thu Sep 2 11:55:45 2004
+++ reopt/lib/TraceJIT/TraceJITEmitter.cpp Sun Nov 21 17:01:06 2004
@@ -59,20 +59,25 @@
virtual void startFunction(MachineFunction &F);
virtual void finishFunction(MachineFunction &F);
virtual void emitConstantPool(MachineConstantPool *MCP);
- virtual void startFunctionStub(const Function &F, unsigned StubSize) {
+ virtual void startFunctionStub(unsigned StubSize) {
abort ();
}
- virtual void* finishFunctionStub(const Function &F) {
+ virtual void* finishFunctionStub(const Function *F) {
abort ();
}
+ virtual void addRelocation(const MachineRelocation &) {
+ assert(0 && "Relocations not supported!");
+ }
+
virtual void emitByte(unsigned char B);
virtual void emitWord(unsigned W);
virtual void emitWordAt(unsigned W, unsigned *Ptr);
virtual uint64_t getGlobalValueAddress(GlobalValue *V);
- virtual uint64_t getGlobalValueAddress(const std::string &Name);
+ virtual uint64_t getGlobalValueAddress(const char *Name);
virtual uint64_t getConstantPoolEntryAddress(unsigned Entry);
virtual uint64_t getCurrentPCValue();
+ virtual uint64_t getCurrentPCOffset();
// forceCompilationOf - Force the compilation of the specified function, and
// return its address, because we REALLY need the address now.
@@ -186,7 +191,7 @@
}
}
-uint64_t TraceJITEmitter::getGlobalValueAddress(const std::string &Name) {
+uint64_t TraceJITEmitter::getGlobalValueAddress(const char *Name) {
return (uint64_t)TheJIT->getPointerToNamedFunction(Name);
}
@@ -207,6 +212,10 @@
return CurByte;
}
+uint64_t TraceJITEmitter::getCurrentPCOffset() {
+ return CurByte-CurFunctionPtr;
+}
+
uint64_t TraceJITEmitter::forceCompilationOf(Function *F) {
return (uint64_t)TheJIT->getPointerToFunction(F);
}
More information about the llvm-commits
mailing list