5#include "libmicroemu/logger.h"
6#include "libmicroemu/register_id.h"
16template <
typename TCpuStates,
typename RegOps,
typename TSpecRegOps,
typename TLogger = NullLogger>
20 using SReg = TSpecRegOps;
24 template <RegisterId Id>
inline u32 ReadRegister()
const {
25 return RegOps::ReadRegister(*
this, Id);
28 inline u32 ReadRegister(
const RegisterId id)
const {
return RegOps::ReadRegister(*
this,
id); }
30 template <RegisterId Id>
inline void WriteRegister(
const u32 &value) {
31 RegOps::WriteRegister(*
this, Id, value);
34 inline void WriteRegister(
RegisterId id, u32 value) { RegOps::WriteRegister(*
this,
id, value); }
37 template <SpecialRegisterId SId>
inline u32 ReadSpecialRegister()
const {
38 return SReg::template ReadRegister<SId>(*
this);
42 return SReg::ReadRegister(*
this, reg_id);
45 template <SpecialRegisterId SId>
inline void WriteSpecialRegister(u32 value) {
46 SReg::template WriteRegister<SId>(*
this, value);
50 SReg::WriteRegister(*
this, reg_id, value);
Definition cpu_accessor.h:17
The libmicroemu::internal namespace contains all classes and functions of libmicroemu which are priva...
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 Predicates class.
Contains the Result class which is used to return the result of a function.
This file contains the declaration of the SpecialRegisterId enumeration and related functions.