#include <ELFStreamerWrapper.h>
|
| | ELFStreamerWrapper (llvm::MCContext &context, std::unique_ptr< llvm::MCAsmBackend > &&assembler_backend, std::unique_ptr< llvm::MCObjectWriter > &&object_writer, std::unique_ptr< llvm::MCCodeEmitter > &&code_emitter, std::vector< Nyxstone::Instruction > *instructions, std::string &extended_error, llvm::MCInstPrinter &instruction_printer) |
| | ELFStreamerWrapper constructor.
|
| |
|
void | emitInstruction (const llvm::MCInst &Inst, const llvm::MCSubtargetInfo &STI) override |
| | Calls MCELFStreamer::emitInstruction and records instruction details.
|
| |
|
| static std::unique_ptr< llvm::MCStreamer > | createELFStreamerWrapper (llvm::MCContext &context, std::unique_ptr< llvm::MCAsmBackend > &&assembler_backend, std::unique_ptr< llvm::MCObjectWriter > &&object_writer, std::unique_ptr< llvm::MCCodeEmitter > &&code_emitter, bool RelaxAll, std::vector< Nyxstone::Instruction > *instructions, std::string &extended_error, llvm::MCInstPrinter &instruction_printer) |
| | Creates a UniquePtr holding the ELFStreamerWrapper.
|
| |
This class derives from LLVM's MCELFStreamer, which enables us to receive information during assembly such as preliminary instruction size and bytes before relaxation and fixups (via method 'emitInstruction()').
◆ ELFStreamerWrapper()
| nyxstone::ELFStreamerWrapper::ELFStreamerWrapper |
( |
llvm::MCContext & | context, |
|
|
std::unique_ptr< llvm::MCAsmBackend > && | assembler_backend, |
|
|
std::unique_ptr< llvm::MCObjectWriter > && | object_writer, |
|
|
std::unique_ptr< llvm::MCCodeEmitter > && | code_emitter, |
|
|
std::vector< Nyxstone::Instruction > * | instructions, |
|
|
std::string & | extended_error, |
|
|
llvm::MCInstPrinter & | instruction_printer ) |
|
inline |
ELFStreamerWrapper constructor.
- Parameters
-
| context | The MCContext used for reporting errors. |
| assembler_backend | Backend for the wrapped MCELFStreamer. |
| object_writer | Writer for the wrapped MCELFStreamer. |
| code_emitter | Emitter for the wrapped MCELFStreamer. |
| RelaxAll | Relax all instructions that can be relaxed. |
| instructions | Vector to store instruction information. |
| extended_error | Reference to nyxstone error string. |
| instruction_printer | Instruction printer used to generate the instruction assembly. |
◆ createELFStreamerWrapper()
| std::unique_ptr< MCStreamer > nyxstone::ELFStreamerWrapper::createELFStreamerWrapper |
( |
llvm::MCContext & | context, |
|
|
std::unique_ptr< llvm::MCAsmBackend > && | assembler_backend, |
|
|
std::unique_ptr< llvm::MCObjectWriter > && | object_writer, |
|
|
std::unique_ptr< llvm::MCCodeEmitter > && | code_emitter, |
|
|
bool | RelaxAll, |
|
|
std::vector< Nyxstone::Instruction > * | instructions, |
|
|
std::string & | extended_error, |
|
|
llvm::MCInstPrinter & | instruction_printer ) |
|
static |
Creates a UniquePtr holding the ELFStreamerWrapper.
- Parameters
-
| context | The MCContext used for reporting errors. |
| assembler_backend | Backend for the wrapped MCELFStreamer. |
| object_writer | Writer for the wrapped MCELFStreamer. |
| code_emitter | Emitter for the wrapped MCELFStreamer. |
| RelaxAll | Relax all instructions that can be relaxed. |
| instructions | Vector to store instruction information. |
| extended_error | Reference to nyxstone error string. |
| instruction_printer | Instruction printer used to generate the instruction assembly. |
- Returns
- unique_ptr holding the ELFStreamerWrapper
The documentation for this class was generated from the following files: