summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-arm/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 5ce7350..345a61c 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -181,6 +181,15 @@ static void arm_cpu_reset(CPUState *s)
set_float_detect_tininess(float_tininess_before_rounding,
&env->vfp.standard_fp_status);
tlb_flush(s, 1);
+ /* Reset is a state change for some CPUARMState fields which we
+ * bake assumptions about into translated code, so we need to
+ * tb_flush().
+ */
+#if !defined(CONFIG_USER_ONLY)
+ /* XXX hack alert! automoc4 segfaults after spawning a new thread with
+ * this flush enabled */
+ tb_flush(env);
+#endif
#ifndef CONFIG_USER_ONLY
if (kvm_enabled()) {