LLVM API Documentation

llvm::PPCJITInfo Class Reference

#include <PPCJITInfo.h>

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

List of all members.

Public Member Functions

 PPCJITInfo (PPCTargetMachine &tm, bool tmIs64Bit)
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

PPCTargetMachine & TM
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 *  Fn,
JITCodeEmitter &  JCE 
) [virtual]

emitFunctionStub - Use the specified JITCodeEmitter object to emit a small native function that simply calls the function at the specified address. Return the address of the resultant function.

Reimplemented from llvm::TargetJITInfo.

Definition at line 331 of file PPCJITInfo.cpp.

References EmitBranchToAt(), llvm::JITCodeEmitter::emitWordBE(), llvm::JITCodeEmitter::finishGVStub(), llvm::JITCodeEmitter::getCurrentPCValue(), llvm::PPCTargetMachine::getSubtargetImpl(), llvm::sys::Memory::InvalidateInstructionCache(), is64Bit, llvm::PPCSubtarget::isDarwinABI(), PPC32CompilationCallback(), PPC64CompilationCallback(), llvm::JITCodeEmitter::startGVStub(), and TM.

TargetJITInfo::LazyResolverFn PPCJITInfo::getLazyResolverFunction ( JITCompilerFn  Fn  )  [virtual]

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 380 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 435 of file PPCJITInfo.cpp.

References EmitBranchToAt(), 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: