diff options
| author | 2015-01-09 12:59:35 -0500 | |
|---|---|---|
| committer | 2015-01-09 12:59:35 -0500 | |
| commit | 6ae12424df58f0ea171fc75ca4b700ab1fffc192 (patch) | |
| tree | 93d87f3cb19d08541c6b8f8a9e0ceb730a2b13d9 /src/core/arm/interpreter | |
| parent | Merge pull request #436 from kevinhartman/system-core (diff) | |
| parent | Thread: Fix nullptr access in a logging function (diff) | |
| download | yuzu-6ae12424df58f0ea171fc75ca4b700ab1fffc192.tar.gz yuzu-6ae12424df58f0ea171fc75ca4b700ab1fffc192.tar.xz yuzu-6ae12424df58f0ea171fc75ca4b700ab1fffc192.zip | |
Merge pull request #444 from yuriks/handle-reform2
Kernel Lifetime Reform Pt. 2
Diffstat (limited to 'src/core/arm/interpreter')
| -rw-r--r-- | src/core/arm/interpreter/arm_interpreter.cpp | 6 | ||||
| -rw-r--r-- | src/core/arm/interpreter/arm_interpreter.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/core/arm/interpreter/arm_interpreter.cpp b/src/core/arm/interpreter/arm_interpreter.cpp index 80ebc359e..c76d371a2 100644 --- a/src/core/arm/interpreter/arm_interpreter.cpp +++ b/src/core/arm/interpreter/arm_interpreter.cpp | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include "core/arm/interpreter/arm_interpreter.h" | 5 | #include "core/arm/interpreter/arm_interpreter.h" |
| 6 | 6 | ||
| 7 | #include "core/core.h" | ||
| 8 | |||
| 7 | const static cpu_config_t arm11_cpu_info = { | 9 | const static cpu_config_t arm11_cpu_info = { |
| 8 | "armv6", "arm11", 0x0007b000, 0x0007f000, NONCACHE | 10 | "armv6", "arm11", 0x0007b000, 0x0007f000, NONCACHE |
| 9 | }; | 11 | }; |
| @@ -75,7 +77,7 @@ void ARM_Interpreter::ExecuteInstructions(int num_instructions) { | |||
| 75 | ARMul_Emulate32(state); | 77 | ARMul_Emulate32(state); |
| 76 | } | 78 | } |
| 77 | 79 | ||
| 78 | void ARM_Interpreter::SaveContext(ThreadContext& ctx) { | 80 | void ARM_Interpreter::SaveContext(Core::ThreadContext& ctx) { |
| 79 | memcpy(ctx.cpu_registers, state->Reg, sizeof(ctx.cpu_registers)); | 81 | memcpy(ctx.cpu_registers, state->Reg, sizeof(ctx.cpu_registers)); |
| 80 | memcpy(ctx.fpu_registers, state->ExtReg, sizeof(ctx.fpu_registers)); | 82 | memcpy(ctx.fpu_registers, state->ExtReg, sizeof(ctx.fpu_registers)); |
| 81 | 83 | ||
| @@ -91,7 +93,7 @@ void ARM_Interpreter::SaveContext(ThreadContext& ctx) { | |||
| 91 | ctx.mode = state->NextInstr; | 93 | ctx.mode = state->NextInstr; |
| 92 | } | 94 | } |
| 93 | 95 | ||
| 94 | void ARM_Interpreter::LoadContext(const ThreadContext& ctx) { | 96 | void ARM_Interpreter::LoadContext(const Core::ThreadContext& ctx) { |
| 95 | memcpy(state->Reg, ctx.cpu_registers, sizeof(ctx.cpu_registers)); | 97 | memcpy(state->Reg, ctx.cpu_registers, sizeof(ctx.cpu_registers)); |
| 96 | memcpy(state->ExtReg, ctx.fpu_registers, sizeof(ctx.fpu_registers)); | 98 | memcpy(state->ExtReg, ctx.fpu_registers, sizeof(ctx.fpu_registers)); |
| 97 | 99 | ||
diff --git a/src/core/arm/interpreter/arm_interpreter.h b/src/core/arm/interpreter/arm_interpreter.h index 019dad5df..e5ecc69c2 100644 --- a/src/core/arm/interpreter/arm_interpreter.h +++ b/src/core/arm/interpreter/arm_interpreter.h | |||
| @@ -70,13 +70,13 @@ public: | |||
| 70 | * Saves the current CPU context | 70 | * Saves the current CPU context |
| 71 | * @param ctx Thread context to save | 71 | * @param ctx Thread context to save |
| 72 | */ | 72 | */ |
| 73 | void SaveContext(ThreadContext& ctx) override; | 73 | void SaveContext(Core::ThreadContext& ctx) override; |
| 74 | 74 | ||
| 75 | /** | 75 | /** |
| 76 | * Loads a CPU context | 76 | * Loads a CPU context |
| 77 | * @param ctx Thread context to load | 77 | * @param ctx Thread context to load |
| 78 | */ | 78 | */ |
| 79 | void LoadContext(const ThreadContext& ctx) override; | 79 | void LoadContext(const Core::ThreadContext& ctx) override; |
| 80 | 80 | ||
| 81 | /// Prepare core for thread reschedule (if needed to correctly handle state) | 81 | /// Prepare core for thread reschedule (if needed to correctly handle state) |
| 82 | void PrepareReschedule() override; | 82 | void PrepareReschedule() override; |