tcg: Formalize tcg_out_br

Split these functions out from tcg_out_op.
Call it directly from tcg_gen_code.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-01-20 21:17:07 -08:00
parent e038696c92
commit 3752a5a5ba
11 changed files with 60 additions and 53 deletions

View file

@ -921,6 +921,11 @@ static const TCGOutOpBrcond outop_brcond = {
.out_rr = tgen_brcond,
};
void tcg_out_br(TCGContext *s, TCGLabel *l)
{
tgen_brcond(s, TCG_TYPE_I32, TCG_COND_EQ, TCG_REG_ZERO, TCG_REG_ZERO, l);
}
static int tcg_out_setcond2_int(TCGContext *s, TCGCond cond, TCGReg ret,
TCGReg al, TCGReg ah, TCGReg bl, TCGReg bh)
{
@ -2281,11 +2286,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, TCGType type,
tcg_out_nop(s);
}
break;
case INDEX_op_br:
tgen_brcond(s, TCG_TYPE_I32, TCG_COND_EQ,
TCG_REG_ZERO, TCG_REG_ZERO, arg_label(a0));
break;
case INDEX_op_ld8u_i32:
case INDEX_op_ld8u_i64:
i1 = OPC_LBU;