aboutsummaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/translate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index a10ccb6e79..ac258a9deb 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3187,10 +3187,11 @@ cris_decoder(DisasContext *dc)
static void check_breakpoint(CPUState *env, DisasContext *dc)
{
- int j;
- if (env->nb_breakpoints > 0) {
- for(j = 0; j < env->nb_breakpoints; j++) {
- if (env->breakpoints[j] == dc->pc) {
+ CPUBreakpoint *bp;
+
+ if (unlikely(env->breakpoints)) {
+ for (bp = env->breakpoints; bp != NULL; bp = bp->next) {
+ if (bp->pc == dc->pc) {
cris_evaluate_flags (dc);
tcg_gen_movi_tl(env_pc, dc->pc);
t_gen_raise_exception(EXCP_DEBUG);