qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, aurelien@aurel32.net
Subject: [Qemu-devel] [RFC 09/16] tcg: Change temp_sync argument to TCGTemp
Date: Thu, 19 Sep 2013 14:25:01 -0700	[thread overview]
Message-ID: <1379625908-27964-10-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1379625908-27964-1-git-send-email-rth@twiddle.net>

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/tcg.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index ee11c94..0ca8dbe 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1664,10 +1664,8 @@ static inline void temp_dead(TCGContext *s, TCGTemp *ts)
 
 /* sync a temporary to memory. 'allocated_regs' is used in case a
    temporary registers needs to be allocated to store a constant. */
-static inline void temp_sync(TCGContext *s, int temp, TCGRegSet allocated_regs)
+static void temp_sync(TCGContext *s, TCGTemp *ts, TCGRegSet allocated_regs)
 {
-    TCGTemp *ts = &s->temps[temp];
-
     if (!ts->fixed_reg) {
         switch(ts->val_type) {
         case TEMP_VAL_CONST:
@@ -1701,7 +1699,7 @@ static inline void temp_save(TCGContext *s, int temp, TCGRegSet allocated_regs)
        in memory. Keep an assert for safety. */
     assert(ts->val_type == TEMP_VAL_MEM || ts->fixed_reg);
 #else
-    temp_sync(s, temp, allocated_regs);
+    temp_sync(s, ts, allocated_regs);
     temp_dead(s, ts);
 #endif
 }
@@ -1726,11 +1724,13 @@ static void sync_globals(TCGContext *s, TCGRegSet allocated_regs)
     int i;
 
     for (i = 0; i < s->nb_globals; i++) {
+        TCGTemp *ts = &s->temps[i];
 #ifdef USE_LIVENESS_ANALYSIS
-        assert(s->temps[i].val_type != TEMP_VAL_REG || s->temps[i].fixed_reg ||
-               s->temps[i].mem_coherent);
+        assert(ts->val_type != TEMP_VAL_REG
+               || ts->fixed_reg
+               || ts->mem_coherent);
 #else
-        temp_sync(s, i, allocated_regs);
+        temp_sync(s, ts, allocated_regs);
 #endif
     }
 }
@@ -1785,7 +1785,7 @@ static void tcg_reg_alloc_movi(TCGContext *s, const TCGArg *args,
         ots->val = val;
     }
     if (NEED_SYNC_ARG(0)) {
-        temp_sync(s, args[0], s->reserved_regs);
+        temp_sync(s, ots, s->reserved_regs);
     }
     if (IS_DEAD_ARG(0)) {
         temp_dead(s, ots);
-- 
1.8.1.4

  parent reply	other threads:[~2013-09-19 21:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 21:24 [Qemu-devel] [RFC 00/16] TCG indirect registers Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 01/16] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 02/16] tcg: Introduce TCGTempType Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 03/16] tcg: Change ts->mem_reg to ts->mem_base Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 04/16] tcg: Compress TCGLabelQemuLdst Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 05/16] tcg: More use of TCGReg where appropriate Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 06/16] tcg: Remove tcg_get_arg_str_i32/64 Richard Henderson
2013-09-19 21:24 ` [Qemu-devel] [RFC 07/16] tcg: Change reg_to_temp to TCGTemp pointer Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 08/16] tcg: Change temp_dead argument to TCGTemp Richard Henderson
2013-09-19 21:25 ` Richard Henderson [this message]
2013-09-19 21:25 ` [Qemu-devel] [RFC 10/16] tcg: Change temp_save " Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 11/16] tcg: Introduce temp_load Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 12/16] tcg: Tidy temporary allocation Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 13/16] tcg: Use temp_idx Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 14/16] tcg: Implement indirect memory registers Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 15/16] target-sparc: Tidy global register initialization Richard Henderson
2013-09-19 21:25 ` [Qemu-devel] [RFC 16/16] target-sparc: Use global registers for the register window Richard Henderson
2013-09-22 17:28 ` [Qemu-devel] [RFC 00/16] TCG indirect registers Max Filippov
2013-09-23 17:23 ` Blue Swirl
2013-09-23 18:06   ` Richard Henderson
2013-09-24 13:32     ` Artyom Tarasenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379625908-27964-10-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).