qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH for-2.4] tcg: mark temps as mem_coherent=0 for mov w


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH for-2.4] tcg: mark temps as mem_coherent=0 for mov with a constant
Date: Mon, 27 Jul 2015 07:20:40 +0200

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 <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]