tcg/tci: Split out tcg_out_op_v

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2021-02-01 09:20:19 -10:00
parent 6f00d7af75
commit 87713c04d1

View File

@ -317,6 +317,15 @@ static void tcg_out_op_p(TCGContext *s, TCGOpcode op, void *p0)
old_code_ptr[1] = s->code_ptr - old_code_ptr;
}
static void tcg_out_op_v(TCGContext *s, TCGOpcode op)
{
uint8_t *old_code_ptr = s->code_ptr;
tcg_out_op_t(s, op);
old_code_ptr[1] = s->code_ptr - old_code_ptr;
}
static void tcg_out_op_rr(TCGContext *s, TCGOpcode op, TCGReg r0, TCGReg r1)
{
uint8_t *old_code_ptr = s->code_ptr;
@ -587,8 +596,6 @@ static inline void tcg_out_call(TCGContext *s, const tcg_insn_unit *arg)
static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
const int *const_args)
{
uint8_t *old_code_ptr = s->code_ptr;
switch (opc) {
case INDEX_op_exit_tb:
tcg_out_op_p(s, opc, (void *)args[0]);
@ -725,8 +732,7 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
break;
case INDEX_op_mb:
tcg_out_op_t(s, opc);
old_code_ptr[1] = s->code_ptr - old_code_ptr;
tcg_out_op_v(s, opc);
break;
case INDEX_op_mov_i32: /* Always emitted via tcg_out_mov. */