summaryrefslogtreecommitdiffstats
path: root/target-unicore32/translate.c
diff options
context:
space:
mode:
authorRichard Henderson2015-10-14 00:07:49 +0200
committerRichard Henderson2015-10-28 18:57:16 +0100
commit522a0d4e3c0d397ffb45ec400d8cbd426dad9d17 (patch)
tree47bf23d369e201fe8e982097a5fdd5437f88bdfa /target-unicore32/translate.c
parentMerge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into st... (diff)
downloadqemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.tar.gz
qemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.tar.xz
qemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.zip
target-*: Advance pc after recognizing a breakpoint
Some targets already had this within their logic, but make sure it's present for all targets. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-unicore32/translate.c')
-rw-r--r--target-unicore32/translate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c
index 48f89fb1c5..d2f92f02fc 100644
--- a/target-unicore32/translate.c
+++ b/target-unicore32/translate.c
@@ -1917,9 +1917,11 @@ void gen_intermediate_code(CPUUniCore32State *env, TranslationBlock *tb)
gen_set_pc_im(dc->pc);
gen_exception(EXCP_DEBUG);
dc->is_jmp = DISAS_JUMP;
- /* Advance PC so that clearing the breakpoint will
- invalidate this TB. */
- dc->pc += 2; /* FIXME */
+ /* 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. */
+ dc->pc += 4;
goto done_generating;
}