qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 13/16] tcg: Use temp_idx


From: Richard Henderson
Subject: [Qemu-devel] [RFC 13/16] tcg: Use temp_idx
Date: Thu, 19 Sep 2013 14:25:05 -0700

Signed-off-by: Richard Henderson <address@hidden>
---
 tcg/tcg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index a69186a..3591491 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -808,7 +808,7 @@ static void tcg_reg_alloc_start(TCGContext *s)
 static char *tcg_get_arg_str_ptr(TCGContext *s, char *buf, int buf_size,
                                  TCGTemp *ts)
 {
-    int idx = ts - s->temps;
+    int idx = temp_idx(s, ts);
 
     if (idx < s->nb_globals) {
         pstrcpy(buf, buf_size, ts->name);
@@ -1593,7 +1593,7 @@ static inline void tcg_reg_sync(TCGContext *s, TCGReg reg)
     assert(ts->val_type == TEMP_VAL_REG);
     if (!ts->mem_coherent && !ts->fixed_reg) {
         if (!ts->mem_allocated) {
-            temp_allocate_frame(s, ts - s->temps);
+            temp_allocate_frame(s, temp_idx(s, ts));
         }
         tcg_out_st(s, ts->type, reg, ts->mem_base->reg, ts->mem_offset);
     }
@@ -1673,7 +1673,7 @@ static void temp_load(TCGContext *s, TCGTemp *ts, 
TCGRegSet desired_regs,
 /* mark a temporary as dead. */
 static inline void temp_dead(TCGContext *s, TCGTemp *ts)
 {
-    int idx = ts - s->temps;
+    int idx = temp_idx(s, ts);
     if (ts->fixed_reg) {
         return;
     }
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]