From 444a01afa6ed52df21a22b28e9efe949ce1a428c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 30 Jul 2018 23:46:07 -0400 Subject: [PATCH] arm_dynarmic: Correct initializer list order Amends the initializer list to be in the same order that each variable would be initialized in. We also do this to ensure we don't use a bogus uninitialized instance of the exclusive monitor within MakeJit() We can also remove the jit member from the initializer list as this is initialized by PageTableChanged() --- src/core/arm/dynarmic/arm_dynarmic.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/arm/dynarmic/arm_dynarmic.cpp b/src/core/arm/dynarmic/arm_dynarmic.cpp index 57b8634b9..343866251 100644 --- a/src/core/arm/dynarmic/arm_dynarmic.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic.cpp @@ -139,14 +139,12 @@ void ARM_Dynarmic::Step() { } ARM_Dynarmic::ARM_Dynarmic(std::shared_ptr exclusive_monitor, size_t core_index) - : cb(std::make_unique(*this)), - jit(MakeJit()), exclusive_monitor{std::dynamic_pointer_cast( - exclusive_monitor)}, - core_index{core_index} { + : cb(std::make_unique(*this)), core_index{core_index}, + exclusive_monitor{std::dynamic_pointer_cast(exclusive_monitor)} { ARM_Interface::ThreadContext ctx; inner_unicorn.SaveContext(ctx); - LoadContext(ctx); PageTableChanged(); + LoadContext(ctx); } ARM_Dynarmic::~ARM_Dynarmic() = default;