diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-05-01 23:20:43 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-05-13 11:18:13 +0200 |
commit | 0fc37a8b0cd79f532ef6b743c7f43496f7d2ce1e (patch) | |
tree | a004149d485891fc9314571db759ae3600ced4eb /target | |
parent | 47b9f4d5a4013938134ca678c338906e798a61d7 (diff) |
target/sh4: fix BS_STOP exit
When stopping the translation because the state has changed, goto_tb
should not be used as it might link TB with different flags.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target')
-rw-r--r-- | target/sh4/translate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 2e29936ad8..04bc18bf7c 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -1901,8 +1901,9 @@ void gen_intermediate_code(CPUSH4State * env, struct TranslationBlock *tb) } else { switch (ctx.bstate) { case BS_STOP: - /* gen_op_interrupt_restart(); */ - /* fall through */ + tcg_gen_movi_i32(cpu_pc, ctx.pc); + tcg_gen_exit_tb(0); + break; case BS_NONE: if (ctx.envflags) { gen_store_flags(ctx.envflags); |