summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dynarmic
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2018-02-21 21:51:54 +0100
committerMerryMage <MerryMage@users.noreply.github.com>2018-02-21 22:39:07 +0100
commit32d127ad3e94b09566ca17b83072ff42018b02b3 (patch)
treeec887f2feca3e3ced5480a5180a32c1a9ce0050c /src/core/arm/dynarmic
parentarm_dynarmic: LOG_INFO on unicorn fallback (diff)
downloadyuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar.gz
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar.bz2
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar.lz
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar.xz
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.tar.zst
yuzu-32d127ad3e94b09566ca17b83072ff42018b02b3.zip
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp
index ab10b8a34..e7f6bf8c2 100644
--- a/src/core/arm/dynarmic/arm_dynarmic.cpp
+++ b/src/core/arm/dynarmic/arm_dynarmic.cpp
@@ -67,8 +67,17 @@ public:
}
void ExceptionRaised(u64 pc, Dynarmic::A64::Exception exception) override {
- ASSERT_MSG(false, "ExceptionRaised(exception = %zu, pc = %" PRIx64 ")",
- static_cast<size_t>(exception), pc);
+ switch (exception) {
+ case Dynarmic::A64::Exception::WaitForInterrupt:
+ case Dynarmic::A64::Exception::WaitForEvent:
+ case Dynarmic::A64::Exception::SendEvent:
+ case Dynarmic::A64::Exception::SendEventLocal:
+ case Dynarmic::A64::Exception::Yield:
+ return;
+ default:
+ ASSERT_MSG(false, "ExceptionRaised(exception = %zu, pc = %" PRIx64 ")",
+ static_cast<size_t>(exception), pc);
+ }
}
void CallSVC(u32 swi) override {
@@ -85,11 +94,15 @@ public:
u64 GetTicksRemaining() override {
return ticks_remaining;
}
+ u64 GetCNTPCT() override {
+ return CoreTiming::GetTicks();
+ }
ARM_Dynarmic& parent;
size_t ticks_remaining = 0;
size_t num_interpreted_instructions = 0;
u64 tpidrro_el0 = 0;
+ u64 tpidr_el0 = 0;
};
std::unique_ptr<Dynarmic::A64::Jit> MakeJit(const std::unique_ptr<ARM_Dynarmic_Callbacks>& cb) {
@@ -98,10 +111,13 @@ std::unique_ptr<Dynarmic::A64::Jit> MakeJit(const std::unique_ptr<ARM_Dynarmic_C
Dynarmic::A64::UserConfig config;
config.callbacks = cb.get();
config.tpidrro_el0 = &cb->tpidrro_el0;
+ config.tpidr_el0 = &cb->tpidr_el0;
config.dczid_el0 = 4;
+ config.ctr_el0 = 0x8444c004;
config.page_table = reinterpret_cast<void**>(page_table);
config.page_table_address_space_bits = Memory::ADDRESS_SPACE_BITS;
config.silently_mirror_page_table = false;
+
return std::make_unique<Dynarmic::A64::Jit>(config);
}