mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-22 23:07:56 -05:00
Core: Refactor ARM Interface.
This commit is contained in:
@ -63,8 +63,9 @@ static bool UnmappedMemoryHook(uc_engine* uc, uc_mem_type type, u64 addr, int si
|
||||
return false;
|
||||
}
|
||||
|
||||
ARM_Unicorn::ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture)
|
||||
: ARM_Interface{system, interrupt_handler} {
|
||||
ARM_Unicorn::ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture,
|
||||
std::size_t core_index)
|
||||
: ARM_Interface{system, interrupt_handler}, core_index{core_index} {
|
||||
const auto arch = architecture == Arch::AArch32 ? UC_ARCH_ARM : UC_ARCH_ARM64;
|
||||
CHECKED(uc_open(arch, UC_MODE_ARM, &uc));
|
||||
|
||||
@ -163,7 +164,7 @@ void ARM_Unicorn::Run() {
|
||||
ExecuteInstructions(std::max(4000000U, 0U));
|
||||
} else {
|
||||
while (true) {
|
||||
if (interrupt_handler.IsInterrupted()) {
|
||||
if (interrupt_handlers[core_index].IsInterrupted()) {
|
||||
return;
|
||||
}
|
||||
ExecuteInstructions(10);
|
||||
|
@ -11,7 +11,6 @@
|
||||
|
||||
namespace Core {
|
||||
|
||||
class CPUInterruptHandler;
|
||||
class System;
|
||||
|
||||
class ARM_Unicorn final : public ARM_Interface {
|
||||
@ -21,7 +20,8 @@ public:
|
||||
AArch64, // 64-bit ARM
|
||||
};
|
||||
|
||||
explicit ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture);
|
||||
explicit ARM_Unicorn(System& system, CPUInterruptHandler& interrupt_handler, Arch architecture,
|
||||
std::size_t core_index);
|
||||
~ARM_Unicorn() override;
|
||||
|
||||
void SetPC(u64 pc) override;
|
||||
@ -56,6 +56,7 @@ private:
|
||||
uc_engine* uc{};
|
||||
GDBStub::BreakpointAddress last_bkpt{};
|
||||
bool last_bkpt_hit = false;
|
||||
std::size_t core_index;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
Reference in New Issue
Block a user