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
This commit is contained in:
Aurelien Jarno 2018-02-10 21:37:49 -05:00 committed by Lioncash
parent 42dd2addbe
commit e273acf87a
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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;
}