Updated target register interface with more generic register access & manipulation functions

This commit is contained in:
Nav
2021-08-07 17:28:54 +01:00
parent 7ebc447344
commit f4da255b75
6 changed files with 142 additions and 246 deletions

View File

@@ -223,21 +223,12 @@ namespace Bloom::Targets
*/
virtual void clearAllBreakpoints() = 0;
/**
* Should read general purpose register values, for the given general purpose register ids.
*
* @param registerIds
*
* @return
*/
virtual TargetRegisters readGeneralPurposeRegisters(std::set<std::size_t> registerIds) = 0;
/**
* Should update the value of the given registers.
*
* @param registers
*/
virtual void writeRegisters(const TargetRegisters& registers) = 0;
virtual void writeRegisters(TargetRegisters registers) = 0;
/**
* Should read register values of the registers described by the given descriptors.
@@ -246,7 +237,7 @@ namespace Bloom::Targets
*
* @return
*/
virtual TargetRegisters readRegisters(const TargetRegisterDescriptors& descriptors) = 0;
virtual TargetRegisters readRegisters(TargetRegisterDescriptors descriptors) = 0;
/**
* Should read memory from the target.
@@ -282,13 +273,6 @@ namespace Bloom::Targets
*/
virtual std::uint32_t getProgramCounter() = 0;
/**
* Same as Target::getProgramCounter() but in the form of a TargetRegister.
*
* @return
*/
virtual TargetRegister getProgramCounterRegister() = 0;
/**
* Should update the program counter on the target.
*
@@ -296,20 +280,6 @@ namespace Bloom::Targets
*/
virtual void setProgramCounter(std::uint32_t programCounter) = 0;
/**
* Should fetch the status register value.
*
* @return
*/
virtual TargetRegister getStatusRegister() = 0;
/**
* Should fetch the stack pointer register value.
*
* @return
*/
virtual TargetRegister getStackPointerRegister() = 0;
/**
* Should get the current pin states for each pin on the target, mapped by pin number
*