aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2016-11-09 15:25:09 +0100
committerRichard Henderson <richard.henderson@linaro.org>2017-10-24 21:44:52 +0200
commit2272e4a791b7e1a01ffac143616ba4ece9a5762d (patch)
tree047af2e29cf76a79b0fa3cae133e7977fc3c1888 /tcg
parentac3b88911ebc6fc841f28898ee8aed40839debe2 (diff)
tcg: Change temp_allocate_frame arg to TCGTemp
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/tcg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 840e65c0d4..c10e73babe 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2096,10 +2096,8 @@ static void check_regs(TCGContext *s)
}
#endif
-static void temp_allocate_frame(TCGContext *s, int temp)
+static void temp_allocate_frame(TCGContext *s, TCGTemp *ts)
{
- TCGTemp *ts;
- ts = &s->temps[temp];
#if !(defined(__sparc__) && TCG_TARGET_REG_BITS == 64)
/* Sparc64 stack is accessed with offset of 2047 */
s->current_frame_offset = (s->current_frame_offset +
@@ -2152,7 +2150,7 @@ static void temp_sync(TCGContext *s, TCGTemp *ts,
}
if (!ts->mem_coherent) {
if (!ts->mem_allocated) {
- temp_allocate_frame(s, temp_idx(s, ts));
+ temp_allocate_frame(s, ts);
}
switch (ts->val_type) {
case TEMP_VAL_CONST:
@@ -2382,7 +2380,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op)
liveness analysis disabled). */
tcg_debug_assert(NEED_SYNC_ARG(0));
if (!ots->mem_allocated) {
- temp_allocate_frame(s, op->args[0]);
+ temp_allocate_frame(s, ots);
}
tcg_out_st(s, otype, ts->reg, ots->mem_base->reg, ots->mem_offset);
if (IS_DEAD_ARG(1)) {