summaryrefslogtreecommitdiffstats
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorbunnei <ericbunnie@gmail.com>2014-05-23 04:57:45 +0200
committerbunnei <ericbunnie@gmail.com>2014-05-23 04:57:45 +0200
commit32c314c99290a52f1f870ecf8c677e3792ed09c4 (patch)
tree1cea62bc320d51ebb217e7c361ae10b65b71dd45 /src/core/arm/arm_interface.h
parentMerge branch 'master' of https://github.com/citra-emu/citra (diff)
parentcore: added Kernel::Reschedule() call to check for thread changes, shortened delay time to 100 instructions (diff)
downloadyuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar.gz
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar.bz2
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar.lz
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar.xz
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.tar.zst
yuzu-32c314c99290a52f1f870ecf8c677e3792ed09c4.zip
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index 9fdc7ba3c..b73786ccd 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -7,11 +7,13 @@
#include "common/common.h"
#include "common/common_types.h"
+#include "core/hle/svc.h"
+
/// Generic ARM11 CPU interface
class ARM_Interface : NonCopyable {
public:
ARM_Interface() {
- m_num_instructions = 0;
+ num_instructions = 0;
}
~ARM_Interface() {
@@ -23,7 +25,7 @@ public:
*/
void Run(int num_instructions) {
ExecuteInstructions(num_instructions);
- m_num_instructions += num_instructions;
+ num_instructions += num_instructions;
}
/// Step CPU by one instruction
@@ -64,14 +66,32 @@ 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
*/
virtual u64 GetTicks() const = 0;
- /// Getter for m_num_instructions
+ /**
+ * Saves the current CPU context
+ * @param ctx Thread context to save
+ */
+ virtual void SaveContext(ThreadContext& ctx) = 0;
+
+ /**
+ * Loads a CPU context
+ * @param ctx Thread context to load
+ */
+ virtual void LoadContext(const ThreadContext& ctx) = 0;
+
+ /// Getter for num_instructions
u64 GetNumInstructions() {
- return m_num_instructions;
+ return num_instructions;
}
protected:
@@ -84,6 +104,6 @@ protected:
private:
- u64 m_num_instructions; ///< Number of instructions executed
+ u64 num_instructions; ///< Number of instructions executed
};