Skip to content

Commit 52d9ddc

Browse files
authored
Merge pull request #1956 from wheremyfoodat/jit-fixes
a64 JIT: Fix `setRWX` returning nothing on Apple
2 parents 4e846d8 + 4dd0442 commit 52d9ddc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/core/DynaRec_aa64/emitter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class Emitter : public MacroAssembler {
7171
return VirtualProtect(s_codeCache, allocSize, PAGE_EXECUTE_READWRITE, &oldProtect) != 0;
7272
#elif !defined(__APPLE__)
7373
return mprotect(s_codeCache, allocSize, PROT_READ | PROT_WRITE | PROT_EXEC) != -1;
74+
#else
75+
return false;
7476
#endif
7577
}
7678

src/core/DynaRec_aa64/recompiler.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ bool DynaRecCPU::Init() {
6767
PCSX::g_system->message("[Dynarec] Failed to allocate executable memory.\nTry disabling the Dynarec CPU.");
6868
return false;
6969
}
70-
#endif
71-
#if defined(__APPLE__)
70+
#else
7271
gen.setRW(); // M1 wants buffer marked as readable/writable with mprotect before emitting code
7372
#endif
7473
emitDispatcher(); // Emit our assembly dispatcher

0 commit comments

Comments
 (0)