LLVM API Documentation
#include <MachineRelocation.h>
Collaboration diagram for llvm::MachineRelocation:
Public Member Functions | |
MachineRelocation (unsigned Offset, unsigned RelocationType, GlobalValue *GV, intptr_t cst=0, bool DoesntNeedFunctionStub=0) | |
MachineRelocation (unsigned Offset, unsigned RelocationType, const char *ES, intptr_t cst=0) | |
unsigned | getMachineCodeOffset () const |
unsigned | getRelocationType () const |
intptr_t | getConstantVal () const |
bool | isGlobalValue () const |
bool | isString () const |
bool | doesntNeedFunctionStub () const |
GlobalValue * | getGlobalValue () const |
const char * | getString () const |
void * | getResultPointer () const |
void | setResultPointer (void *Ptr) |
A relocation is made up of the following logical portions: 1. An offset in the machine code buffer, the location to modify. 2. A target specific relocation type (a number from 0 to 63). 3. A symbol being referenced, either as a GlobalValue* or as a string. 4. An optional constant value to be added to the reference. 5. A bit, CanRewrite, which indicates to the JIT that a function stub is not needed for the relocation.
Definition at line 36 of file MachineRelocation.h.
|
Definition at line 49 of file MachineRelocation.h. |
|
Definition at line 59 of file MachineRelocation.h. |
|
doesntNeedFunctionStub - This function returns true if the JIT for this target is capable of directly handling the relocated instruction without using a stub function. It is always conservatively correct for this flag to be false, but targets can improve their compilation callback functions to handle more general cases if they want improved performance. Definition at line 104 of file MachineRelocation.h. |
|
getConstantVal - Get the constant value associated with this relocation. This is often an offset from the symbol. Definition at line 83 of file MachineRelocation.h. Referenced by llvm::PPC32JITInfo::relocate(). |
|
getGlobalValue - If this is a global value reference, return the referenced global. Definition at line 110 of file MachineRelocation.h. References isGlobalValue(). |
|
getMachineCodeOffset - Return the offset into the code buffer that the relocation should be performed. Definition at line 70 of file MachineRelocation.h. Referenced by llvm::X86JITInfo::relocate(), llvm::SparcV9JITInfo::relocate(), and llvm::PPC32JITInfo::relocate(). |
|
getRelocationType - Return the target-specific relocation ID for this relocation. Definition at line 76 of file MachineRelocation.h. Referenced by llvm::X86JITInfo::relocate(), llvm::SparcV9JITInfo::relocate(), and llvm::PPC32JITInfo::relocate(). |
|
getResultPointer - Once this has been resolved to point to an actual address, this returns the pointer. Definition at line 124 of file MachineRelocation.h. Referenced by llvm::X86JITInfo::relocate(), llvm::SparcV9JITInfo::relocate(), and llvm::PPC32JITInfo::relocate(). |
|
getString - If this is a string value, return the string reference. Definition at line 117 of file MachineRelocation.h. References isString(). |
|
isGlobalValue - Return true if this relocation is a GlobalValue, as opposed to a constant string. Definition at line 89 of file MachineRelocation.h. Referenced by getGlobalValue(), and isString(). |
|
isString - Return true if this is a constant string. Definition at line 95 of file MachineRelocation.h. References isGlobalValue(). Referenced by getString(). |
|
setResultPointer - Set the result to the specified pointer value. Definition at line 130 of file MachineRelocation.h. |