summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dynarmic
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-09-30 20:16:39 +0200
committerbunnei <bunneidev@gmail.com>2017-09-30 20:34:03 +0200
commit6377585edb43009e464d4c04b4a35720b5f9d020 (patch)
tree432d8ef516d1dc4a5772bead7e9b47f67468b554 /src/core/arm/dynarmic
parentnso: Refactor and allocate .bss section. (diff)
downloadyuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar.gz
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar.bz2
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar.lz
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar.xz
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.tar.zst
yuzu-6377585edb43009e464d4c04b4a35720b5f9d020.zip
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp14
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.h2
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;