From ce4d271a53e79814f66a46bd69a8970ea3849ee9 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 11 May 2014 22:14:13 -0400 Subject: added option to set CPSR register to arm_interface --- src/core/arm/interpreter/arm_interpreter.cpp | 8 ++++++++ src/core/arm/interpreter/arm_interpreter.h | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'src/core/arm/interpreter') 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 @@ -77,6 +77,14 @@ u32 ARM_Interpreter::GetCPSR() const { return m_state->Cpsr; } +/** + * 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 @@ -48,6 +48,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 -- cgit v1.2.3