mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 18:11:02 +00:00
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:
parent
42dd2addbe
commit
e273acf87a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue