]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200317' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 18 Mar 2020 22:15:59 +0000 (22:15 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 18 Mar 2020 22:15:59 +0000 (22:15 +0000)
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>
1  2 
configure

diff --combined configure
index 78d59b7aab21b6d093a65b1548b6c17c637f85fe,47b8dea78a1ecd4ddfcfb930478fd7192a02a76c..206d22c5153984d78fcf753ed642af72cd82bef0
+++ b/configure
@@@ -303,7 -303,6 +303,7 @@@ libs_qga="
  debug_info="yes"
  stack_protector=""
  use_containers="yes"
 +gdb_bin=$(command -v "gdb")
  
  if test -e "$source_path/.git"
  then
@@@ -406,7 -405,6 +406,7 @@@ EXESUF="
  DSOSUF=".so"
  LDFLAGS_SHARED="-shared"
  modules="no"
 +module_upgrades="no"
  prefix="/usr/local"
  mandir="\${prefix}/share/man"
  datadir="\${prefix}/share"
@@@ -901,7 -899,7 +901,7 @@@ Linux
    linux="yes"
    linux_user="yes"
    kvm="yes"
 -  QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES"
 +  QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers $QEMU_INCLUDES"
    supported_os="yes"
    libudev="yes"
  ;;
@@@ -1034,10 -1032,6 +1034,10 @@@ for opt d
    --disable-modules)
        modules="no"
    ;;
 +  --disable-module-upgrades) module_upgrades="no"
 +  ;;
 +  --enable-module-upgrades) module_upgrades="yes"
 +  ;;
    --cpu=*)
    ;;
    --target-list=*) target_list="$optarg"
    ;;
    --enable-avx2) avx2_opt="yes"
    ;;
 +  --disable-avx512f) avx512f_opt="no"
 +  ;;
 +  --enable-avx512f) avx512f_opt="yes"
 +  ;;
 +
    --enable-glusterfs) glusterfs="yes"
    ;;
    --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
    ;;
    --disable-fuzzing) fuzzing=no
    ;;
 +  --gdb=*) gdb_bin="$optarg"
 +  ;;
    *)
        echo "ERROR: unknown option $opt"
        echo "Try '$0 --help' for more information"
@@@ -1786,7 -1773,6 +1786,7 @@@ Advanced options (experts only)
    --enable-plugins
                             enable plugins via shared library loading
    --disable-containers     don't use containers for cross-building
 +  --gdb=GDB-path           gdb to use for gdbstub tests [$gdb_bin]
  
  Optional features, enabled with --enable-FEATURE and
  disabled with --disable-FEATURE, default is enabled if available:
    guest-agent-msi build guest agent Windows MSI installation package
    pie             Position Independent Executables
    modules         modules support (non-Windows)
 +  module-upgrades try to load modules from alternate paths for upgrades
    debug-tcg       TCG debugging (default is disabled)
    debug-info      debugging information
    sparse          sparse checker
    tcmalloc        tcmalloc support
    jemalloc        jemalloc support
    avx2            AVX2 optimization support
 +  avx512f         AVX512F optimization support
    replication     replication support
    opengl          opengl support
    virglrenderer   virgl rendering support
@@@ -2065,11 -2049,6 +2065,11 @@@ if test "$modules" = "yes" && test "$mi
    error_exit "Modules are not available for Windows"
  fi
  
 +# module_upgrades is only reasonable if modules are enabled
 +if test "$modules" = "no" && test "$module_upgrades" = "yes" ; then
 +  error_exit "Can't enable module-upgrades as Modules are not enabled"
 +fi
 +
  # Static linking is not possible with modules or PIE
  if test "$static" = "yes" ; then
    if test "$modules" = "yes" ; then
