diff mbox

target-arm/helper.c: tb_flush() on CPU reset

Message ID 1328116984-18094-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Feb. 1, 2012, 5:23 p.m. UTC
Since target-arm has some CPUState fields for which we take the approach
of baking assumptions about them into translated code and then calling
tb_flush() when the fields change, we must also tb_flush on CPU reset,
because reset is a change of those fields.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/helper.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

andrzej zaborowski Feb. 17, 2012, 7:35 a.m. UTC | #1
On 1 February 2012 18:23, Peter Maydell <peter.maydell@linaro.org> wrote:
> Since target-arm has some CPUState fields for which we take the approach
> of baking assumptions about them into translated code and then calling
> tb_flush() when the fields change, we must also tb_flush on CPU reset,
> because reset is a change of those fields.

Thanks, applied this patch.

Cheers
diff mbox

Patch

diff --git a/target-arm/helper.c b/target-arm/helper.c
index ea4f35f..fb0c387 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -344,6 +344,11 @@  void cpu_reset(CPUARMState *env)
     set_float_detect_tininess(float_tininess_before_rounding,
                               &env->vfp.standard_fp_status);
     tlb_flush(env, 1);
+    /* Reset is a state change for some CPUState fields which we
+     * bake assumptions about into translated code, so we need to
+     * tb_flush().
+     */
+    tb_flush(env);
 }
 
 static int vfp_gdb_get_reg(CPUState *env, uint8_t *buf, int reg)