LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::MachineCodeEmitter Class Reference

#include <MachineCodeEmitter.h>

List of all members.

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 MachineCodeEmittercreateDebugEmitter ()
static MachineCodeEmittercreateFilePrinterEmitter (MachineCodeEmitter &)


Detailed Description

Definition at line 32 of file MachineCodeEmitter.h.


Constructor & Destructor Documentation

virtual llvm::MachineCodeEmitter::~MachineCodeEmitter  )  [inline, virtual]
 

Definition at line 34 of file MachineCodeEmitter.h.


Member Function Documentation

virtual void llvm::MachineCodeEmitter::addRelocation const MachineRelocation MR  )  [pure virtual]
 

addRelocation - Whenever a relocatable address is needed, it should be noted with this interface.

MachineCodeEmitter * MachineCodeEmitter::createDebugEmitter  )  [static]
 

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.

MachineCodeEmitter * MachineCodeEmitter::createFilePrinterEmitter MachineCodeEmitter  )  [static]
 

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.

virtual void llvm::MachineCodeEmitter::emitByte unsigned char  B  )  [inline, virtual]
 

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().

virtual void llvm::MachineCodeEmitter::emitConstantPool MachineConstantPool MCP  )  [inline, virtual]
 

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().

virtual void llvm::MachineCodeEmitter::emitWord unsigned  W  )  [pure virtual]
 

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().

virtual void llvm::MachineCodeEmitter::emitWordAt unsigned  W,
unsigned *  Ptr
[inline, virtual]
 

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().

virtual void llvm::MachineCodeEmitter::finishFunction MachineFunction F  )  [inline, virtual]
 

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().

virtual void* llvm::MachineCodeEmitter::finishFunctionStub const Function F  )  [inline, virtual]
 

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().

virtual uint64_t llvm::MachineCodeEmitter::getConstantPoolEntryAddress unsigned  Index  )  [pure virtual]
 

virtual uint64_t llvm::MachineCodeEmitter::getCurrentPCOffset  )  [pure virtual]
 

getCurrentPCOffset - Return the offset from the start of the emitted buffer that we are currently writing to.

virtual uint64_t llvm::MachineCodeEmitter::getCurrentPCValue  )  [pure virtual]
 

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().

virtual void llvm::MachineCodeEmitter::startFunction MachineFunction F  )  [inline, virtual]
 

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().

virtual void llvm::MachineCodeEmitter::startFunctionStub unsigned  StubSize  )  [inline, virtual]
 

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().


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