tcg/i386: Fix dupi/dupm for avx1 and 32-bit hosts
commit7b60ef3264e9627ac6efb34e9a6130647e9b55c0
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 16 May 2019 22:11:17 +0000 (16 15:11 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 22 May 2019 19:09:43 +0000 (22 15:09 -0400)
treeb0b8601e407cf69007a23ddacdfad5f034373f01
parenta4f667b6714916683408b983cfe0a615a725775f
tcg/i386: Fix dupi/dupm for avx1 and 32-bit hosts

The VBROADCASTSD instruction only allows %ymm registers as destination.
Rather than forcing VEX.L and writing to the entire 256-bit register,
revert to using MOVDDUP with an %xmm register.  This is sufficient for
an avx1 host since we do not support TCG_TYPE_V256 for that case.

Also fix the 32-bit avx2, which should have used VPBROADCASTW.

Fixes: 1e262b49b533
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/i386/tcg-target.inc.c