diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/arm/arm_interface.h | 6 | ||||
-rw-r--r-- | src/core/arm/interpreter/arm_interpreter.cpp | 8 | ||||
-rw-r--r-- | src/core/arm/interpreter/arm_interpreter.h | 6 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 4dfe0570b..602c91e30 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -56,6 +56,12 @@ public: virtual u32 GetCPSR() const = 0; /** + * Set the current CPSR register + * @param cpsr Value to set CPSR to + */ + virtual void SetCPSR(u32 cpsr) = 0; + + /** * Returns the number of clock ticks since the last rese * @return Returns number of clock ticks */ diff --git a/src/core/arm/interpreter/arm_interpreter.cpp b/src/core/arm/interpreter/arm_interpreter.cpp index 4045779d7..81147f2d4 100644 --- a/src/core/arm/interpreter/arm_interpreter.cpp +++ b/src/core/arm/interpreter/arm_interpreter.cpp @@ -78,6 +78,14 @@ u32 ARM_Interpreter::GetCPSR() const { } /** + * Set the current CPSR register + * @param cpsr Value to set CPSR to + */ +void ARM_Interpreter::SetCPSR(u32 cpsr) { + m_state->Cpsr = cpsr; +} + +/** * Returns the number of clock ticks since the last reset * @return Returns number of clock ticks */ diff --git a/src/core/arm/interpreter/arm_interpreter.h b/src/core/arm/interpreter/arm_interpreter.h index 625c0c652..78b188bee 100644 --- a/src/core/arm/interpreter/arm_interpreter.h +++ b/src/core/arm/interpreter/arm_interpreter.h @@ -49,6 +49,12 @@ public: u32 GetCPSR() const; /** + * Set the current CPSR register + * @param cpsr Value to set CPSR to + */ + void SetCPSR(u32 cpsr); + + /** * Returns the number of clock ticks since the last reset * @return Returns number of clock ticks */ |