From 6c78f29a2424622bfc9c30dfbbc13404481eacb6 Mon Sep 17 00:00:00 2001 From: Juergen Lock Date: Thu, 3 Oct 2013 16:09:37 +0200 Subject: cpu-exec: Also reload CPUClass *cc after longjmp return in cpu_exec() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Juergen Lock Signed-off-by: Andreas Färber --- cpu-exec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpu-exec.c') 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(;;) */ -- cgit v1.2.1