mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-18 21:50:06 +00:00
arm/dynarmic: Initial implementation for instruction tick counts
This commit is contained in:
parent
2238e6c3ef
commit
f298278f37
@ -492,6 +492,8 @@ if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
|||||||
arm/dynarmic/arm_dynarmic_cp15.h
|
arm/dynarmic/arm_dynarmic_cp15.h
|
||||||
arm/dynarmic/arm_exclusive_monitor.cpp
|
arm/dynarmic/arm_exclusive_monitor.cpp
|
||||||
arm/dynarmic/arm_exclusive_monitor.h
|
arm/dynarmic/arm_exclusive_monitor.h
|
||||||
|
arm/dynarmic/arm_tick_counts.cpp
|
||||||
|
arm/dynarmic/arm_tick_counts.h
|
||||||
)
|
)
|
||||||
target_link_libraries(core PRIVATE dynarmic)
|
target_link_libraries(core PRIVATE dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "core/arm/dynarmic/arm_dynarmic.h"
|
#include "core/arm/dynarmic/arm_dynarmic.h"
|
||||||
#include "core/arm/dynarmic/arm_dynarmic_cp15.h"
|
#include "core/arm/dynarmic/arm_dynarmic_cp15.h"
|
||||||
#include "core/arm/dynarmic/arm_exclusive_monitor.h"
|
#include "core/arm/dynarmic/arm_exclusive_monitor.h"
|
||||||
|
#include "core/arm/dynarmic/arm_tick_counts.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "core/core_timing.h"
|
#include "core/core_timing.h"
|
||||||
#include "core/gdbstub/gdbstub.h"
|
#include "core/gdbstub/gdbstub.h"
|
||||||
@ -161,6 +162,9 @@ public:
|
|||||||
s64 ticks = parent.GetTimer().GetDowncount();
|
s64 ticks = parent.GetTimer().GetDowncount();
|
||||||
return static_cast<u64>(ticks <= 0 ? 0 : ticks);
|
return static_cast<u64>(ticks <= 0 ? 0 : ticks);
|
||||||
}
|
}
|
||||||
|
std::uint64_t GetTicksForCode(bool is_thumb, VAddr, std::uint32_t instruction) override {
|
||||||
|
return Core::TicksForInstruction(is_thumb, instruction);
|
||||||
|
}
|
||||||
|
|
||||||
ARM_Dynarmic& parent;
|
ARM_Dynarmic& parent;
|
||||||
Kernel::SVCContext svc_context;
|
Kernel::SVCContext svc_context;
|
||||||
|
16
src/core/arm/dynarmic/arm_tick_counts.cpp
Normal file
16
src/core/arm/dynarmic/arm_tick_counts.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2022 Citra Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
#include "core/arm/dynarmic/arm_tick_counts.h"
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
|
||||||
|
u64 TicksForInstruction(bool is_thumb, u32 instruction) {
|
||||||
|
(void)is_thumb;
|
||||||
|
(void)instruction;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Core
|
13
src/core/arm/dynarmic/arm_tick_counts.h
Normal file
13
src/core/arm/dynarmic/arm_tick_counts.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// Copyright 2022 Citra Emulator Project
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/common_types.h"
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
|
||||||
|
u64 TicksForInstruction(bool is_thumb, u32 instruction);
|
||||||
|
|
||||||
|
} // namespace Core
|
Loading…
Reference in New Issue
Block a user