aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authorJuergen Lock <qemu-l@jelal.kn-bremen.de>2013-10-03 16:09:37 +0200
committerAndreas Färber <afaerber@suse.de>2013-10-07 11:46:58 +0200
commit6c78f29a2424622bfc9c30dfbbc13404481eacb6 (patch)
treea7bdd2672e255d594af37e926ae197f49877cf09 /cpu-exec.c
parentf8e6a11aecc96e9d8a84f17d7c07019471714e20 (diff)
downloadqemu-arm-6c78f29a2424622bfc9c30dfbbc13404481eacb6.tar.gz
cpu-exec: Also reload CPUClass *cc after longjmp return in cpu_exec()
Local variable CPUClass *cc needs to be reloaded after return from longjmp, too. (This fixes a mips-softmmu crash observed on FreeBSD when QEMU is built with clang.) Reported-by: Dimitry Andric <dim@FreeBSD.org> Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 5a4399509e..30cfa2a63a 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -681,6 +681,10 @@ int cpu_exec(CPUArchState *env)
* local variables as longjmp is marked 'noreturn'. */
cpu = current_cpu;
env = cpu->env_ptr;
+#if !(defined(CONFIG_USER_ONLY) && \
+ (defined(TARGET_M68K) || defined(TARGET_PPC) || defined(TARGET_S390X)))
+ cc = CPU_GET_CLASS(cpu);
+#endif
}
} /* for(;;) */