mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-01 20:24:36 +01:00
a64_emit_x64: Fix stack misalignment on Windows for 128-bit exclusive writes
Discovered by @Subv. Includes a test to ensure this codepath is exercised on Windows.
This commit is contained in:
parent
04b4c8b0cf
commit
edd795e991
2 changed files with 41 additions and 2 deletions
|
|
@ -896,7 +896,7 @@ void A64EmitX64::EmitExclusiveWrite(A64EmitContext& ctx, IR::Inst* inst, size_t
|
|||
));
|
||||
break;
|
||||
case 128:
|
||||
code.sub(rsp, 8 + 16 + ABI_SHADOW_SPACE);
|
||||
code.sub(rsp, 16 + ABI_SHADOW_SPACE);
|
||||
code.lea(code.ABI_PARAM3, ptr[rsp + ABI_SHADOW_SPACE]);
|
||||
code.movaps(xword[code.ABI_PARAM3], xmm0);
|
||||
code.CallFunction(static_cast<u32(*)(A64::UserConfig&, u64, A64::Vector&)>(
|
||||
|
|
@ -906,7 +906,7 @@ void A64EmitX64::EmitExclusiveWrite(A64EmitContext& ctx, IR::Inst* inst, size_t
|
|||
}) ? 0 : 1;
|
||||
}
|
||||
));
|
||||
code.add(rsp, 8 + 16 + ABI_SHADOW_SPACE);
|
||||
code.add(rsp, 16 + ABI_SHADOW_SPACE);
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue