From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJaqL-0001tD-Oy for qemu-devel@nongnu.org; Mon, 27 Jul 2015 01:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJaqK-0005vM-OP for qemu-devel@nongnu.org; Mon, 27 Jul 2015 01:20:53 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:41121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJaqK-0005pk-Hx for qemu-devel@nongnu.org; Mon, 27 Jul 2015 01:20:52 -0400 From: Aurelien Jarno Date: Mon, 27 Jul 2015 07:20:40 +0200 Message-Id: <1437974440-13543-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH for-2.4] tcg: mark temps as mem_coherent=0 for mov with a constant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Richard Henderson When a constant has to be loaded in a mov op, we fail to assign mem_coherent = 0. This patch fixes that. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) I found this issue by review. I haven't been able to trigger it with the x86 backend, but I wouldn't be surprised if we can trigger it with other backends, so better fix it for 2.4. diff --git a/tcg/tcg.c b/tcg/tcg.c index 9a2508b..0892a9b 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1894,6 +1894,7 @@ static void tcg_reg_alloc_mov(TCGContext *s, const TCGOpDef *def, ts->mem_coherent = 1; } else if (ts->val_type == TEMP_VAL_CONST) { tcg_out_movi(s, itype, ts->reg, ts->val); + ts->mem_coherent = 0; } s->reg_to_temp[ts->reg] = args[1]; ts->val_type = TEMP_VAL_REG; -- 2.1.4