cleaned up arm_interface, added a setter to set registers for use with HLE return values

This commit is contained in:
bunnei 2014-04-10 19:55:59 -04:00
parent 59d00e6e4b
commit 95e5436f41
2 changed files with 86 additions and 22 deletions

View file

@ -12,22 +12,55 @@
class ARM_Interpreter : virtual public ARM_Interface {
public:
ARM_Interpreter();
~ARM_Interpreter();
void ExecuteInstruction();
/**
* Set the Program Counter to an address
* @param addr Address to set PC to
*/
void SetPC(u32 pc);
/*
* Get the current Program Counter
* @return Returns current PC
*/
u32 GetPC() const;
/**
* Get an ARM register
* @param index Register index (0-15)
* @return Returns the value in the register
*/
u32 GetReg(int index) const;
/**
* Set an ARM register
* @param index Register index (0-15)
* @param value Value to set register to
*/
void SetReg(int index, u32 value);
/**
* Get the current CPSR register
* @return Returns the value of the CPSR register
*/
u32 GetCPSR() const;
/**
* Returns the number of clock ticks since the last reset
* @return Returns number of clock ticks
*/
u64 GetTicks() const;
protected:
/// Execture next instruction
void ExecuteInstruction();
private:
ARMul_State* m_state;
DISALLOW_COPY_AND_ASSIGN(ARM_Interpreter);