LLVM API Documentation
Public Member Functions | |
ELFCodeEmitter (ELFWriter &ew) | |
void | startFunction (MachineFunction &F) |
bool | finishFunction (MachineFunction &F) |
void | addRelocation (const MachineRelocation &MR) |
virtual void | StartMachineBasicBlock (MachineBasicBlock *MBB) |
virtual intptr_t | getConstantPoolEntryAddress (unsigned Index) const |
FIXME: These should all be handled with relocations! | |
virtual intptr_t | getJumpTableEntryAddress (unsigned Index) const |
virtual intptr_t | getMachineBasicBlockAddress (MachineBasicBlock *MBB) const |
void | startFunctionStub (unsigned StubSize) |
JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE! | |
void * | finishFunctionStub (const Function *F) |
Definition at line 51 of file ELFWriter.cpp.
llvm::ELFCodeEmitter::ELFCodeEmitter | ( | ELFWriter & | ew | ) | [inline] |
Definition at line 57 of file ELFWriter.cpp.
void ELFCodeEmitter::startFunction | ( | MachineFunction & | F | ) | [virtual] |
startFunction - This callback is invoked when a new machine function is about to be emitted.
Implements llvm::MachineCodeEmitter.
Definition at line 98 of file ELFWriter.cpp.
References Align, llvm::ELFWriter::getSection(), llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_EXECINSTR, and llvm::ELF::SHT_PROGBITS.
bool ELFCodeEmitter::finishFunction | ( | MachineFunction & | F | ) | [virtual] |
finishFunction - This callback is invoked after the function is completely finished.
Implements llvm::MachineCodeEmitter.
Definition at line 124 of file ELFWriter.cpp.
References llvm::GlobalValue::ExternalLinkage, F, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceLinkage, llvm::ELF::STB_GLOBAL, llvm::ELF::STB_LOCAL, llvm::ELF::STB_WEAK, llvm::ELF::STT_FUNC, llvm::ELFWriter::SymbolTable, and llvm::GlobalValue::WeakLinkage.
void llvm::ELFCodeEmitter::addRelocation | ( | const MachineRelocation & | MR | ) | [inline, virtual] |
addRelocation - Whenever a relocatable address is needed, it should be noted with this interface.
Implements llvm::MachineCodeEmitter.
Definition at line 62 of file ELFWriter.cpp.
virtual void llvm::ELFCodeEmitter::StartMachineBasicBlock | ( | MachineBasicBlock * | MBB | ) | [inline, virtual] |
StartMachineBasicBlock - This should be called by the target when a new basic block is about to be emitted. This way the MCE knows where the start of the block is, and can implement getMachineBasicBlockAddress.
Implements llvm::MachineCodeEmitter.
Definition at line 66 of file ELFWriter.cpp.
virtual intptr_t llvm::ELFCodeEmitter::getConstantPoolEntryAddress | ( | unsigned | Index | ) | const [inline, virtual] |
FIXME: These should all be handled with relocations!
getConstantPoolEntryAddress - Return the address of the 'Index' entry in the constant pool that was last emitted with the emitConstantPool method.
Implements llvm::MachineCodeEmitter.
Definition at line 69 of file ELFWriter.cpp.
virtual intptr_t llvm::ELFCodeEmitter::getJumpTableEntryAddress | ( | unsigned | Index | ) | const [inline, virtual] |
getJumpTableEntryAddress - Return the address of the jump table with index 'Index' in the function that last called initJumpTableInfo.
Implements llvm::MachineCodeEmitter.
Definition at line 73 of file ELFWriter.cpp.
virtual intptr_t llvm::ELFCodeEmitter::getMachineBasicBlockAddress | ( | MachineBasicBlock * | MBB | ) | const [inline, virtual] |
getMachineBasicBlockAddress - Return the address of the specified MachineBasicBlock, only usable after the label for the MBB has been emitted.
Implements llvm::MachineCodeEmitter.
Definition at line 78 of file ELFWriter.cpp.
void llvm::ELFCodeEmitter::startFunctionStub | ( | unsigned | StubSize | ) | [inline, virtual] |
JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
Implements llvm::MachineCodeEmitter.
Definition at line 84 of file ELFWriter.cpp.
void* llvm::ELFCodeEmitter::finishFunctionStub | ( | const Function * | F | ) | [inline, virtual] |
finishFunctionStub - This callback is invoked to terminate a function stub.
Implements llvm::MachineCodeEmitter.
Definition at line 88 of file ELFWriter.cpp.