mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 19:26:30 +00:00
Add getCurrentPCOffset() and addRelocation() methods.
llvm-svn: 18034
This commit is contained in:
parent
20654daf37
commit
c0599d0f14
@ -75,6 +75,20 @@ public:
|
|||||||
///
|
///
|
||||||
virtual void emitWord(unsigned W) = 0;
|
virtual void emitWord(unsigned W) = 0;
|
||||||
|
|
||||||
|
/// getCurrentPCValue - This returns the address that the next emitted byte
|
||||||
|
/// will be output to.
|
||||||
|
///
|
||||||
|
virtual uint64_t getCurrentPCValue() = 0;
|
||||||
|
|
||||||
|
|
||||||
|
/// getCurrentPCOffset - Return the offset from the start of the emitted
|
||||||
|
/// buffer that we are currently writing to.
|
||||||
|
virtual uint64_t getCurrentPCOffset() = 0;
|
||||||
|
|
||||||
|
/// addRelocation - Whenever a relocatable address is needed, it should be
|
||||||
|
/// noted with this interface.
|
||||||
|
virtual void addRelocation(const MachineRelocation &MR) = 0;
|
||||||
|
|
||||||
/// getGlobalValueAddress - This method is used to get the address of the
|
/// getGlobalValueAddress - This method is used to get the address of the
|
||||||
/// specified global value. In some cases, however, the address may not yet
|
/// specified global value. In some cases, however, the address may not yet
|
||||||
/// be known at the point that the method is called (for example, getting the
|
/// be known at the point that the method is called (for example, getting the
|
||||||
@ -90,11 +104,6 @@ public:
|
|||||||
//
|
//
|
||||||
virtual uint64_t getConstantPoolEntryAddress(unsigned Index) = 0;
|
virtual uint64_t getConstantPoolEntryAddress(unsigned Index) = 0;
|
||||||
|
|
||||||
// getCurrentPCValue - This returns the address that the next emitted byte
|
|
||||||
// will be output to.
|
|
||||||
//
|
|
||||||
virtual uint64_t getCurrentPCValue() = 0;
|
|
||||||
|
|
||||||
// forceCompilationOf - Force the compilation of the specified function, and
|
// forceCompilationOf - Force the compilation of the specified function, and
|
||||||
// return its address, because we REALLY need the address now.
|
// return its address, because we REALLY need the address now.
|
||||||
//
|
//
|
||||||
|
@ -47,10 +47,15 @@ namespace {
|
|||||||
<< (void*) Ptr << ") ";
|
<< (void*) Ptr << ") ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void addRelocation(const MachineRelocation &MR) {
|
||||||
|
std::cout << "<relocation> ";
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t getGlobalValueAddress(GlobalValue *V) { return 0; }
|
uint64_t getGlobalValueAddress(GlobalValue *V) { return 0; }
|
||||||
uint64_t getGlobalValueAddress(const char *Name) { return 0; }
|
uint64_t getGlobalValueAddress(const char *Name) { return 0; }
|
||||||
uint64_t getConstantPoolEntryAddress(unsigned Num) { return 0; }
|
uint64_t getConstantPoolEntryAddress(unsigned Num) { return 0; }
|
||||||
uint64_t getCurrentPCValue() { return 0; }
|
uint64_t getCurrentPCValue() { return 0; }
|
||||||
|
uint64_t getCurrentPCOffset() { return 0; }
|
||||||
|
|
||||||
// forceCompilationOf - Force the compilation of the specified function, and
|
// forceCompilationOf - Force the compilation of the specified function, and
|
||||||
// return its address, because we REALLY need the address now.
|
// return its address, because we REALLY need the address now.
|
||||||
@ -157,6 +162,13 @@ namespace {
|
|||||||
uint64_t getCurrentPCValue() {
|
uint64_t getCurrentPCValue() {
|
||||||
return MCE.getCurrentPCValue();
|
return MCE.getCurrentPCValue();
|
||||||
}
|
}
|
||||||
|
uint64_t getCurrentPCOffset() {
|
||||||
|
return MCE.getCurrentPCOffset();
|
||||||
|
}
|
||||||
|
void addRelocation(const MachineRelocation &MR) {
|
||||||
|
return MCE.addRelocation(MR);
|
||||||
|
}
|
||||||
|
|
||||||
// forceCompilationOf - Force the compilation of the specified function, and
|
// forceCompilationOf - Force the compilation of the specified function, and
|
||||||
// return its address, because we REALLY need the address now.
|
// return its address, because we REALLY need the address now.
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user