diff options
| author | 2014-12-22 04:30:09 -0200 | |
|---|---|---|
| committer | 2015-01-09 03:51:55 -0200 | |
| commit | 7b3452c7303cf348377de6702ddda0307533663c (patch) | |
| tree | ce08ed7d7c42015919e1dd26cb2ec8721a54ec8a /src/core/arm/dyncom | |
| parent | Merge pull request #255 from Subv/cbranch_3 (diff) | |
| download | yuzu-7b3452c7303cf348377de6702ddda0307533663c.tar.gz yuzu-7b3452c7303cf348377de6702ddda0307533663c.tar.xz yuzu-7b3452c7303cf348377de6702ddda0307533663c.zip | |
Move ThreadContext to core/core.h and deal with the fallout
Diffstat (limited to 'src/core/arm/dyncom')
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom.cpp | 5 | ||||
| -rw-r--r-- | src/core/arm/dyncom/arm_dyncom.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom.cpp b/src/core/arm/dyncom/arm_dyncom.cpp index 31eb879a2..9c4cc90f2 100644 --- a/src/core/arm/dyncom/arm_dyncom.cpp +++ b/src/core/arm/dyncom/arm_dyncom.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "core/arm/dyncom/arm_dyncom.h" | 9 | #include "core/arm/dyncom/arm_dyncom.h" |
| 10 | #include "core/arm/dyncom/arm_dyncom_interpreter.h" | 10 | #include "core/arm/dyncom/arm_dyncom_interpreter.h" |
| 11 | 11 | ||
| 12 | #include "core/core.h" | ||
| 12 | #include "core/core_timing.h" | 13 | #include "core/core_timing.h" |
| 13 | 14 | ||
| 14 | const static cpu_config_t s_arm11_cpu_info = { | 15 | const static cpu_config_t s_arm11_cpu_info = { |
| @@ -94,7 +95,7 @@ void ARM_DynCom::ExecuteInstructions(int num_instructions) { | |||
| 94 | AddTicks(ticks_executed); | 95 | AddTicks(ticks_executed); |
| 95 | } | 96 | } |
| 96 | 97 | ||
| 97 | void ARM_DynCom::SaveContext(ThreadContext& ctx) { | 98 | void ARM_DynCom::SaveContext(Core::ThreadContext& ctx) { |
| 98 | memcpy(ctx.cpu_registers, state->Reg, sizeof(ctx.cpu_registers)); | 99 | memcpy(ctx.cpu_registers, state->Reg, sizeof(ctx.cpu_registers)); |
| 99 | memcpy(ctx.fpu_registers, state->ExtReg, sizeof(ctx.fpu_registers)); | 100 | memcpy(ctx.fpu_registers, state->ExtReg, sizeof(ctx.fpu_registers)); |
| 100 | 101 | ||
| @@ -110,7 +111,7 @@ void ARM_DynCom::SaveContext(ThreadContext& ctx) { | |||
| 110 | ctx.mode = state->NextInstr; | 111 | ctx.mode = state->NextInstr; |
| 111 | } | 112 | } |
| 112 | 113 | ||
| 113 | void ARM_DynCom::LoadContext(const ThreadContext& ctx) { | 114 | void ARM_DynCom::LoadContext(const Core::ThreadContext& ctx) { |
| 114 | memcpy(state->Reg, ctx.cpu_registers, sizeof(ctx.cpu_registers)); | 115 | memcpy(state->Reg, ctx.cpu_registers, sizeof(ctx.cpu_registers)); |
| 115 | memcpy(state->ExtReg, ctx.fpu_registers, sizeof(ctx.fpu_registers)); | 116 | memcpy(state->ExtReg, ctx.fpu_registers, sizeof(ctx.fpu_registers)); |
| 116 | 117 | ||
diff --git a/src/core/arm/dyncom/arm_dyncom.h b/src/core/arm/dyncom/arm_dyncom.h index 9e102a46e..f16fb070c 100644 --- a/src/core/arm/dyncom/arm_dyncom.h +++ b/src/core/arm/dyncom/arm_dyncom.h | |||
| @@ -71,13 +71,13 @@ public: | |||
| 71 | * Saves the current CPU context | 71 | * Saves the current CPU context |
| 72 | * @param ctx Thread context to save | 72 | * @param ctx Thread context to save |
| 73 | */ | 73 | */ |
| 74 | void SaveContext(ThreadContext& ctx) override; | 74 | void SaveContext(Core::ThreadContext& ctx) override; |
| 75 | 75 | ||
| 76 | /** | 76 | /** |
| 77 | * Loads a CPU context | 77 | * Loads a CPU context |
| 78 | * @param ctx Thread context to load | 78 | * @param ctx Thread context to load |
| 79 | */ | 79 | */ |
| 80 | void LoadContext(const ThreadContext& ctx) override; | 80 | void LoadContext(const Core::ThreadContext& ctx) override; |
| 81 | 81 | ||
| 82 | /// Prepare core for thread reschedule (if needed to correctly handle state) | 82 | /// Prepare core for thread reschedule (if needed to correctly handle state) |
| 83 | void PrepareReschedule() override; | 83 | void PrepareReschedule() override; |