LLVM API Documentation
#include <PPCJITInfo.h>
Public Member Functions | |
PPCJITInfo (PPCTargetMachine &tm, bool tmIs64Bit) | |
virtual StubLayout | getStubLayout () |
Returns the maximum size and alignment for a call stub on this target. More... | |
virtual void * | emitFunctionStub (const Function *F, void *Fn, JITCodeEmitter &JCE) |
virtual LazyResolverFn | getLazyResolverFunction (JITCompilerFn) |
virtual void | relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase) |
virtual void | replaceMachineCodeForFunction (void *Old, void *New) |
![]() | |
virtual | ~TargetJITInfo () |
virtual void * | emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, JITCodeEmitter &JCE) |
virtual uintptr_t | getPICJumpTableEntry (uintptr_t BB, uintptr_t JTBase) |
virtual char * | allocateThreadLocalMemory (size_t size) |
bool | needsGOT () const |
virtual bool | hasCustomConstantPool () const |
virtual bool | hasCustomJumpTables () const |
virtual bool | allocateSeparateGVMemory () const |
Protected Attributes | |
PPCTargetMachine & | TM |
bool | is64Bit |
![]() | |
bool | useGOT |
Additional Inherited Members | |
![]() | |
typedef void(* | LazyResolverFn )() |
typedef void *(* | JITCompilerFn )(void *) |
Definition at line 23 of file PPCJITInfo.h.
|
inline |
Definition at line 28 of file PPCJITInfo.h.
References is64Bit, and llvm::TargetJITInfo::useGOT.
|
virtual |
emitFunctionStub - Use the specified JITCodeEmitter object to emit a small native function that simply calls the function at the specified address. The JITCodeEmitter must already have storage allocated for the stub. Return the address of the resultant function, which may have been aligned from the address the JCE was set up to emit at.
Reimplemented from llvm::TargetJITInfo.
Definition at line 366 of file PPCJITInfo.cpp.
References EmitBranchToAt(), llvm::JITCodeEmitter::emitWordBE(), llvm::JITCodeEmitter::getCurrentPCValue(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::sys::Memory::InvalidateInstructionCache(), is64Bit, llvm::PPCSubtarget::isDarwinABI(), PPC32CompilationCallback(), PPC64CompilationCallback(), and TM.
|
virtual |
getLazyResolverFunction - This method is used to initialize the JIT, giving the target the function that should be used to compile a function, and giving the JIT the target function used to do the lazy resolving.
Reimplemented from llvm::TargetJITInfo.
Definition at line 347 of file PPCJITInfo.cpp.
References is64Bit, JITCompilerFunction, PPC32CompilationCallback(), and PPC64CompilationCallback().
|
virtual |
Returns the maximum size and alignment for a call stub on this target.
Reimplemented from llvm::TargetJITInfo.
Definition at line 352 of file PPCJITInfo.cpp.
|
virtual |
relocate - Before the JIT can run a block of code that has been emitted, it must rewrite the code to contain the actual addresses of any referenced global symbols.
Reimplemented from llvm::TargetJITInfo.
Definition at line 413 of file PPCJITInfo.cpp.
References llvm::MachineRelocation::getConstantVal(), llvm::MachineRelocation::getMachineCodeOffset(), llvm::MachineRelocation::getRelocationType(), llvm::MachineRelocation::getResultPointer(), llvm_unreachable, llvm::PPC::reloc_absolute_high, llvm::PPC::reloc_absolute_low, llvm::PPC::reloc_absolute_low_ix, llvm::PPC::reloc_pcrel_bcx, and llvm::PPC::reloc_pcrel_bx.
|
virtual |
replaceMachineCodeForFunction - Make it so that calling the function whose machine code is at OLD turns into a call to NEW, perhaps by overwriting OLD with a branch to NEW. This is used for self-modifying code.
Implements llvm::TargetJITInfo.
Definition at line 468 of file PPCJITInfo.cpp.
References EmitBranchToAt(), llvm::sys::Memory::InvalidateInstructionCache(), and is64Bit.
|
protected |
Definition at line 26 of file PPCJITInfo.h.
Referenced by emitFunctionStub(), getLazyResolverFunction(), PPCJITInfo(), and replaceMachineCodeForFunction().
|
protected |
Definition at line 25 of file PPCJITInfo.h.
Referenced by emitFunctionStub().