mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Hexagon (target/hexagon) Move new_pred_value to DisasContext
The new_pred_value array in the CPUHexagonState is only used for bookkeeping within the translation of a packet. With recent changes that eliminate the need to free TCGv variables, these make more sense to be transient and kept in DisasContext. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230427230012.3800327-19-tsimpson@quicinc.com>
This commit is contained in:
parent
4ff5676474
commit
e22edc7c1d
8 changed files with 23 additions and 24 deletions
|
@ -121,7 +121,11 @@ static void gen_log_reg_write_pair(DisasContext *ctx, int rnum, TCGv_i64 val)
|
|||
TCGv get_result_pred(DisasContext *ctx, int pnum)
|
||||
{
|
||||
if (ctx->need_commit) {
|
||||
return hex_new_pred_value[pnum];
|
||||
if (ctx->new_pred_value[pnum] == NULL) {
|
||||
ctx->new_pred_value[pnum] = tcg_temp_new();
|
||||
tcg_gen_movi_tl(ctx->new_pred_value[pnum], 0);
|
||||
}
|
||||
return ctx->new_pred_value[pnum];
|
||||
} else {
|
||||
return hex_pred[pnum];
|
||||
}
|
||||
|
@ -607,7 +611,7 @@ static void gen_cmpnd_cmp_jmp(DisasContext *ctx,
|
|||
gen_log_pred_write(ctx, pnum, pred);
|
||||
} else {
|
||||
TCGv pred = tcg_temp_new();
|
||||
tcg_gen_mov_tl(pred, hex_new_pred_value[pnum]);
|
||||
tcg_gen_mov_tl(pred, ctx->new_pred_value[pnum]);
|
||||
gen_cond_jump(ctx, cond2, pred, pc_off);
|
||||
}
|
||||
}
|
||||
|
@ -664,7 +668,7 @@ static void gen_cmpnd_tstbit0_jmp(DisasContext *ctx,
|
|||
gen_log_pred_write(ctx, pnum, pred);
|
||||
} else {
|
||||
TCGv pred = tcg_temp_new();
|
||||
tcg_gen_mov_tl(pred, hex_new_pred_value[pnum]);
|
||||
tcg_gen_mov_tl(pred, ctx->new_pred_value[pnum]);
|
||||
gen_cond_jump(ctx, cond, pred, pc_off);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue