summaryrefslogtreecommitdiff
path: root/target/sparc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2018-05-30 18:06:23 -0700
committerRichard Henderson <richard.henderson@linaro.org>2018-06-01 15:15:27 -0700
commit07ea28b41830f946de3841b0ac61a3413679feb9 (patch)
tree42c4837f1a3f06b76291c9cf8412914d2c27c346 /target/sparc
parent392fba9f583223786f844dce9b2e7f9a0ce0147a (diff)
tcg: Pass tb and index to tcg_gen_exit_tb separately
Do the cast to uintptr_t within the helper, so that the compiler can type check the pointer argument. We can also do some more sanity checking of the index argument. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/sparc')
-rw-r--r--target/sparc/translate.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 40b2eaad39..f3d430c1b2 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -360,12 +360,12 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num,
tcg_gen_goto_tb(tb_num);
tcg_gen_movi_tl(cpu_pc, pc);
tcg_gen_movi_tl(cpu_npc, npc);
- tcg_gen_exit_tb((uintptr_t)s->base.tb + tb_num);
+ tcg_gen_exit_tb(s->base.tb, tb_num);
} else {
/* jump to another page: currently not optimized */
tcg_gen_movi_tl(cpu_pc, pc);
tcg_gen_movi_tl(cpu_npc, npc);
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
}
}
@@ -4329,7 +4329,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
/* End TB to notice changed ASI. */
save_state(dc);
gen_op_next_insn();
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
dc->base.is_jmp = DISAS_NORETURN;
break;
case 0x6: /* V9 wrfprs */
@@ -4338,7 +4338,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
dc->fprs_dirty = 0;
save_state(dc);
gen_op_next_insn();
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
dc->base.is_jmp = DISAS_NORETURN;
break;
case 0xf: /* V9 sir, nop if user */
@@ -4466,7 +4466,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
dc->cc_op = CC_OP_FLAGS;
save_state(dc);
gen_op_next_insn();
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
dc->base.is_jmp = DISAS_NORETURN;
#endif
}
@@ -4622,7 +4622,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
hpstate));
save_state(dc);
gen_op_next_insn();
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
dc->base.is_jmp = DISAS_NORETURN;
break;
case 1: // htstate
@@ -5793,7 +5793,7 @@ static bool sparc_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *cs,
save_state(dc);
}
gen_helper_debug(cpu_env);
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
dc->base.is_jmp = DISAS_NORETURN;
/* update pc_next so that the current instruction is included in tb->size */
dc->base.pc_next += 4;
@@ -5832,7 +5832,7 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
tcg_gen_movi_tl(cpu_pc, dc->pc);
}
save_npc(dc);
- tcg_gen_exit_tb(0);
+ tcg_gen_exit_tb(NULL, 0);
}
}
}