Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/MC/MCCodeEmitter.h
Show All 24 Lines | |||||
public: | public: | ||||
MCCodeEmitter(const MCCodeEmitter &) = delete; | MCCodeEmitter(const MCCodeEmitter &) = delete; | ||||
MCCodeEmitter &operator=(const MCCodeEmitter &) = delete; | MCCodeEmitter &operator=(const MCCodeEmitter &) = delete; | ||||
virtual ~MCCodeEmitter(); | virtual ~MCCodeEmitter(); | ||||
/// Lifetime management | /// Lifetime management | ||||
virtual void reset() {} | virtual void reset() {} | ||||
/// Emit the prefixes of given instruction on the output stream. | |||||
/// | |||||
/// \param Inst a single low-level machine instruction. | |||||
/// \param OS output stream. | |||||
virtual void emitPrefix(const MCInst &Inst, raw_ostream &OS, | |||||
const MCSubtargetInfo &STI) const {} | |||||
/// EncodeInstruction - Encode the given \p Inst to bytes on the output | /// EncodeInstruction - Encode the given \p Inst to bytes on the output | ||||
/// stream \p OS. | /// stream \p OS. | ||||
virtual void encodeInstruction(const MCInst &Inst, raw_ostream &OS, | virtual void encodeInstruction(const MCInst &Inst, raw_ostream &OS, | ||||
SmallVectorImpl<MCFixup> &Fixups, | SmallVectorImpl<MCFixup> &Fixups, | ||||
const MCSubtargetInfo &STI) const = 0; | const MCSubtargetInfo &STI) const = 0; | ||||
}; | }; | ||||
} // end namespace llvm | } // end namespace llvm | ||||
#endif // LLVM_MC_MCCODEEMITTER_H | #endif // LLVM_MC_MCCODEEMITTER_H |