SH4: fix single-stepping
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 12 Oct 2008 23:32:48 +0000 (23:32 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 12 Oct 2008 23:32:48 +0000 (23:32 +0000)
* target-sh/translate.c (gen_intermediate_code_internal): If
  singlestep is enabled, update PC before stopping.

(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5472 c046a42c-6fe2-441c-8c8c-71466251a162

target-sh4/translate.c

index ced761f2a558f7f028bd9f333a8d2fbc4d79c00f..4972450dbe5f872ebb2d59c0f8cb8e806bd6823b 100644 (file)
@@ -1867,6 +1867,7 @@ gen_intermediate_code_internal(CPUState * env, TranslationBlock * tb,
     if (tb->cflags & CF_LAST_IO)
         gen_io_end();
     if (env->singlestep_enabled) {
+        tcg_gen_movi_i32(cpu_pc, ctx.pc);
         tcg_gen_helper_0_0(helper_debug);
     } else {
        switch (ctx.bstate) {