tcg: mark temps as mem_coherent=0 for mov with a constant
PATCH 1/1 tcg: mark temps as mem_coherent=0 for mov with a constant
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 <[email protected]>
Signed-off-by Aurelien Jarno <[email protected]>
--- 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.
tcg/tcg.c +1 -0
@@ -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 ;
Signature · 1 line
2.1.4