mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
tcg: Return bool success from tcg_out_mov
This patch merely changes the interface, aborting on all failures, of which there are currently none. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
c16f52b2c5
commit
78113e83e0
10 changed files with 31 additions and 16 deletions
14
tcg/tcg.c
14
tcg/tcg.c
|
@ -103,7 +103,7 @@ static const char *target_parse_constraint(TCGArgConstraint *ct,
|
|||
const char *ct_str, TCGType type);
|
||||
static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg1,
|
||||
intptr_t arg2);
|
||||
static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
|
||||
static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg);
|
||||
static void tcg_out_movi(TCGContext *s, TCGType type,
|
||||
TCGReg ret, tcg_target_long arg);
|
||||
static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args,
|
||||
|
@ -3367,7 +3367,9 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op)
|
|||
allocated_regs, preferred_regs,
|
||||
ots->indirect_base);
|
||||
}
|
||||
tcg_out_mov(s, otype, ots->reg, ts->reg);
|
||||
if (!tcg_out_mov(s, otype, ots->reg, ts->reg)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
ots->val_type = TEMP_VAL_REG;
|
||||
ots->mem_coherent = 0;
|
||||
|
@ -3467,7 +3469,9 @@ static void tcg_reg_alloc_op(TCGContext *s, const TCGOp *op)
|
|||
i_allocated_regs, 0);
|
||||
reg = tcg_reg_alloc(s, arg_ct->u.regs, i_allocated_regs,
|
||||
o_preferred_regs, ts->indirect_base);
|
||||
tcg_out_mov(s, ts->type, reg, ts->reg);
|
||||
if (!tcg_out_mov(s, ts->type, reg, ts->reg)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
new_args[i] = reg;
|
||||
const_args[i] = 0;
|
||||
|
@ -3626,7 +3630,9 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op)
|
|||
if (ts->val_type == TEMP_VAL_REG) {
|
||||
if (ts->reg != reg) {
|
||||
tcg_reg_free(s, reg, allocated_regs);
|
||||
tcg_out_mov(s, ts->type, reg, ts->reg);
|
||||
if (!tcg_out_mov(s, ts->type, reg, ts->reg)) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
TCGRegSet arg_set = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue