macOS: Add support for Apple Silicon and usage of the MAP_JIT flag.
This commit is contained in:
parent
f63b06f5f6
commit
33da24d0e2
3 changed files with 22 additions and 0 deletions
9
src/pc.c
9
src/pc.c
|
|
@ -1,6 +1,9 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#include "ibm.h"
|
||||
#include "device.h"
|
||||
|
||||
|
|
@ -307,7 +310,13 @@ void initpc(int argc, char *argv[])
|
|||
loadbios();
|
||||
mem_add_bios();
|
||||
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
pthread_jit_write_protect_np(0);
|
||||
#endif
|
||||
codegen_init();
|
||||
#if defined(__APPLE__) && defined(__aarch64__)
|
||||
pthread_jit_write_protect_np(1);
|
||||
#endif
|
||||
|
||||
timer_reset();
|
||||
sound_reset();
|
||||
|
|
|
|||
Loading…
Reference in a new issue