mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
Fix tcg/i386 bug vs sari_vec.
Fix tcg-runtime-gvec.c vs i386 without avx. -----BEGIN PGP SIGNATURE----- iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAl5xHcYdHHJpY2hhcmQu aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/jcQf/aF2+3UeRCfk/Iu1s ClM6Gpo7z2sDSZwt8oDgxlhmvoA6j2V5Oa33rB9A5bcglV+WE1BEx6vBrMcP2RQx 2555p8DxkvY4ePFTX+E6IFQxLT8XcS+ttByvakLsfElKK6xflOjJKQOzml/MOL0Y GfMsjhreUKq/DPkZ9wyinlQp+Oq4yFNwuUWxAi19S2parB/xpJenVaIeMQGXyR/n kPvFG/42nr8JkMiZReeVUcJ9bcdLx1tSKt4fLUsU8MLdUKoq2qV6cm2r4UEyVIAi NBQc5MpQcO7Bb1yw88bcprjAXfr/JRnlpzWjgAUTYWdhQRDBspUK0qV2fHT9X7cZ ghyf3Q== =vaWE -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200317' into staging Fix tcg/i386 bug vs sari_vec. Fix tcg-runtime-gvec.c vs i386 without avx. # gpg: Signature made Tue 17 Mar 2020 18:58:14 GMT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-tcg-20200317: tcg: Remove tcg-runtime-gvec.c DO_CMP0 tcg: Tidy tcg-runtime-gvec.c DUP* tcg: Tidy tcg-runtime-gvec.c types tcg: Remove CONFIG_VECTOR16 tcg/i386: Bound shift count expanding sari_vec Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
0a4833b3b4
3 changed files with 122 additions and 241 deletions
56
configure
vendored
56
configure
vendored
|
@ -5764,58 +5764,6 @@ if test "$plugins" = "yes" &&
|
|||
"for this purpose. You can't build with --static."
|
||||
fi
|
||||
|
||||
########################################
|
||||
# See if 16-byte vector operations are supported.
|
||||
# Even without a vector unit the compiler may expand these.
|
||||
# There is a bug in old GCC for PPC that crashes here.
|
||||
# Unfortunately it's the system compiler for Centos 7.
|
||||
|
||||
cat > $TMPC << EOF
|
||||
typedef unsigned char U1 __attribute__((vector_size(16)));
|
||||
typedef unsigned short U2 __attribute__((vector_size(16)));
|
||||
typedef unsigned int U4 __attribute__((vector_size(16)));
|
||||
typedef unsigned long long U8 __attribute__((vector_size(16)));
|
||||
typedef signed char S1 __attribute__((vector_size(16)));
|
||||
typedef signed short S2 __attribute__((vector_size(16)));
|
||||
typedef signed int S4 __attribute__((vector_size(16)));
|
||||
typedef signed long long S8 __attribute__((vector_size(16)));
|
||||
static U1 a1, b1;
|
||||
static U2 a2, b2;
|
||||
static U4 a4, b4;
|
||||
static U8 a8, b8;
|
||||
static S1 c1;
|
||||
static S2 c2;
|
||||
static S4 c4;
|
||||
static S8 c8;
|
||||
static int i;
|
||||
void helper(void *d, void *a, int shift, int i);
|
||||
void helper(void *d, void *a, int shift, int i)
|
||||
{
|
||||
*(U1 *)(d + i) = *(U1 *)(a + i) << shift;
|
||||
*(U2 *)(d + i) = *(U2 *)(a + i) << shift;
|
||||
*(U4 *)(d + i) = *(U4 *)(a + i) << shift;
|
||||
*(U8 *)(d + i) = *(U8 *)(a + i) << shift;
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
a1 += b1; a2 += b2; a4 += b4; a8 += b8;
|
||||
a1 -= b1; a2 -= b2; a4 -= b4; a8 -= b8;
|
||||
a1 *= b1; a2 *= b2; a4 *= b4; a8 *= b8;
|
||||
a1 &= b1; a2 &= b2; a4 &= b4; a8 &= b8;
|
||||
a1 |= b1; a2 |= b2; a4 |= b4; a8 |= b8;
|
||||
a1 ^= b1; a2 ^= b2; a4 ^= b4; a8 ^= b8;
|
||||
a1 <<= i; a2 <<= i; a4 <<= i; a8 <<= i;
|
||||
a1 >>= i; a2 >>= i; a4 >>= i; a8 >>= i;
|
||||
c1 >>= i; c2 >>= i; c4 >>= i; c8 >>= i;
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
vector16=no
|
||||
if compile_prog "" "" ; then
|
||||
vector16=yes
|
||||
fi
|
||||
|
||||
########################################
|
||||
# See if __attribute__((alias)) is supported.
|
||||
# This false for Xcode 9, but has been remedied for Xcode 10.
|
||||
|
@ -7446,10 +7394,6 @@ if test "$atomic64" = "yes" ; then
|
|||
echo "CONFIG_ATOMIC64=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$vector16" = "yes" ; then
|
||||
echo "CONFIG_VECTOR16=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$attralias" = "yes" ; then
|
||||
echo "CONFIG_ATTRIBUTE_ALIAS=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue