From e273acf87ae2dc733bfaa6734d5b25b7005b50d9 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 10 Feb 2018 21:37:49 -0500 Subject: [PATCH] tcg/optimize: fix tcg_opt_gen_movi Due to a copy&paste, the new op value is tested against mov_i32 instead of movi_i32. The test is therefore always false. Fix that. Backports commit 961521261a3d600b0695b2e6d2b0f490076f7e90 from qemu --- qemu/tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/tcg/optimize.c b/qemu/tcg/optimize.c index 8a26356a..c09c7c08 100644 --- a/qemu/tcg/optimize.c +++ b/qemu/tcg/optimize.c @@ -198,7 +198,7 @@ static void tcg_opt_gen_movi(TCGContext *s, TCGOp *op, TCGArg *args, temps[dst].state = TCG_TEMP_CONST; temps[dst].val = val; mask = val; - if (TCG_TARGET_REG_BITS > 32 && new_op == INDEX_op_mov_i32) { + if (TCG_TARGET_REG_BITS > 32 && new_op == INDEX_op_movi_i32) { /* High bits of the destination are now garbage. */ mask |= ~0xffffffffull; }