LLVM 17.0.0git
|
MCCodeEmitter - Generic instruction encoding interface. More...
#include "llvm/MC/MCCodeEmitter.h"
Public Member Functions | |
MCCodeEmitter (const MCCodeEmitter &)=delete | |
MCCodeEmitter & | operator= (const MCCodeEmitter &)=delete |
virtual | ~MCCodeEmitter () |
virtual void | reset () |
Lifetime management. | |
virtual void | emitPrefix (const MCInst &Inst, SmallVectorImpl< char > &CB, const MCSubtargetInfo &STI) const |
Append the prefixes of given instruction to the code buffer. | |
virtual void | encodeInstruction (const MCInst &Inst, SmallVectorImpl< char > &CB, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const |
EncodeInstruction - Encode the given Inst to bytes and append to CB . | |
Protected Member Functions | |
MCCodeEmitter () | |
virtual void | encodeInstruction (const MCInst &Inst, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const |
EncodeInstruction - Encode the given Inst to bytes on the output stream OS . | |
MCCodeEmitter - Generic instruction encoding interface.
Definition at line 21 of file MCCodeEmitter.h.
|
protecteddefault |
|
delete |
|
virtualdefault |
|
inlinevirtual |
Append the prefixes of given instruction to the code buffer.
Inst | a single low-level machine instruction. |
CB | code buffer |
Definition at line 44 of file MCCodeEmitter.h.
|
inlineprotectedvirtual |
EncodeInstruction - Encode the given Inst
to bytes on the output stream OS
.
Allows for an implementation of encodeInstruction that uses streams instead of a SmallVector.
Reimplemented in llvm::CSKYMCCodeEmitter, llvm::MipsMCCodeEmitter, llvm::MSP430MCCodeEmitter, llvm::PPCMCCodeEmitter, and llvm::HexagonMCCodeEmitter.
Definition at line 28 of file MCCodeEmitter.h.
Referenced by llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::MCXCOFFStreamer::emitInstToData(), llvm::MCWinCOFFStreamer::emitInstToData(), llvm::MCObjectStreamer::emitInstToFragment(), and encodeInstruction().
|
virtual |
EncodeInstruction - Encode the given Inst
to bytes and append to CB
.
Definition at line 18 of file MCCodeEmitter.cpp.
References encodeInstruction(), and OS.
|
delete |
|
inlinevirtual |
Lifetime management.
Definition at line 38 of file MCCodeEmitter.h.
Referenced by llvm::MCAssembler::reset().