LLVM API Documentation

Public Member Functions | Protected Attributes
llvm::PPCJITInfo Class Reference

#include <PPCJITInfo.h>

Inheritance diagram for llvm::PPCJITInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::PPCJITInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PPCJITInfo (PPCTargetMachine &tm, bool tmIs64Bit)
virtual StubLayout getStubLayout ()
 Returns the maximum size and alignment for a call stub on this target.
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)

Protected Attributes

PPCTargetMachineTM
bool is64Bit

Detailed Description

Definition at line 23 of file PPCJITInfo.h.


Constructor & Destructor Documentation

llvm::PPCJITInfo::PPCJITInfo ( PPCTargetMachine tm,
bool  tmIs64Bit 
) [inline]

Definition at line 28 of file PPCJITInfo.h.

References is64Bit, and llvm::TargetJITInfo::useGOT.


Member Function Documentation

void * PPCJITInfo::emitFunctionStub ( const Function F,
void *  Target,
JITCodeEmitter JCE 
) [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.

TargetJITInfo::LazyResolverFn PPCJITInfo::getLazyResolverFunction ( JITCompilerFn  ) [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().

TargetJITInfo::StubLayout PPCJITInfo::getStubLayout ( ) [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.

void PPCJITInfo::relocate ( void *  Function,
MachineRelocation MR,
unsigned  NumRelocs,
unsigned char *  GOTBase 
) [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.

void PPCJITInfo::replaceMachineCodeForFunction ( void *  Old,
void *  New 
) [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.


Member Data Documentation

Definition at line 25 of file PPCJITInfo.h.

Referenced by emitFunctionStub().


The documentation for this class was generated from the following files: