tcg: Change temp_allocate_frame arg to TCGTemp

Backports commit 2272e4a791b7e1a01ffac143616ba4ece9a5762d from qemu
This commit is contained in:
Richard Henderson 2018-03-05 07:51:38 -05:00 committed by Lioncash
parent 35a7a9c9a4
commit d104b792a6
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -2177,10 +2177,8 @@ static void check_regs(TCGContext *s)
} }
#endif #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) #if !(defined(__sparc__) && TCG_TARGET_REG_BITS == 64)
/* Sparc64 stack is accessed with offset of 2047 */ /* Sparc64 stack is accessed with offset of 2047 */
s->current_frame_offset = (s->current_frame_offset + s->current_frame_offset = (s->current_frame_offset +
@ -2233,7 +2231,7 @@ static void temp_sync(TCGContext *s, TCGTemp *ts,
} }
if (!ts->mem_coherent) { if (!ts->mem_coherent) {
if (!ts->mem_allocated) { if (!ts->mem_allocated) {
temp_allocate_frame(s, temp_idx(s, ts)); temp_allocate_frame(s, ts);
} }
switch (ts->val_type) { switch (ts->val_type) {
case TEMP_VAL_CONST: case TEMP_VAL_CONST:
@ -2462,7 +2460,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOp *op)
liveness analysis disabled). */ liveness analysis disabled). */
tcg_debug_assert(NEED_SYNC_ARG(0)); tcg_debug_assert(NEED_SYNC_ARG(0));
if (!ots->mem_allocated) { 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); tcg_out_st(s, otype, ts->reg, ots->mem_base->reg, ots->mem_offset);
if (IS_DEAD_ARG(1)) { if (IS_DEAD_ARG(1)) {