diff mbox series

[v6,11/50] tcg: Change temp_allocate_frame arg to TCGTemp

Message ID 20171016172609.23422-12-richard.henderson@linaro.org
State Superseded
Headers show
Series tcg tb_lock removal | expand

Commit Message

Richard Henderson Oct. 16, 2017, 5:25 p.m. UTC
From: Richard Henderson <rth@twiddle.net>


Signed-off-by: Richard Henderson <rth@twiddle.net>

---
 tcg/tcg.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

-- 
2.13.6

Comments

Emilio Cota Oct. 17, 2017, 10:07 p.m. UTC | #1
On Mon, Oct 16, 2017 at 10:25:30 -0700, Richard Henderson wrote:
> From: Richard Henderson <rth@twiddle.net>

> 

> Signed-off-by: Richard Henderson <rth@twiddle.net>


Reviewed-by: Emilio G. Cota <cota@braap.org>


		E.
diff mbox series

Patch

diff --git a/tcg/tcg.c b/tcg/tcg.c
index bb342e06dd..163ec8b1c0 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2103,10 +2103,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 +
@@ -2159,7 +2157,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:
@@ -2389,7 +2387,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)) {