diff options
| author | 2018-07-30 23:46:07 -0400 | |
|---|---|---|
| committer | 2018-07-31 07:54:58 -0400 | |
| commit | 444a01afa6ed52df21a22b28e9efe949ce1a428c (patch) | |
| tree | 45811412810d414fd42ada416f7043dc465e8729 /src | |
| parent | Merge pull request #855 from bunnei/cubeb (diff) | |
| download | yuzu-444a01afa6ed52df21a22b28e9efe949ce1a428c.tar.gz yuzu-444a01afa6ed52df21a22b28e9efe949ce1a428c.tar.xz yuzu-444a01afa6ed52df21a22b28e9efe949ce1a428c.zip | |
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()
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/arm/dynarmic/arm_dynarmic.cpp | 8 |
1 files 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() { | |||
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | ARM_Dynarmic::ARM_Dynarmic(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, size_t core_index) | 141 | ARM_Dynarmic::ARM_Dynarmic(std::shared_ptr<ExclusiveMonitor> exclusive_monitor, size_t core_index) |
| 142 | : cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), | 142 | : cb(std::make_unique<ARM_Dynarmic_Callbacks>(*this)), core_index{core_index}, |
| 143 | jit(MakeJit()), exclusive_monitor{std::dynamic_pointer_cast<DynarmicExclusiveMonitor>( | 143 | exclusive_monitor{std::dynamic_pointer_cast<DynarmicExclusiveMonitor>(exclusive_monitor)} { |
| 144 | exclusive_monitor)}, | ||
| 145 | core_index{core_index} { | ||
| 146 | ARM_Interface::ThreadContext ctx; | 144 | ARM_Interface::ThreadContext ctx; |
| 147 | inner_unicorn.SaveContext(ctx); | 145 | inner_unicorn.SaveContext(ctx); |
| 148 | LoadContext(ctx); | ||
| 149 | PageTableChanged(); | 146 | PageTableChanged(); |
| 147 | LoadContext(ctx); | ||
| 150 | } | 148 | } |
| 151 | 149 | ||
| 152 | ARM_Dynarmic::~ARM_Dynarmic() = default; | 150 | ARM_Dynarmic::~ARM_Dynarmic() = default; |