mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
tcg: Copy TCGOP_TYPE in tcg_op_insert_{after,before}
Simplify use within the optimizers by defaulting the new opcode to the same type as the old opcode. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
efefb9cb89
commit
fb744ece3a
1 changed files with 4 additions and 0 deletions
|
@ -3249,6 +3249,8 @@ TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op,
|
|||
TCGOpcode opc, unsigned nargs)
|
||||
{
|
||||
TCGOp *new_op = tcg_op_alloc(opc, nargs);
|
||||
|
||||
TCGOP_TYPE(new_op) = TCGOP_TYPE(old_op);
|
||||
QTAILQ_INSERT_BEFORE(old_op, new_op, link);
|
||||
return new_op;
|
||||
}
|
||||
|
@ -3257,6 +3259,8 @@ TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op,
|
|||
TCGOpcode opc, unsigned nargs)
|
||||
{
|
||||
TCGOp *new_op = tcg_op_alloc(opc, nargs);
|
||||
|
||||
TCGOP_TYPE(new_op) = TCGOP_TYPE(old_op);
|
||||
QTAILQ_INSERT_AFTER(&s->ops, old_op, new_op, link);
|
||||
return new_op;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue