No longer need SPRR and probe it runtime

This commit is contained in:
2024-12-07 23:33:34 +08:00
parent b7199261b5
commit 958ed09153
4 changed files with 74 additions and 24 deletions

View File

@@ -2172,7 +2172,7 @@ void tcg_flush_softmmu_tlb(struct uc_struct *uc)
}
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && defined(HAVE_SPRR) && (defined(__arm__) || defined(__aarch64__))
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
static bool tb_exec_is_locked(struct uc_struct *uc)
{
return uc->current_executable;
@@ -2180,13 +2180,11 @@ static bool tb_exec_is_locked(struct uc_struct *uc)
static void tb_exec_change(struct uc_struct *uc, bool executable)
{
assert(uc->current_executable == thread_executable());
assert_executable(uc->current_executable);
if (uc->current_executable != executable) {
jit_write_protect(executable);
uc->current_executable = executable;
assert(
executable == thread_executable()
);
assert_executable(executable);
}
}
#else /* not needed on non-Darwin platforms */