Skip to content

Commit

Permalink
tcg/s390x: Fix tcg_out_dupi_vec vs VGM
Browse files Browse the repository at this point in the history
The immediate operands to VGM were in the wrong order,
producing an inverse mask.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Mar 14, 2022
1 parent 15df33c commit a66669c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tcg/s390x/tcg-target.c.inc
Expand Up @@ -2715,7 +2715,7 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
msb = clz32(val);
lsb = 31 - ctz32(val);
}
tcg_out_insn(s, VRIb, VGM, dst, lsb, msb, MO_32);
tcg_out_insn(s, VRIb, VGM, dst, msb, lsb, MO_32);
return;
}
} else {
Expand All @@ -2729,7 +2729,7 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece,
msb = clz64(val);
lsb = 63 - ctz64(val);
}
tcg_out_insn(s, VRIb, VGM, dst, lsb, msb, MO_64);
tcg_out_insn(s, VRIb, VGM, dst, msb, lsb, MO_64);
return;
}
}
Expand Down

0 comments on commit a66669c

Please sign in to comment.