From patchwork Fri Oct 19 21:38:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3,09/26] tcg: start with local temps in TEMP_VAL_MEM state Date: Fri, 19 Oct 2012 11:38:58 -0000 From: Aurelien Jarno X-Patchwork-Id: 192860 Message-Id: <1350682755-31635-10-git-send-email-aurelien@aurel32.net> To: qemu-devel@nongnu.org Cc: Aurelien Jarno Start with local temps in TEMP_VAL_MEM state, to make possible a later check that all the temps are correctly saved back to memory. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/tcg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index d81b628..8333667 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -776,7 +776,11 @@ static void tcg_reg_alloc_start(TCGContext *s) } for(i = s->nb_globals; i < s->nb_temps; i++) { ts = &s->temps[i]; - ts->val_type = TEMP_VAL_DEAD; + if (ts->temp_local) { + ts->val_type = TEMP_VAL_MEM; + } else { + ts->val_type = TEMP_VAL_DEAD; + } ts->mem_allocated = 0; ts->fixed_reg = 0; }