tcg/i386: Fix INDEX_op_dup2_vec

We were only constructing the 64-bit element, and not
replicating the 64-bit element across the rest of the vector.

Cc: qemu-stable@nongnu.org
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2020-03-28 18:16:10 -07:00
parent 84878f4c00
commit e20cb81d9c
1 changed files with 7 additions and 3 deletions

View File

@ -2855,9 +2855,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
goto gen_simd; goto gen_simd;
#if TCG_TARGET_REG_BITS == 32 #if TCG_TARGET_REG_BITS == 32
case INDEX_op_dup2_vec: case INDEX_op_dup2_vec:
/* Constraints have already placed both 32-bit inputs in xmm regs. */ /* First merge the two 32-bit inputs to a single 64-bit element. */
insn = OPC_PUNPCKLDQ; tcg_out_vex_modrm(s, OPC_PUNPCKLDQ, a0, a1, a2);
goto gen_simd; /* Then replicate the 64-bit elements across the rest of the vector. */
if (type != TCG_TYPE_V64) {
tcg_out_dup_vec(s, type, MO_64, a0, a0);
}
break;
#endif #endif
case INDEX_op_abs_vec: case INDEX_op_abs_vec:
insn = abs_insn[vece]; insn = abs_insn[vece];