From patchwork Mon Jul 27 05:20:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 500207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D228D1402ED for ; Mon, 27 Jul 2015 15:21:12 +1000 (AEST) Received: from localhost ([::1]:51524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJaqa-0002DD-SS for incoming@patchwork.ozlabs.org; Mon, 27 Jul 2015 01:21:08 -0400 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 Received: from weber.rr44.fr ([2001:bc8:30d7:120:7e05:7ff:fe0d:f152]) by hall.aurel32.net with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZJaqA-00011L-HY; Mon, 27 Jul 2015 07:20:42 +0200 Received: from aurel32 by weber.rr44.fr with local (Exim 4.85) (envelope-from ) id 1ZJaq9-0003Xb-Ps; Mon, 27 Jul 2015 07:20:41 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Mon, 27 Jul 2015 07:20:40 +0200 Message-Id: <1437974440-13543-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 2.1.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:bc8:30d7:100::1 Cc: Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH for-2.4] tcg: mark temps as mem_coherent=0 for mov with a constant X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;