Fix issue with iOS JIT block linking, see #8122

This commit is contained in:
Henrik Rydgård 2016-08-29 17:32:46 +02:00
parent d31d268962
commit 22b6988424
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}
}

View file

@ -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);
}
}