tcg: Rename TB_JMP_RESET_OFFSET_INVALID to TB_JMP_OFFSET_INVALID
This will shortly be used for more than reset. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
cf7d6b8e98
commit
3a50f424c9
|
@ -508,10 +508,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||||
tb->jmp_dest[1] = (uintptr_t)NULL;
|
tb->jmp_dest[1] = (uintptr_t)NULL;
|
||||||
|
|
||||||
/* init original jump addresses which have been set during tcg_gen_code() */
|
/* init original jump addresses which have been set during tcg_gen_code() */
|
||||||
if (tb->jmp_reset_offset[0] != TB_JMP_RESET_OFFSET_INVALID) {
|
if (tb->jmp_reset_offset[0] != TB_JMP_OFFSET_INVALID) {
|
||||||
tb_reset_jump(tb, 0);
|
tb_reset_jump(tb, 0);
|
||||||
}
|
}
|
||||||
if (tb->jmp_reset_offset[1] != TB_JMP_RESET_OFFSET_INVALID) {
|
if (tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) {
|
||||||
tb_reset_jump(tb, 1);
|
tb_reset_jump(tb, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -693,9 +693,9 @@ static gboolean tb_tree_stats_iter(gpointer key, gpointer value, gpointer data)
|
||||||
if (tb_page_addr1(tb) != -1) {
|
if (tb_page_addr1(tb) != -1) {
|
||||||
tst->cross_page++;
|
tst->cross_page++;
|
||||||
}
|
}
|
||||||
if (tb->jmp_reset_offset[0] != TB_JMP_RESET_OFFSET_INVALID) {
|
if (tb->jmp_reset_offset[0] != TB_JMP_OFFSET_INVALID) {
|
||||||
tst->direct_jmp_count++;
|
tst->direct_jmp_count++;
|
||||||
if (tb->jmp_reset_offset[1] != TB_JMP_RESET_OFFSET_INVALID) {
|
if (tb->jmp_reset_offset[1] != TB_JMP_OFFSET_INVALID) {
|
||||||
tst->direct_jmp2_count++;
|
tst->direct_jmp2_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -585,8 +585,8 @@ struct TranslationBlock {
|
||||||
* setting one of the jump targets (or patching the jump instruction). Only
|
* setting one of the jump targets (or patching the jump instruction). Only
|
||||||
* two of such jumps are supported.
|
* two of such jumps are supported.
|
||||||
*/
|
*/
|
||||||
|
#define TB_JMP_OFFSET_INVALID 0xffff /* indicates no jump generated */
|
||||||
uint16_t jmp_reset_offset[2]; /* offset of original jump target */
|
uint16_t jmp_reset_offset[2]; /* offset of original jump target */
|
||||||
#define TB_JMP_RESET_OFFSET_INVALID 0xffff /* indicates no jump generated */
|
|
||||||
uintptr_t jmp_target_arg[2]; /* target address or offset */
|
uintptr_t jmp_target_arg[2]; /* target address or offset */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4666,8 +4666,8 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, target_ulong pc_start)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize goto_tb jump offsets. */
|
/* Initialize goto_tb jump offsets. */
|
||||||
tb->jmp_reset_offset[0] = TB_JMP_RESET_OFFSET_INVALID;
|
tb->jmp_reset_offset[0] = TB_JMP_OFFSET_INVALID;
|
||||||
tb->jmp_reset_offset[1] = TB_JMP_RESET_OFFSET_INVALID;
|
tb->jmp_reset_offset[1] = TB_JMP_OFFSET_INVALID;
|
||||||
tcg_ctx->tb_jmp_reset_offset = tb->jmp_reset_offset;
|
tcg_ctx->tb_jmp_reset_offset = tb->jmp_reset_offset;
|
||||||
if (TCG_TARGET_HAS_direct_jump) {
|
if (TCG_TARGET_HAS_direct_jump) {
|
||||||
tcg_ctx->tb_jmp_insn_offset = tb->jmp_target_arg;
|
tcg_ctx->tb_jmp_insn_offset = tb->jmp_target_arg;
|
||||||
|
|
Loading…
Reference in New Issue