CPU/Recompiler: Use MAP_JIT for code space on Apple Silicon
This commit is contained in:
parent
663dc496bf
commit
5bbbb8d3d5
3 changed files with 63 additions and 6 deletions
|
|
@ -29,6 +29,13 @@ public:
|
|||
/// Flushes the instruction cache on the host for the specified range.
|
||||
static void FlushInstructionCache(void* address, u32 size);
|
||||
|
||||
/// For Apple Silicon - Toggles write protection on the JIT space.
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
static void WriteProtect(bool enabled);
|
||||
#else
|
||||
ALWAYS_INLINE static void WriteProtect(bool enabled) {}
|
||||
#endif
|
||||
|
||||
private:
|
||||
u8* m_code_ptr = nullptr;
|
||||
u8* m_free_code_ptr = nullptr;
|
||||
|
|
@ -45,4 +52,3 @@ private:
|
|||
u32 m_old_protection = 0;
|
||||
bool m_owns_buffer = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue