From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THIqq-0007ng-CV for qemu-devel@nongnu.org; Thu, 27 Sep 2012 14:30:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THIqo-0002fF-PX for qemu-devel@nongnu.org; Thu, 27 Sep 2012 14:30:20 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:52222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THIqo-0002ec-Eu for qemu-devel@nongnu.org; Thu, 27 Sep 2012 14:30:18 -0400 Received: by pbbrp2 with SMTP id rp2so3988325pbb.4 for ; Thu, 27 Sep 2012 11:30:17 -0700 (PDT) Sender: Richard Henderson Message-ID: <50649B36.7030209@twiddle.net> Date: Thu, 27 Sep 2012 11:30:14 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1348766113-18373-1-git-send-email-aurelien@aurel32.net> <1348766113-18373-4-git-send-email-aurelien@aurel32.net> In-Reply-To: <1348766113-18373-4-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/13] tcg: add temp_sync() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 09/27/2012 10:15 AM, Aurelien Jarno wrote: > Add a new function temp_sync() to synchronize the canonical location > of a temp with the value in the corresponding register, but without > freeing the associated register. Rewrite temp_save() to call > temp_sync() followed by temp_dead(). > > Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson > case TEMP_VAL_REG: > + tcg_reg_sync(s, ts->reg); > break; > case TEMP_VAL_CONST: > + ts->reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], > + allocated_regs); > + ts->val_type = TEMP_VAL_REG; > + s->reg_to_temp[ts->reg] = temp; > + ts->mem_coherent = 0; > + tcg_out_movi(s, ts->type, ts->reg, ts->val); > + tcg_reg_sync(s, ts->reg); > break; Fallthru from TEMP_VAL_CONST into TEMP_VAL_REG? r~