summaryrefslogtreecommitdiffstats
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson2018-11-28 00:39:21 +0100
committerRichard Henderson2018-12-25 20:57:34 +0100
commitba87719cd267e6f07b17f6cda08246bf483146d4 (patch)
treee9216d0da9124ad23484797ac0481b927e5827a4 /tcg
parenttcg: Add preferred_reg argument to temp_sync (diff)
downloadqemu-ba87719cd267e6f07b17f6cda08246bf483146d4.tar.gz
qemu-ba87719cd267e6f07b17f6cda08246bf483146d4.tar.xz
qemu-ba87719cd267e6f07b17f6cda08246bf483146d4.zip
tcg: Add preferred_reg argument to tcg_reg_alloc_do_movi
Pass this through to temp_sync. Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index fe060c481a..7844158a8a 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -3077,7 +3077,8 @@ static void tcg_reg_alloc_bb_end(TCGContext *s, TCGRegSet allocated_regs)
}
static void tcg_reg_alloc_do_movi(TCGContext *s, TCGTemp *ots,
- tcg_target_ulong val, TCGLifeData arg_life)
+ tcg_target_ulong val, TCGLifeData arg_life,
+ TCGRegSet preferred_regs)
{
if (ots->fixed_reg) {
/* For fixed registers, we do not do any constant propagation. */
@@ -3093,7 +3094,7 @@ static void tcg_reg_alloc_do_movi(TCGContext *s, TCGTemp *ots,
ots->val = val;
ots->mem_coherent = 0;
if (NEED_SYNC_ARG(0)) {
- temp_sync(s, ots, s->reserved_regs, 0, IS_DEAD_ARG(0));
+ temp_sync(s, ots, s->reserved_regs, preferred_regs, IS_DEAD_ARG(0));
} else if (IS_DEAD_ARG(0)) {
temp_dead(s, ots);
}
@@ -3104,7 +3105,7 @@ static void tcg_reg_alloc_movi(TCGContext *s, const TCGOp *op)
TCGTemp *ots = arg_temp(op->args[0]);
tcg_target_ulong val = op->args[1];
- tcg_reg_alloc_do_movi(s, ots, val, op->life);
+ tcg_reg_alloc_do_movi(s, ots, val, op->life, 0);
}
static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op)
@@ -3128,7 +3129,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op)
if (IS_DEAD_ARG(1)) {
temp_dead(s, ts);
}
- tcg_reg_alloc_do_movi(s, ots, val, arg_life);
+ tcg_reg_alloc_do_movi(s, ots, val, arg_life, 0);
return;
}