diff options
author | MerryMage <MerryMage@users.noreply.github.com> | 2020-06-17 17:32:21 +0200 |
---|---|---|
committer | MerryMage <MerryMage@users.noreply.github.com> | 2020-06-17 18:10:24 +0200 |
commit | 52bcfac1169b841a1bac6cd017fa9922dd10f4a0 (patch) | |
tree | 5e9cfcd3ceaf7d2abf4de1825b981e703b0e09e3 /src/core/arm/dynarmic | |
parent | arm_dynarmic_cp15: Update CP15 (diff) | |
download | yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar.gz yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar.bz2 yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar.lz yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar.xz yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.tar.zst yuzu-52bcfac1169b841a1bac6cd017fa9922dd10f4a0.zip |
Diffstat (limited to 'src/core/arm/dynarmic')
-rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic_cp15.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp index 81b2c400f..d43e4dd70 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_cp15.cpp @@ -6,6 +6,9 @@ #include "common/logging/log.h" #include "core/arm/dynarmic/arm_dynarmic_32.h" #include "core/arm/dynarmic/arm_dynarmic_cp15.h" +#include "core/core.h" +#include "core/core_timing.h" +#include "core/core_timing_util.h" using Callback = Dynarmic::A32::Coprocessor::Callback; using CallbackOrAccessOneWord = Dynarmic::A32::Coprocessor::CallbackOrAccessOneWord; @@ -89,6 +92,16 @@ CallbackOrAccessOneWord DynarmicCP15::CompileGetOneWord(bool two, unsigned opc1, } CallbackOrAccessTwoWords DynarmicCP15::CompileGetTwoWords(bool two, unsigned opc, CoprocReg CRm) { + if (!two && opc == 0 && CRm == CoprocReg::C14) { + // CNTPCT + const auto callback = static_cast<u64 (*)(Dynarmic::A32::Jit*, void*, u32, u32)>( + [](Dynarmic::A32::Jit*, void* arg, u32, u32) -> u64 { + ARM_Dynarmic_32& parent = *(ARM_Dynarmic_32*)arg; + return Timing::CpuCyclesToClockCycles(parent.system.CoreTiming().GetTicks()); + }); + return Dynarmic::A32::Coprocessor::Callback{callback, (void*)&parent}; + } + LOG_CRITICAL(Core_ARM, "CP15: mrrc{} p15, {}, <Rt>, <Rt2>, {}", two ? "2" : "", opc, CRm); return {}; } |