diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 1505ded211..dc005ed695 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -403,7 +403,7 @@ void ArmJit::Comp_RunBlock(MIPSOpcode op) void ArmJit::LinkBlock(u8 *exitPoint, const u8 *checkedEntry) { if (PlatformIsWXExclusive()) { - ProtectMemoryPages(checkedEntry, 32, MEM_PROT_READ | MEM_PROT_WRITE); + ProtectMemoryPages(exitPoint, 32, MEM_PROT_READ | MEM_PROT_WRITE); } ARMXEmitter emit(exitPoint); @@ -423,7 +423,7 @@ void ArmJit::LinkBlock(u8 *exitPoint, const u8 *checkedEntry) { } emit.FlushIcache(); if (PlatformIsWXExclusive()) { - ProtectMemoryPages(checkedEntry, 32, MEM_PROT_READ | MEM_PROT_EXEC); + ProtectMemoryPages(exitPoint, 32, MEM_PROT_READ | MEM_PROT_EXEC); } } diff --git a/Core/MIPS/ARM64/Arm64Jit.cpp b/Core/MIPS/ARM64/Arm64Jit.cpp index 723c9427af..1654fcded8 100644 --- a/Core/MIPS/ARM64/Arm64Jit.cpp +++ b/Core/MIPS/ARM64/Arm64Jit.cpp @@ -407,14 +407,14 @@ void Arm64Jit::Comp_RunBlock(MIPSOpcode op) { void Arm64Jit::LinkBlock(u8 *exitPoint, const u8 *checkedEntry) { if (PlatformIsWXExclusive()) { - ProtectMemoryPages(checkedEntry, 32, MEM_PROT_READ | MEM_PROT_WRITE); + ProtectMemoryPages(exitPoint, 32, MEM_PROT_READ | MEM_PROT_WRITE); } ARM64XEmitter emit(exitPoint); emit.B(checkedEntry); // TODO: Write stuff after. emit.FlushIcache(); if (PlatformIsWXExclusive()) { - ProtectMemoryPages(checkedEntry, 32, MEM_PROT_READ | MEM_PROT_EXEC); + ProtectMemoryPages(exitPoint, 32, MEM_PROT_READ | MEM_PROT_EXEC); } }