LLVM API Documentation
#include <X86JITInfo.h>
Public Member Functions | |
| X86JITInfo (X86TargetMachine &tm) | |
| virtual void | replaceMachineCodeForFunction (void *Old, void *New) |
| virtual void * | emitGlobalValueIndirectSym (const GlobalValue *GV, void *ptr, MachineCodeEmitter &MCE) |
| virtual void * | emitFunctionStub (const Function *F, void *Fn, MachineCodeEmitter &MCE) |
| 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 |
Definition at line 23 of file X86JITInfo.h.
| llvm::X86JITInfo::X86JITInfo | ( | X86TargetMachine & | tm | ) | [inline, explicit] |
| 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, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [virtual] |
emitGlobalValueIndirectSym - Use the specified MachineCodeEmitter object to emit an indirect symbol which contains the address of the specified ptr.
Reimplemented from llvm::TargetJITInfo.
Definition at line 416 of file X86JITInfo.cpp.
References llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishGVStub(), and llvm::MachineCodeEmitter::startGVStub().
| void * X86JITInfo::emitFunctionStub | ( | const Function * | F, | |
| void * | Fn, | |||
| MachineCodeEmitter & | MCE | |||
| ) | [virtual] |
emitFunctionStub - Use the specified MachineCodeEmitter object to emit a small native function that simply calls the function at the specified address.
Reimplemented from llvm::TargetJITInfo.
Definition at line 429 of file X86JITInfo.cpp.
References llvm::MachineCodeEmitter::emitByte(), llvm::MachineCodeEmitter::emitWordLE(), llvm::MachineCodeEmitter::finishGVStub(), llvm::MachineCodeEmitter::getCurrentPCValue(), llvm::MachineCodeEmitter::startGVStub(), and X86CompilationCallback().
| 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 479 of file X86JITInfo.cpp.
| TargetJITInfo::LazyResolverFn X86JITInfo::getLazyResolverFunction | ( | JITCompilerFn | F | ) | [virtual] |
getLazyResolverFunction - Expose the lazy resolver to the JIT.
Definition at line 393 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 490 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_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 522 of file X86JITInfo.cpp.
| void llvm::X86JITInfo::setPICBase | ( | uintptr_t | Base | ) | [inline] |
setPICBase / getPICBase - Getter / setter of PICBase, used to compute PIC jumptable entry.
Definition at line 72 of file X86JITInfo.h.
| uintptr_t llvm::X86JITInfo::getPICBase | ( | ) | const [inline] |
Definition at line 73 of file X86JITInfo.h.