LLVM API Documentation

llvm::X86JITInfo Class Reference

#include <X86JITInfo.h>

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

List of all members.

Public Member Functions

 X86JITInfo (X86TargetMachine &tm)
virtual void replaceMachineCodeForFunction (void *Old, void *New)
virtual void * emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, JITCodeEmitter &JCE)
virtual void * emitFunctionStub (const Function *F, void *Fn, JITCodeEmitter &JCE)
virtual void emitFunctionStubAtAddr (const Function *F, void *Fn, void *Buffer, JITCodeEmitter &JCE)
virtual uintptr_t getPICJumpTableEntry (uintptr_t BB, uintptr_t JTBase)
virtual LazyResolverFn getLazyResolverFunction (JITCompilerFn)
 getLazyResolverFunction - Expose the lazy resolver to the JIT.
virtual void relocate (void *Function, MachineRelocation *MR, unsigned NumRelocs, unsigned char *GOTBase)
virtual char * allocateThreadLocalMemory (size_t size)
void setPICBase (uintptr_t Base)
uintptr_t getPICBase () const


Detailed Description

Definition at line 24 of file X86JITInfo.h.


Constructor & Destructor Documentation

llvm::X86JITInfo::X86JITInfo ( X86TargetMachine &  tm  )  [inline, explicit]

Definition at line 29 of file X86JITInfo.h.

References llvm::TargetJITInfo::useGOT.


Member Function Documentation

void X86JITInfo::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 33 of file X86JITInfo.cpp.

void * X86JITInfo::emitGlobalValueIndirectSym ( const GlobalValue *  GV,
void *  ptr,
JITCodeEmitter &  JCE 
) [virtual]

emitGlobalValueIndirectSym - Use the specified JITCodeEmitter object to emit an indirect symbol which contains the address of the specified ptr.

Reimplemented from llvm::TargetJITInfo.

Definition at line 432 of file X86JITInfo.cpp.

References llvm::JITCodeEmitter::emitWordLE(), llvm::JITCodeEmitter::finishGVStub(), and llvm::JITCodeEmitter::startGVStub().

void * X86JITInfo::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.

Reimplemented from llvm::TargetJITInfo.

Definition at line 445 of file X86JITInfo.cpp.

References llvm::JITCodeEmitter::emitByte(), llvm::JITCodeEmitter::emitWordLE(), llvm::JITCodeEmitter::finishGVStub(), llvm::JITCodeEmitter::getCurrentPCValue(), llvm::JITCodeEmitter::startGVStub(), and X86CompilationCallback().

void X86JITInfo::emitFunctionStubAtAddr ( const Function *  F,
void *  Fn,
void *  Buffer,
JITCodeEmitter &  JCE 
) [virtual]

emitFunctionStubAtAddr - Use the specified JITCodeEmitter object to emit a small native function that simply calls Fn. Emit the stub into the supplied buffer.

Reimplemented from llvm::TargetJITInfo.

Definition at line 496 of file X86JITInfo.cpp.

References llvm::JITCodeEmitter::emitByte(), llvm::JITCodeEmitter::emitWordLE(), llvm::JITCodeEmitter::finishGVStub(), llvm::JITCodeEmitter::getCurrentPCValue(), and llvm::JITCodeEmitter::startGVStub().

uintptr_t X86JITInfo::getPICJumpTableEntry ( uintptr_t  BB,
uintptr_t  Entry 
) [virtual]

getPICJumpTableEntry - Returns the value of the jumptable entry for the specific basic block.

getPICJumpTableEntry - Returns the value of the jumptable entry for the specific basic block.

Reimplemented from llvm::TargetJITInfo.

Definition at line 515 of file X86JITInfo.cpp.

TargetJITInfo::LazyResolverFn X86JITInfo::getLazyResolverFunction ( JITCompilerFn  F  )  [virtual]

getLazyResolverFunction - Expose the lazy resolver to the JIT.

Definition at line 409 of file X86JITInfo.cpp.

References c, llvm::N86::EAX, llvm::N86::EBX, llvm::N86::ECX, llvm::N86::EDX, llvm::X86::GetCpuIDAndInfo(), JITCompilerFunction, and X86CompilationCallback().

void X86JITInfo::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.

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 526 of file X86JITInfo.cpp.

References llvm::MachineRelocation::getConstantVal(), llvm::MachineRelocation::getMachineCodeOffset(), llvm::MachineRelocation::getRelocationType(), llvm::MachineRelocation::getResultPointer(), llvm::X86::reloc_absolute_dword, llvm::X86::reloc_absolute_word, llvm::X86::reloc_absolute_word_sext, llvm::X86::reloc_pcrel_word, and llvm::X86::reloc_picrel_word.

char * X86JITInfo::allocateThreadLocalMemory ( size_t  size  )  [virtual]

allocateThreadLocalMemory - Each target has its own way of handling thread local variables. This method returns a value only meaningful to the target.

Reimplemented from llvm::TargetJITInfo.

Definition at line 559 of file X86JITInfo.cpp.

References llvm_unreachable.

void llvm::X86JITInfo::setPICBase ( uintptr_t  Base  )  [inline]

setPICBase / getPICBase - Getter / setter of PICBase, used to compute PIC jumptable entry.

Definition at line 79 of file X86JITInfo.h.

uintptr_t llvm::X86JITInfo::getPICBase (  )  const [inline]

Definition at line 80 of file X86JITInfo.h.


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