Skip to content

Commit 71c729a

Browse files
committed
Define HAVE_SPRR
1 parent 7012e45 commit 71c729a

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

qemu/accel/tcg/translate-all.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ void tcg_flush_softmmu_tlb(struct uc_struct *uc)
21712171
}
21722172

21732173

2174-
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
2174+
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && defined(HAVE_SPRR) && (defined(__arm__) || defined(__aarch64__))
21752175
static bool tb_exec_is_locked(struct uc_struct *uc)
21762176
{
21772177
return uc->current_executable;

qemu/configure

+7-2
Original file line numberDiff line numberDiff line change
@@ -2163,13 +2163,14 @@ int main() {
21632163
}
21642164
EOF
21652165
if ! compile_prog ""; then
2166+
have_sprr='no'
21662167
have_pthread_jit_protect='no'
21672168
else
21682169
$TMPE
21692170
if [ $? -eq 0 ]; then
2170-
have_pthread_jit_protect='yes'
2171+
have_sprr='yes'
21712172
else
2172-
have_pthread_jit_protect='no'
2173+
have_sprr='no'
21732174
fi
21742175
fi
21752176
fi
@@ -2553,6 +2554,10 @@ if test "$have_pthread_jit_protect" = "yes" ; then
25532554
echo "HAVE_PTHREAD_JIT_PROTECT=y" >> $config_host_mak
25542555
fi
25552556

2557+
if test "$have_sprr" = "yes" ; then
2558+
echo "HAVE_SPRR=y" >> $config_host_mak
2559+
fi
2560+
25562561
# Hold two types of flag:
25572562
# CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on
25582563
# a thread we have a handle to

qemu/include/tcg/tcg-apple-jit.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#ifndef TCG_APPLE_JIT_H
2626
#define TCG_APPLE_JIT_H
2727

28-
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
28+
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && defined(HAVE_SPRR) && (defined(__arm__) || defined(__aarch64__))
2929

3030
/* write protect enable = write disable */
3131
static inline void jit_write_protect(int enabled)

uc.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ static void clear_deleted_hooks(uc_engine *uc);
3535
static uc_err uc_snapshot(uc_engine *uc);
3636
static uc_err uc_restore_latest_snapshot(uc_engine *uc);
3737

38-
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
38+
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && \
39+
defined(HAVE_SPRR) && (defined(__arm__) || defined(__aarch64__))
3940
static void save_jit_state(uc_engine *uc)
4041
{
4142
if (!uc->nested) {

0 commit comments

Comments
 (0)