summaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
authorGravatar bunnei2016-12-22 11:47:44 -0500
committerGravatar GitHub2016-12-22 11:47:44 -0500
commitaa47af7fb6efd0bda54cca2373ed978e538f6d61 (patch)
tree93d96872603f64925cd632f27bb5c7046cadeedf /src/core/arm/arm_interface.h
parentMerge pull request #2285 from mailwl/csnd-format (diff)
parentThreadContext: Move from "core" to "arm_interface". (diff)
downloadyuzu-aa47af7fb6efd0bda54cca2373ed978e538f6d61.tar.gz
yuzu-aa47af7fb6efd0bda54cca2373ed978e538f6d61.tar.xz
yuzu-aa47af7fb6efd0bda54cca2373ed978e538f6d61.zip
Merge pull request #2343 from bunnei/core-cleanup
Core: Top-level consolidate & misc cleanup
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h
index e466b21b2..ccd43f431 100644
--- a/src/core/arm/arm_interface.h
+++ b/src/core/arm/arm_interface.h
@@ -8,15 +8,22 @@
8#include "core/arm/skyeye_common/arm_regformat.h" 8#include "core/arm/skyeye_common/arm_regformat.h"
9#include "core/arm/skyeye_common/vfp/asm_vfp.h" 9#include "core/arm/skyeye_common/vfp/asm_vfp.h"
10 10
11namespace Core {
12struct ThreadContext;
13}
14
15/// Generic ARM11 CPU interface 11/// Generic ARM11 CPU interface
16class ARM_Interface : NonCopyable { 12class ARM_Interface : NonCopyable {
17public: 13public:
18 virtual ~ARM_Interface() {} 14 virtual ~ARM_Interface() {}
19 15
16 struct ThreadContext {
17 u32 cpu_registers[13];
18 u32 sp;
19 u32 lr;
20 u32 pc;
21 u32 cpsr;
22 u32 fpu_registers[64];
23 u32 fpscr;
24 u32 fpexc;
25 };
26
20 /** 27 /**
21 * Runs the CPU for the given number of instructions 28 * Runs the CPU for the given number of instructions
22 * @param num_instructions Number of instructions to run 29 * @param num_instructions Number of instructions to run
@@ -124,13 +131,13 @@ public:
124 * Saves the current CPU context 131 * Saves the current CPU context
125 * @param ctx Thread context to save 132 * @param ctx Thread context to save
126 */ 133 */
127 virtual void SaveContext(Core::ThreadContext& ctx) = 0; 134 virtual void SaveContext(ThreadContext& ctx) = 0;
128 135
129 /** 136 /**
130 * Loads a CPU context 137 * Loads a CPU context
131 * @param ctx Thread context to load 138 * @param ctx Thread context to load
132 */ 139 */
133 virtual void LoadContext(const Core::ThreadContext& ctx) = 0; 140 virtual void LoadContext(const ThreadContext& ctx) = 0;
134 141
135 /// Prepare core for thread reschedule (if needed to correctly handle state) 142 /// Prepare core for thread reschedule (if needed to correctly handle state)
136 virtual void PrepareReschedule() = 0; 143 virtual void PrepareReschedule() = 0;