mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-07-01 00:35:54 +02:00
rem indir func
This commit is contained in:
parent
4192a4a7ba
commit
bf38b38184
2 changed files with 5 additions and 10 deletions
|
|
@ -113,8 +113,7 @@ void DynarmicCallbacks32::CallSVC(u32 swi) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynarmicCallbacks32::AddTicks(u64 ticks) {
|
void DynarmicCallbacks32::AddTicks(u64 ticks) {
|
||||||
ASSERT_MSG(!m_parent.m_uses_wall_clock, "Dynarmic ticking disabled");
|
ASSERT(!m_parent.m_uses_wall_clock && "Dynarmic ticking disabled");
|
||||||
|
|
||||||
// Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a
|
// Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a
|
||||||
// rough approximation of the amount of executed ticks in the system, it may be thrown off
|
// rough approximation of the amount of executed ticks in the system, it may be thrown off
|
||||||
// if not all cores are doing a similar amount of work. Instead of doing this, we should
|
// if not all cores are doing a similar amount of work. Instead of doing this, we should
|
||||||
|
|
@ -123,14 +122,12 @@ void DynarmicCallbacks32::AddTicks(u64 ticks) {
|
||||||
u64 amortized_ticks = ticks / Core::Hardware::NUM_CPU_CORES;
|
u64 amortized_ticks = ticks / Core::Hardware::NUM_CPU_CORES;
|
||||||
// Always execute at least one tick.
|
// Always execute at least one tick.
|
||||||
amortized_ticks = std::max<u64>(amortized_ticks, 1);
|
amortized_ticks = std::max<u64>(amortized_ticks, 1);
|
||||||
|
|
||||||
m_parent.m_system.CoreTiming().AddTicks(amortized_ticks);
|
m_parent.m_system.CoreTiming().AddTicks(amortized_ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 DynarmicCallbacks32::GetTicksRemaining() {
|
u64 DynarmicCallbacks32::GetTicksRemaining() {
|
||||||
ASSERT_MSG(!m_parent.m_uses_wall_clock, "Dynarmic ticking disabled");
|
ASSERT(!m_parent.m_uses_wall_clock && "Dynarmic ticking disabled");
|
||||||
|
return std::max<s64>(m_parent.m_system.CoreTiming().downcount, 0);
|
||||||
return std::max<s64>(m_parent.m_system.CoreTiming().GetDowncount(), 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DynarmicCallbacks32::CheckMemoryAccess(u64 addr, u64 size, Kernel::DebugWatchpointType type) {
|
bool DynarmicCallbacks32::CheckMemoryAccess(u64 addr, u64 size, Kernel::DebugWatchpointType type) {
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,7 @@ void DynarmicCallbacks64::CallSVC(u32 svc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynarmicCallbacks64::AddTicks(u64 ticks) {
|
void DynarmicCallbacks64::AddTicks(u64 ticks) {
|
||||||
ASSERT_MSG(!m_parent.m_uses_wall_clock, "Dynarmic ticking disabled");
|
ASSERT(!m_parent.m_uses_wall_clock && "Dynarmic ticking disabled");
|
||||||
|
|
||||||
// Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a
|
// Divide the number of ticks by the amount of CPU cores. TODO(Subv): This yields only a
|
||||||
// rough approximation of the amount of executed ticks in the system, it may be thrown off
|
// rough approximation of the amount of executed ticks in the system, it may be thrown off
|
||||||
// if not all cores are doing a similar amount of work. Instead of doing this, we should
|
// if not all cores are doing a similar amount of work. Instead of doing this, we should
|
||||||
|
|
@ -160,13 +159,12 @@ void DynarmicCallbacks64::AddTicks(u64 ticks) {
|
||||||
u64 amortized_ticks = ticks / Core::Hardware::NUM_CPU_CORES;
|
u64 amortized_ticks = ticks / Core::Hardware::NUM_CPU_CORES;
|
||||||
// Always execute at least one tick.
|
// Always execute at least one tick.
|
||||||
amortized_ticks = std::max<u64>(amortized_ticks, 1);
|
amortized_ticks = std::max<u64>(amortized_ticks, 1);
|
||||||
|
|
||||||
m_parent.m_system.CoreTiming().AddTicks(amortized_ticks);
|
m_parent.m_system.CoreTiming().AddTicks(amortized_ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 DynarmicCallbacks64::GetTicksRemaining() {
|
u64 DynarmicCallbacks64::GetTicksRemaining() {
|
||||||
ASSERT(!m_parent.m_uses_wall_clock && "Dynarmic ticking disabled");
|
ASSERT(!m_parent.m_uses_wall_clock && "Dynarmic ticking disabled");
|
||||||
return std::max<s64>(m_parent.m_system.CoreTiming().GetDowncount(), 0);
|
return std::max<s64>(m_parent.m_system.CoreTiming().downcount, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 DynarmicCallbacks64::GetCNTPCT() {
|
u64 DynarmicCallbacks64::GetCNTPCT() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue