Fix building on Apple Sillicon

This commit is contained in:
2023-08-03 13:17:26 +08:00
parent 6074150ebe
commit 6e97e59f54
3 changed files with 12 additions and 3 deletions

View File

@@ -37,7 +37,9 @@ void cpu_reloading_memory_map(void)
void cpu_loop_exit(CPUState *cpu)
{
/* Unlock JIT write protect if applicable. */
tb_exec_unlock(cpu->uc->tcg_ctx);
if (cpu->uc->nested_level == 1) {
tb_exec_unlock(cpu->uc->tcg_ctx);
}
/* Undo the setting in cpu_tb_exec. */
cpu->can_do_io = 1;
siglongjmp(cpu->uc->jmp_bufs[cpu->uc->nested_level - 1], 1);