qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net, peter.maydell@linaro.org
Subject: [Qemu-devel] [RFC 07/14] tcg: Change temp_allocate_frame arg to TCGTemp
Date: Wed, 16 Nov 2016 20:51:43 +0100	[thread overview]
Message-ID: <1479325910-9060-8-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1479325910-9060-1-git-send-email-rth@twiddle.net>

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

diff --git a/tcg/tcg.c b/tcg/tcg.c
index 4bcdb1e..c9e0da5 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1865,10 +1865,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 +
@@ -1921,7 +1919,7 @@ static void temp_sync(TCGContext *s, TCGTemp *ts,
     }
     if (!ts->mem_coherent) {
         if (!ts->mem_allocated) {
-            temp_allocate_frame(s, temp_idx(ts));
+            temp_allocate_frame(s, ts);
         }
         switch (ts->val_type) {
         case TEMP_VAL_CONST:
@@ -2152,7 +2150,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def,
            liveness analysis disabled). */
         tcg_debug_assert(NEED_SYNC_ARG(0));
         if (!ots->mem_allocated) {
-            temp_allocate_frame(s, 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)) {
-- 
2.7.4

  parent reply	other threads:[~2016-11-16 19:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 19:51 [Qemu-devel] [RFC 00/14] tcg: Use TCGTemp pointers instead of indices Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 01/14] tcg: Use NULL for TCGV_UNUSED_* Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 02/14] tcg: Define actual structures for TCGv_* Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 03/14] tcg: Use per-temp state data in liveness Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 04/14] tcg: Add temp_global bit to TCGTemp Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 05/14] tcg: Avoid loops against variable bounds Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 06/14] tcg: More use of arg_temp Richard Henderson
2016-11-16 19:51 ` Richard Henderson [this message]
2016-11-16 19:51 ` [Qemu-devel] [RFC 08/14] tcg: Remove unused TCG_CALL_DUMMY_TCGV Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 09/14] tcg: More use of arg_index Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 10/14] tcg: Map TCG_CALL_DUMMY_ARG to NULL Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 11/14] tcg: Introduce temp_info for the optimize pass Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 12/14] tcg: Store pointers to temporaries directly in TCGArg Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 13/14] tcg: Use temp number 0 again Richard Henderson
2016-11-16 19:51 ` [Qemu-devel] [RFC 14/14] tcg/optimize: Fold movcond 0/1 into setcond Richard Henderson

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=1479325910-9060-8-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=peter.maydell@linaro.org \
    --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).