LLVM API Documentation
#include <MachineCodeEmitter.h>
Public Member Functions | |
virtual | ~MachineCodeEmitter () |
virtual void | startFunction (MachineFunction &F) |
virtual void | finishFunction (MachineFunction &F) |
virtual void | emitConstantPool (MachineConstantPool *MCP) |
virtual void | startFunctionStub (unsigned StubSize) |
virtual void * | finishFunctionStub (const Function *F) |
virtual void | emitByte (unsigned char B) |
virtual void | emitWordAt (unsigned W, unsigned *Ptr) |
virtual void | emitWord (unsigned W)=0 |
virtual uint64_t | getCurrentPCValue ()=0 |
virtual uint64_t | getCurrentPCOffset ()=0 |
virtual void | addRelocation (const MachineRelocation &MR)=0 |
virtual uint64_t | getConstantPoolEntryAddress (unsigned Index)=0 |
Static Public Member Functions | |
static MachineCodeEmitter * | createDebugEmitter () |
static MachineCodeEmitter * | createFilePrinterEmitter (MachineCodeEmitter &) |
Definition at line 32 of file MachineCodeEmitter.h.
|
Definition at line 34 of file MachineCodeEmitter.h. |
|
addRelocation - Whenever a relocatable address is needed, it should be noted with this interface. |
|
createDebugEmitter - Return a dynamically allocated machine code emitter, which just prints the opcodes and fields out the cout. This can be used for debugging users of the MachineCodeEmitter interface. Definition at line 162 of file MachineCodeEmitter.cpp. |
|
createFilePrinterEmitter - Return a dynamically allocated machine code emitter, which prints binary code to a file. This can be used for debugging users of the MachineCodeEmitter interface. Definition at line 167 of file MachineCodeEmitter.cpp. |
|
emitByte - This callback is invoked when a byte needs to be written to the output stream. Definition at line 65 of file MachineCodeEmitter.h. Referenced by llvm::X86JITInfo::emitFunctionStub(). |
|
emitConstantPool - This callback is invoked to output the constant pool for the function. Definition at line 48 of file MachineCodeEmitter.h. Referenced by llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
emitWord - This callback is invoked when a word needs to be written to the output stream. Referenced by llvm::X86JITInfo::emitFunctionStub(), llvm::SparcV9JITInfo::emitFunctionStub(), llvm::PPC32JITInfo::emitFunctionStub(), and llvm::SparcV9CodeEmitter::emitWord(). |
|
emitWordAt - This callback is invoked when a word needs to be written to the output stream at a different position than the current PC (for instance, when performing relocations). Definition at line 71 of file MachineCodeEmitter.h. Referenced by llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
finishFunction - This callback is invoked when the specified function has finished code generation. Definition at line 44 of file MachineCodeEmitter.h. Referenced by llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
finishFunctionStub - This callback is invoked to terminate a function stub. Definition at line 60 of file MachineCodeEmitter.h. Referenced by llvm::X86JITInfo::emitFunctionStub(), llvm::SparcV9JITInfo::emitFunctionStub(), and llvm::PPC32JITInfo::emitFunctionStub(). |
|
|
|
getCurrentPCOffset - Return the offset from the start of the emitted buffer that we are currently writing to. |
|
getCurrentPCValue - This returns the address that the next emitted byte will be output to. Referenced by llvm::X86JITInfo::emitFunctionStub(), llvm::SparcV9JITInfo::emitFunctionStub(), llvm::PPC32JITInfo::emitFunctionStub(), and llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
startFunction - This callback is invoked when the specified function is about to be code generated. Definition at line 39 of file MachineCodeEmitter.h. Referenced by llvm::SparcV9CodeEmitter::runOnMachineFunction(). |
|
startFunctionStub - This callback is invoked when the JIT needs the address of a function that has not been code generated yet. The StubSize specifies the total size required by the stub. Stubs are not allowed to have constant pools, the can only use the other emit* methods. Definition at line 55 of file MachineCodeEmitter.h. Referenced by llvm::X86JITInfo::emitFunctionStub(), llvm::SparcV9JITInfo::emitFunctionStub(), and llvm::PPC32JITInfo::emitFunctionStub(). |