From 0fd32c5fa4a57738b0b390a597257b4be39a7a91 Mon Sep 17 00:00:00 2001 From: Merry Date: Mon, 28 Feb 2022 19:53:43 +0000 Subject: [PATCH] a64_emit_x64_memory: Fix bug in 128 bit exclusive write fallback --- src/dynarmic/backend/x64/a64_emit_x64_memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dynarmic/backend/x64/a64_emit_x64_memory.cpp b/src/dynarmic/backend/x64/a64_emit_x64_memory.cpp index 0b2b6977..2c0e50a5 100644 --- a/src/dynarmic/backend/x64/a64_emit_x64_memory.cpp +++ b/src/dynarmic/backend/x64/a64_emit_x64_memory.cpp @@ -167,7 +167,7 @@ void A64EmitX64::GenFastmemFallbacks() { code.align(); exclusive_write_fallbacks[std::make_tuple(128, vaddr_idx, value_idx)] = code.getCurr(); - ABI_PushCallerSaveRegistersAndAdjustStack(code); + ABI_PushCallerSaveRegistersAndAdjustStackExcept(code, HostLoc::RAX); if (value_idx != 1) { code.movaps(xmm1, Xbyak::Xmm{value_idx}); } @@ -183,7 +183,7 @@ void A64EmitX64::GenFastmemFallbacks() { code.mov(code.ABI_PARAM2, Xbyak::Reg64{vaddr_idx}); } code.call(memory_exclusive_write_128); - ABI_PopCallerSaveRegistersAndAdjustStack(code); + ABI_PopCallerSaveRegistersAndAdjustStackExcept(code, HostLoc::RAX); code.ret(); PerfMapRegister(exclusive_write_fallbacks[std::make_tuple(128, vaddr_idx, value_idx)], code.getCurr(), "a64_write_fallback_128");