@@@ -3371,9 -3350,7 +3371,9 @@@ if test "$vnc" = "yes" && test "$vnc_sa
  int main(void) { sasl_server_init(NULL, "qemu"); return 0; }
  EOF
    # Assuming Cyrus-SASL installed in /usr prefix
 -  vnc_sasl_cflags=""
 +  # QEMU defines struct iovec in "qemu/osdep.h",
 +  # we don't want libsasl to redefine it in <sasl/sasl.h>.
 +  vnc_sasl_cflags="-DSTRUCT_IOVEC_DEFINED"
    vnc_sasl_libs="-lsasl2"
    if compile_prog "$vnc_sasl_cflags" "$vnc_sasl_libs" ; then
      vnc_sasl=yes
    fi
  fi
  
 +##########################################
 +# avx512f optimization requirement check
 +#
 +# There is no point enabling this if cpuid.h is not usable,
 +# since we won't be able to select the new routines.
 +# by default, it is turned off.
 +# if user explicitly want to enable it, check environment
 +
 +if test "$cpuid_h" = "yes" && test "$avx512f_opt" = "yes"; then
 +  cat > $TMPC << EOF
 +#pragma GCC push_options
 +#pragma GCC target("avx512f")
 +#include <cpuid.h>
 +#include <immintrin.h>
 +static int bar(void *a) {
 +    __m512i x = *(__m512i *)a;
 +    return _mm512_test_epi64_mask(x, x);
 +}
 +int main(int argc, char *argv[])
 +{
 +      return bar(argv[0]);
 +}
 +EOF
 +  if ! compile_object "" ; then
 +    avx512f_opt="no"
 +  fi
 +else
 +  avx512f_opt="no"
 +fi
 +
  ########################################
  # check if __[u]int128_t is usable.
  
@@@ -5764,58 -5711,6 +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.
@@@ -6643,7 -6538,6 +6591,7 @@@ if test "$slirp" != "no" ; the
      echo "smbd              $smbd"
  fi
  echo "module support    $modules"
 +echo "alt path mod load $module_upgrades"
  echo "host CPU          $cpu"
  echo "host big endian   $bigendian"
  echo "target list       $target_list"
@@@ -6771,7 -6665,6 +6719,7 @@@ echo "libxml2           $libxml2
  echo "tcmalloc support  $tcmalloc"
  echo "jemalloc support  $jemalloc"
  echo "avx2 optimization $avx2_opt"
 +echo "avx512f optimization $avx512f_opt"
  echo "replication support $replication"
  echo "VxHS block device $vxhs"
  echo "bochs support     $bochs"
@@@ -6789,7 -6682,6 +6737,7 @@@ echo "libudev           $libudev
  echo "default devices   $default_devices"
  echo "plugin support    $plugins"
  echo "fuzzing support   $fuzzing"
 +echo "gdb               $gdb_bin"
  
  if test "$supported_cpu" = "no"; then
      echo
@@@ -6999,9 -6891,6 +6947,9 @@@ if test "$modules" = "yes"; the
    echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak
    echo "CONFIG_MODULES=y" >> $config_host_mak
  fi
 +if test "$module_upgrades" = "yes"; then
 +  echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
 +fi
  if test "$have_x11" = "yes" && test "$need_x11" = "yes"; then
    echo "CONFIG_X11=y" >> $config_host_mak
    echo "X11_CFLAGS=$x11_cflags" >> $config_host_mak
@@@ -7327,10 -7216,6 +7275,10 @@@ if test "$avx2_opt" = "yes" ; the
    echo "CONFIG_AVX2_OPT=y" >> $config_host_mak
  fi
  
 +if test "$avx512f_opt" = "yes" ; then
 +  echo "CONFIG_AVX512F_OPT=y" >> $config_host_mak
 +fi
 +
  if test "$lzo" = "yes" ; then
    echo "CONFIG_LZO=y" >> $config_host_mak
  fi
@@@ -7446,10 -7331,6 +7394,6 @@@ if test "$atomic64" = "yes" ; the
    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
@@@ -7671,10 -7552,6 +7615,10 @@@ if test "$plugins" = "yes" ; the
      fi
  fi
  
 +if test -n "$gdb_bin" ; then
 +    echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak
 +fi
 +
  if test "$tcg_interpreter" = "yes"; then
    QEMU_INCLUDES="-iquote \$(SRC_PATH)/tcg/tci $QEMU_INCLUDES"
  elif test "$ARCH" = "sparc64" ; then