3#include "libmicroemu/register_id.h"
5#include "libmicroemu/types.h"
19 virtual void Build(
char *buf, std::size_t buf_len)
const = 0;
84 : pc_(pc), op_code_(op_code), instr_decoder_(instr_decoder), reg_access_(reg_access),
85 spec_reg_access_(spec_reg_access) {}
90 inline me_adr_t
GetPc() const noexcept {
return pc_; }
115 instr_decoder_.Build(buf, buf_len);
void BuildMnemonic(char *buf, std::size_t buf_len) const noexcept
Builds the mnemonic of the current instruction This takes the current instruction and decodes it into...
Definition emu_context.h:114
IRegAccessor & GetRegisterAccessor() noexcept
Gets the register accessor.
Definition emu_context.h:95
ISpecialRegAccessor & GetSpecialRegisterAccessor() noexcept
Gets the special register accessor.
Definition emu_context.h:100
const OpCode & GetOpCode() const noexcept
Gets the opcode of the current instruction.
Definition emu_context.h:105
me_adr_t GetPc() const noexcept
Gets the program counter of the current instruction.
Definition emu_context.h:90
Definition emu_context.h:17
Interface for accessing general-purpose registers.
Definition emu_context.h:25
virtual u32 ReadRegister(const RegisterId ®_id) const =0
Reads the value of the specified register.
virtual std::string_view GetRegisterName(const RegisterId ®_id) const =0
Gets the name of the specified register.
virtual void WriteRegister(const RegisterId ®_id, u32 value)=0
Writes the value to the specified register.
Interface for accessing special registers.
Definition emu_context.h:52
virtual u32 ReadRegister(const SpecialRegisterId ®_id) const =0
Reads the value of the specified special register.
virtual void WriteRegister(const SpecialRegisterId ®_id, u32 value)=0
Writes the value to the specified special register.
virtual std::string_view GetRegisterName(const SpecialRegisterId ®_id) const =0
Gets the name of the specified special register.
The libmicroemu namespace contains all classes and functions of the libmicroemu which are public.
Definition bkpt_flags.h:6
SpecialRegisterId
Enumeration of special register IDs.
Definition special_register_id.h:18
RegisterId
Enumeration of register IDs.
Definition register_id.h:13
This file contains the declaration of the SpecialRegisterId enumeration and related functions.
Definition emu_context.h:11