summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2014-05-11 22:14:13 -0400
committerGravatar bunnei2014-05-11 22:14:13 -0400
commitce4d271a53e79814f66a46bd69a8970ea3849ee9 (patch)
treeaca31760727d3ab5bd2d7f28e2e0a3c743640b2a /src
parentadded initial kernel/thread modules (diff)
downloadyuzu-ce4d271a53e79814f66a46bd69a8970ea3849ee9.tar.gz
yuzu-ce4d271a53e79814f66a46bd69a8970ea3849ee9.tar.xz
yuzu-ce4d271a53e79814f66a46bd69a8970ea3849ee9.zip
added option to set CPSR register to arm_interface
Diffstat (limited to 'src')
-rw-r--r--src/core/arm/arm_interface.h6
-rw-r--r--src/core/arm/interpreter/arm_interpreter.cpp8
-rw-r--r--src/core/arm/interpreter/arm_interpreter.h6
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:
56 virtual u32 GetCPSR() const = 0; 56 virtual u32 GetCPSR() const = 0;
57 57
58 /** 58 /**
59 * Set the current CPSR register
60 * @param cpsr Value to set CPSR to
61 */
62 virtual void SetCPSR(u32 cpsr) = 0;
63
64 /**
59 * Returns the number of clock ticks since the last rese 65 * Returns the number of clock ticks since the last rese
60 * @return Returns number of clock ticks 66 * @return Returns number of clock ticks
61 */ 67 */
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 {
78} 78}
79 79
80/** 80/**
81 * Set the current CPSR register
82 * @param cpsr Value to set CPSR to
83 */
84void ARM_Interpreter::SetCPSR(u32 cpsr) {
85 m_state->Cpsr = cpsr;
86}
87
88/**
81 * Returns the number of clock ticks since the last reset 89 * Returns the number of clock ticks since the last reset
82 * @return Returns number of clock ticks 90 * @return Returns number of clock ticks
83 */ 91 */
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:
49 u32 GetCPSR() const; 49 u32 GetCPSR() const;
50 50
51 /** 51 /**
52 * Set the current CPSR register
53 * @param cpsr Value to set CPSR to
54 */
55 void SetCPSR(u32 cpsr);
56
57 /**
52 * Returns the number of clock ticks since the last reset 58 * Returns the number of clock ticks since the last reset
53 * @return Returns number of clock ticks 59 * @return Returns number of clock ticks
54 */ 60 */