diff options
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 14 | ||||
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 3da968344..0ea1d76e4 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -157,6 +157,14 @@ void ARM_Dynarmic::SetCP15Register(CP15Register reg, u32 value) { interpreter_state->CP15[reg] = value; } +VAddr ARM_Dynarmic::GetTlsAddress() const { + return jit->TlsAddr(); +} + +void ARM_Dynarmic::SetTlsAddress(VAddr address) { + jit->TlsAddr() = address; +} + void ARM_Dynarmic::AddTicks(u64 ticks) { down_count -= ticks; if (down_count < 0) { @@ -185,6 +193,9 @@ void ARM_Dynarmic::SaveContext(ARM_Interface::ThreadContext& ctx) { ctx.fpscr = jit->Fpscr(); ctx.fpexc = interpreter_state->VFP[VFP_FPEXC]; + + // TODO(bunnei): Fix once we have proper support for tpidrro_el0, etc. in the JIT + ctx.tls_address = jit->TlsAddr(); } void ARM_Dynarmic::LoadContext(const ARM_Interface::ThreadContext& ctx) { @@ -198,6 +209,9 @@ void ARM_Dynarmic::LoadContext(const ARM_Interface::ThreadContext& ctx) { jit->SetFpscr(ctx.fpscr); interpreter_state->VFP[VFP_FPEXC] = ctx.fpexc; + + // TODO(bunnei): Fix once we have proper support for tpidrro_el0, etc. in the JIT + jit->TlsAddr() = ctx.tls_address; } void ARM_Dynarmic::PrepareReschedule() { diff --git a/src/core/arm/dynarmic/arm_dynarmic.h b/src/core/arm/dynarmic/arm_dynarmic.h index f77548d0f..fcdc1c0e0 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.h +++ b/src/core/arm/dynarmic/arm_dynarmic.h @@ -26,6 +26,8 @@ public: void SetCPSR(u32 cpsr) override; u32 GetCP15Register(CP15Register reg) override; void SetCP15Register(CP15Register reg, u32 value) override; + VAddr GetTlsAddress() const override; + void SetTlsAddress(VAddr address) override; void AddTicks(u64 ticks) override; |