libmicroemu 0.2.0
ARM Microcontroller Emulator Library
Loading...
Searching...
No Matches
libmicroemu::internal::SpecialRegAccessor< TCpuAccessor > Class Template Reference

Provides access to special registers. More...

#include <spec_reg_access.h>

Inheritance diagram for libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >:
libmicroemu::ISpecialRegAccessor

Public Types

using CpuAccessor = TCpuAccessor
 
using SReg = typename CpuAccessor::SReg
 

Public Member Functions

 SpecialRegAccessor (CpuAccessor &cpua)
 Constructs a SpecialRegAccessor object with the given processor states.
 
 ~SpecialRegAccessor ()=default
 Default destructor for the SpecialRegAccessor object.
 
 SpecialRegAccessor (const SpecialRegAccessor &)=default
 Default copy constructor for the SpecialRegAccessor object.
 
SpecialRegAccessoroperator= (const SpecialRegAccessor &)=default
 Default copy assignment operator for the SpecialRegAccessor object.
 
 SpecialRegAccessor (SpecialRegAccessor &&)=default
 Default move constructor for the SpecialRegAccessor object.
 
SpecialRegAccessoroperator= (SpecialRegAccessor &&)=default
 Default move assignment operator for the SpecialRegAccessor object.
 
std::string_view GetRegisterName (const SpecialRegisterId &reg_id) const override
 Gets the name of the specified special register.
 
u32 ReadRegister (const SpecialRegisterId &reg_id) const override
 Reads the value of the specified special register.
 
void WriteRegister (const SpecialRegisterId &reg_id, u32 value) override
 Writes the value to the specified special register.
 

Detailed Description

template<typename TCpuAccessor>
class libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >

Provides access to special registers.

The SpecialRegAccessor class allows reading and writing values to special registers. It is templated on the type TCpuAccessor , which gives internal access to the registers.

Template Parameters
TCpuAccessorThe type of the cpu accessor object.
TSpecRegOpsThe type representing the operations on special registers.

Constructor & Destructor Documentation

◆ SpecialRegAccessor()

template<typename TCpuAccessor>
libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >::SpecialRegAccessor ( CpuAccessor & cpua)
inline

Constructs a SpecialRegAccessor object with the given processor states.

Parameters
CpuAccessorThe processor states to be used by the SpecialRegAccessor object.

Member Function Documentation

◆ GetRegisterName()

template<typename TCpuAccessor>
std::string_view libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >::GetRegisterName ( const SpecialRegisterId & reg_id) const
inlineoverridevirtual

Gets the name of the specified special register.

Parameters
reg_idThe ID of the special register.
Returns
The name of the special register.

Implements libmicroemu::ISpecialRegAccessor.

◆ ReadRegister()

template<typename TCpuAccessor>
u32 libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >::ReadRegister ( const SpecialRegisterId & reg_id) const
inlineoverridevirtual

Reads the value of the specified special register.

Parameters
reg_idThe ID of the special register to be read.
Returns
The value of the special register.

Implements libmicroemu::ISpecialRegAccessor.

◆ WriteRegister()

template<typename TCpuAccessor>
void libmicroemu::internal::SpecialRegAccessor< TCpuAccessor >::WriteRegister ( const SpecialRegisterId & reg_id,
u32 value )
inlineoverridevirtual

Writes the value to the specified special register.

Parameters
reg_idThe ID of the special register to be written.
valueThe value to be written to the special register.

Implements libmicroemu::ISpecialRegAccessor.


The documentation for this class was generated from the following file: