aboutsummaryrefslogtreecommitdiff
path: root/target-moxie/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-moxie/translate.c')
-rw-r--r--target-moxie/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-moxie/translate.c b/target-moxie/translate.c
index f84841efe2..6dedcb7a21 100644
--- a/target-moxie/translate.c
+++ b/target-moxie/translate.c
@@ -848,6 +848,11 @@ void gen_intermediate_code(CPUMoxieState *env, struct TranslationBlock *tb)
tcg_gen_movi_i32(cpu_pc, ctx.pc);
gen_helper_debug(cpu_env);
ctx.bstate = BS_EXCP;
+ /* The address covered by the breakpoint must be included in
+ [tb->pc, tb->pc + tb->size) in order to for it to be
+ properly cleared -- thus we increment the PC here so that
+ the logic setting tb->size below does the right thing. */
+ ctx.pc += 2;
goto done_generating;
}