diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2017-07-17 13:36:07 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-17 13:36:07 +0100 |
commit | e8d5230221851e8933811f1579fd13371f576955 (patch) | |
tree | 988d1a69b455dcc4bb4b4fa8b1130a486f3afdfb /target | |
parent | df0311e634828fdc99ca59352aef68503d631aad (diff) | |
download | qemu-e8d5230221851e8933811f1579fd13371f576955.zip qemu-e8d5230221851e8933811f1579fd13371f576955.tar.gz qemu-e8d5230221851e8933811f1579fd13371f576955.tar.bz2 |
target/arm/translate: make DISAS_UPDATE match declared semantics
DISAS_UPDATE should be used when the wider CPU state other than just
the PC has been updated and we should therefore exit the TCG runtime
and return to the main execution loop rather assuming DISAS_JUMP would
do that.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-id: 20170713141928.25419-3-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/translate-a64.c | 14 | ||||
-rw-r--r-- | target/arm/translate.c | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e55547d..66139b6 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -11364,16 +11364,9 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb) case DISAS_NEXT: gen_goto_tb(dc, 1, dc->pc); break; - default: - case DISAS_UPDATE: - gen_a64_set_pc_im(dc->pc); - /* fall through */ case DISAS_JUMP: tcg_gen_lookup_and_goto_ptr(cpu_pc); break; - case DISAS_EXIT: - tcg_gen_exit_tb(0); - break; case DISAS_TB_JUMP: case DISAS_EXC: case DISAS_SWI: @@ -11397,6 +11390,13 @@ void gen_intermediate_code_a64(ARMCPU *cpu, TranslationBlock *tb) */ tcg_gen_exit_tb(0); break; + case DISAS_UPDATE: + gen_a64_set_pc_im(dc->pc); + /* fall through */ + case DISAS_EXIT: + default: + tcg_gen_exit_tb(0); + break; } } diff --git a/target/arm/translate.c b/target/arm/translate.c index 0862f9e..5f2cea8 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -12095,12 +12095,12 @@ void gen_intermediate_code(CPUARMState *env, TranslationBlock *tb) case DISAS_NEXT: gen_goto_tb(dc, 1, dc->pc); break; - case DISAS_UPDATE: - gen_set_pc_im(dc, dc->pc); - /* fall through */ case DISAS_JUMP: gen_goto_ptr(); break; + case DISAS_UPDATE: + gen_set_pc_im(dc, dc->pc); + /* fall through */ default: /* indicate that the hash table must be used to find the next TB */ tcg_gen_exit_tb(0); |