From 536fc7f0ea77e08d68c760f387c307d258804e3b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 26 Nov 2019 14:10:49 -0500 Subject: core: Prepare various classes for memory read/write migration Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us. --- src/core/arm/dynarmic/arm_dynarmic.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/arm/dynarmic/arm_dynarmic.cpp') diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index a0705b2b8..2b396f1d6 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -28,6 +28,7 @@ public: explicit ARM_Dynarmic_Callbacks(ARM_Dynarmic& parent) : parent(parent) {} u8 MemoryRead8(u64 vaddr) override { + auto& s = parent.system; return Memory::Read8(vaddr); } u16 MemoryRead16(u64 vaddr) override { @@ -171,9 +172,10 @@ void ARM_Dynarmic::Step() { ARM_Dynarmic::ARM_Dynarmic(System& system, ExclusiveMonitor& exclusive_monitor, std::size_t core_index) - : cb(std::make_unique(*this)), inner_unicorn{system}, - core_index{core_index}, system{system}, - exclusive_monitor{dynamic_cast(exclusive_monitor)} {} + : ARM_Interface{system}, + cb(std::make_unique(*this)), inner_unicorn{system}, + core_index{core_index}, exclusive_monitor{ + dynamic_cast(exclusive_monitor)} {} ARM_Dynarmic::~ARM_Dynarmic() = default; -- cgit v1.2.3