All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
@ 2018-04-19 13:58 Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure Alex Bennée
                   ` (48 more replies)
  0 siblings, 49 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Hi,

This is the second revision of my attempt to revive the tests/tcg
directory. You can find the first iteration here:

  https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01361.html

Changes:

I've slightly re-jigged the Makefile inclusion to make
tests/tcg/Makefile very simple. All the TESTS are added by the various
sub-makes. I've also included
tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target so common base
architectures can include tests. See MIPS for an example.

Missing Targets:

We still have quite a bit of test code that is not built. These are:

  * tests/tcg/mips/mip[32|64]-dsp[r]

  A bunch of system tests. Also we have no mips64 BE support.

  * tests/tcg/alpha

  Need a cross-compiler

  * tests/tcg/cris

  Needs a cross-compiler

  * tests/tcg/lm32

  Needs a cross-compiler

  * tests/tcg/openrisc

  Needs a cross-compiler

  * tests/tcg/xtensa

  Needs a cross-compiler


We should be able to build basic multiarch tests for a bunch of
additional linux-user targets. A bunch of our LE target compilers
should be able to build BE but I ran into troubles of an incomplete
glibc-dev assuming it's not needed. Apparently a newlib based
cross-compiler would fix this as it has both LE and BE headers
available.

I did start playing with crosstool-ng and Linaro's own ABE scripts but
realised this could end up a massive time sync. What would be really
helpful is if the respective maintainers could encode their EXACT
STEPS for building their cross compilers into some docker recipes.

Missing Cross Compilers:

  aarch64_be alpha armeb cris hppa m68k microblaze microblazeel mips64
  mipsn32 mipsn32el nios2 or1k ppc ppc64abi32 riscv32 riscv64 sh4
  sh4eb sparc sparc32plus sparc64 tilegx xtensa xtensaeb

Finally the end of the series has me adding Emilio's fp-test to the
per-target builds. Unfortunately although some osdep.h and softfloat.c
fiddling allows us to build in most cases I still can't build for
example an i386 fp-test on an x86_64 host using the cross compiler as
it triggers incompatibilities with config-host.h - in this case Int128
support. Currently I just hackily disable fp-test for non-64 bit
platforms.

While the later patches in the series are a bit of a WIP the earlier
patches are certainly deserving of review. Currently the un-reviewed
patches are:

  patch 0001/docker add probe command for configure.patch needs review
  patch 0002/configure add test for docker availability.patch needs review
  patch 0003/configure add support for cross cc FOO.patch needs review
  patch 0004/configure move i386_cc to cross_cc_i386.patch needs review
  patch 0005/configure allow user to specify cross cc cflags f.patch needs review
  patch 0006/configure set cross_cc_FOO for host compiler.patch needs review
  patch 0009/docker extend cc command to accept compiler.patch needs review
  patch 0014/tests tcg multiarch enable additional linux test .patch needs review
  patch 0016/docker Add fedora i386 cross image.patch needs review
  patch 0017/tests tcg enable building for i386.patch needs review
  patch 0020/tests tcg i386 fix test i386 fprem.patch needs review
  patch 0021/tests tcg i386 disable i386 version of test i386 .patch needs review
  patch 0022/tests tcg x86_64 add Makefile.target.patch needs review
  patch 0023/tests tcg i386 test i386 use modern vector_size a.patch needs review
  patch 0024/tests tcg i386 test i386 fix printf format.patch needs review
  patch 0026/tests tcg arm fix up test arm iwmmxt test.patch needs review
  patch 0027/tests tcg aarch64 add Makefile.target.patch needs review
  patch 0028/tests tcg aarch64 add fcvt test cases for AArch64.patch needs review
  patch 0029/tests tcg aarch64 userspace system register test.patch needs review
  patch 0031/tests tcg enable building for MIPS.patch needs review
  patch 0032/tests tcg mips include common mips hello mips.patch needs review
  patch 0035/tests tcg Makefile update to be called from Makef.patch needs review
  patch 0036/Makefile.target add clean guest tests targets.patch needs review
  patch 0038/osdep disable glib compat.h include with QEMU_NO_.patch needs review
  patch 0039/softfloat do not include glib headers.patch needs review
  patch 0040/tests add fp test a floating point test suite.patch needs review
  patch 0041/tests tcg multiarch add fp test into multiarch se.patch needs review

I've merged a few patches but I've kept the review tags so far. As
usual there are comments bellow the --- for any changes.


Alex Bennée (35):
  configure: add test for docker availability
  configure: add support for --cross-cc-FOO
  configure: move i386_cc to cross_cc_i386
  configure: allow user to specify --cross-cc-cflags-foo=
  configure: set cross_cc_FOO for host compiler
  docker: Add "cc" subcommand
  docker: extend "cc" command to accept compiler
  docker: allow "cc" command to run in user context
  docker: Makefile.include introduce DOCKER_SCRIPT
  tests/tcg: move architecture independent tests into subdir
  tests/tcg/multiarch: enable additional linux-test tests
  tests/tcg: move i386 specific tests into subdir
  tests/tcg: enable building for i386
  tests/tcg/i386: fix test-i386
  tests/tcg/i386: fix test-i386-fprem
  tests/tcg/i386: disable i386 version of test-i386-ssse
  tests/tcg/x86_64: add Makefile.target
  tests/tcg/i386/test-i386: use modern vector_size attributes
  tests/tcg/i386/test-i386: fix printf format
  tests/tcg: move ARM specific tests into subdir
  tests/tcg/arm: fix up test-arm-iwmmxt test
  tests/tcg/aarch64: add Makefile.target
  tests/tcg/aarch64: add fcvt test cases for AArch64
  tests/tcg/aarch64: userspace system register test
  tests/tcg: move MIPS specific tests into subdir
  tests/tcg: enable building for MIPS
  tests/tcg/mips: include common mips hello-mips
  tests/tcg: enable building for s390x
  tests/tcg: enable building for ppc64
  tests/tcg/Makefile: update to be called from Makefile.target
  Makefile.target: add (clean-)guest-tests targets
  tests/Makefile.include: add (clean-)check-tcg targets
  tests/tcg/multiarch: add fp-test into multiarch set
  tests/tcg: disable fp-test for 32 bit (HACK!)
  tests: fp-test add fcvt support (!INCOMPLETE WIP)

Emilio G. Cota (3):
  osdep: disable glib-compat.h include with QEMU_NO_GLIB
  softfloat: do not include glib headers
  tests: add fp-test, a floating point test suite

Fam Zheng (4):
  Makefile: Rename TARGET_DIRS to TARGET_LIST
  tests/tcg/multiarch: Build fix for linux-test
  docker: Add fedora-i386-cross image
  tests/tcg/i386: Build fix for hello-i386

Peter Maydell (1):
  docker: add "probe" command for configure

 Makefile                                      |   20 +-
 Makefile.target                               |    5 +
 configure                                     |  111 +-
 fpu/softfloat.c                               |    4 +
 include/qemu/osdep.h                          |    2 +
 scripts/create_config                         |    2 +-
 tests/Makefile.include                        |   24 +-
 tests/docker/Makefile.include                 |   10 +-
 tests/docker/docker.py                        |   49 +
 .../dockerfiles/fedora-i386-cross.docker      |   14 +
 tests/fp/.gitignore                           |    3 +
 tests/fp/Makefile                             |   34 +
 tests/fp/fp-test.c                            | 1582 +++++++++++++++++
 tests/fp/qemu/regression-tests.fptest         |    7 +
 tests/tcg/Makefile                            |  184 +-
 tests/tcg/Makefile.include                    |   76 +
 tests/tcg/README                              |   69 +-
 tests/tcg/aarch64/Makefile.target             |   13 +
 tests/tcg/aarch64/fcvt.c                      |  260 +++
 tests/tcg/aarch64/fcvt.out                    | 1305 ++++++++++++++
 tests/tcg/aarch64/sysregs.c                   |   14 +
 tests/tcg/arm/Makefile.target                 |   20 +
 tests/tcg/arm/README                          |   11 +
 tests/tcg/{ => arm}/hello-arm.c               |    0
 .../test-arm-iwmmxt.S}                        |    0
 tests/tcg/i386/Makefile.include               |    9 +
 tests/tcg/i386/Makefile.target                |   30 +
 tests/tcg/i386/README                         |   38 +
 tests/tcg/{ => i386}/hello-i386.c             |    1 +
 tests/tcg/{ => i386}/pi_10.com                |  Bin
 tests/tcg/{ => i386}/runcom.c                 |    0
 tests/tcg/{ => i386}/test-i386-code16.S       |    0
 tests/tcg/{ => i386}/test-i386-fprem.c        |   12 +-
 tests/tcg/{ => i386}/test-i386-muldiv.h       |    0
 tests/tcg/{ => i386}/test-i386-shift.h        |    0
 tests/tcg/{ => i386}/test-i386-ssse3.c        |    0
 tests/tcg/{ => i386}/test-i386-vm86.S         |    0
 tests/tcg/{ => i386}/test-i386.c              |    7 +-
 tests/tcg/{ => i386}/test-i386.h              |    0
 tests/tcg/mips/Makefile.include               |   17 +
 tests/tcg/mips/Makefile.target                |   19 +
 tests/tcg/mips/README                         |    7 +
 tests/tcg/{ => mips}/hello-mips.c             |    0
 tests/tcg/multiarch/Makefile.target           |   50 +
 tests/tcg/multiarch/README                    |    1 +
 tests/tcg/{ => multiarch}/linux-test.c        |   82 +-
 tests/tcg/{ => multiarch}/sha1.c              |    0
 tests/tcg/{ => multiarch}/test-mmap.c         |    0
 tests/tcg/{ => multiarch}/testthread.c        |    0
 tests/tcg/ppc64le/Makefile.include            |    2 +
 tests/tcg/s390x/Makefile.include              |    2 +
 tests/tcg/test_path.c                         |  157 --
 tests/tcg/x86_64/Makefile.target              |   15 +
 53 files changed, 3814 insertions(+), 454 deletions(-)
 create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker
 create mode 100644 tests/fp/.gitignore
 create mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/fp-test.c
 create mode 100644 tests/fp/qemu/regression-tests.fptest
 create mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/aarch64/Makefile.target
 create mode 100644 tests/tcg/aarch64/fcvt.c
 create mode 100644 tests/tcg/aarch64/fcvt.out
 create mode 100644 tests/tcg/aarch64/sysregs.c
 create mode 100644 tests/tcg/arm/Makefile.target
 create mode 100644 tests/tcg/arm/README
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{test-arm-iwmmxt.s => arm/test-arm-iwmmxt.S} (100%)
 create mode 100644 tests/tcg/i386/Makefile.include
 create mode 100644 tests/tcg/i386/Makefile.target
 create mode 100644 tests/tcg/i386/README
 rename tests/tcg/{ => i386}/hello-i386.c (96%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (97%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (99%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
 create mode 100644 tests/tcg/mips/Makefile.include
 create mode 100644 tests/tcg/mips/Makefile.target
 create mode 100644 tests/tcg/mips/README
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
 create mode 100644 tests/tcg/multiarch/Makefile.target
 create mode 100644 tests/tcg/multiarch/README
 rename tests/tcg/{ => multiarch}/linux-test.c (89%)
 rename tests/tcg/{ => multiarch}/sha1.c (100%)
 rename tests/tcg/{ => multiarch}/test-mmap.c (100%)
 rename tests/tcg/{ => multiarch}/testthread.c (100%)
 create mode 100644 tests/tcg/ppc64le/Makefile.include
 create mode 100644 tests/tcg/s390x/Makefile.include
 delete mode 100644 tests/tcg/test_path.c
 create mode 100644 tests/tcg/x86_64/Makefile.target

-- 
2.17.0

^ permalink raw reply	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-20  2:08   ` Fam Zheng
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability Alex Bennée
                   ` (47 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

From: Peter Maydell <peter.maydell@linaro.org>

This is a helper function for the configure script. It replies yes,
sudo or no to inform the user if non-interactive docker support is
available. We trap the Exception to fail gracefully.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/docker.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 1246ba9578..f8267586eb 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -390,6 +390,24 @@ class ImagesCommand(SubCommand):
     def run(self, args, argv):
         return Docker().command("images", argv, args.quiet)
 
+
+class ProbeCommand(SubCommand):
+    """Probe if we can run docker automatically"""
+    name = "probe"
+
+    def run(self, args, argv):
+        try:
+            docker = Docker()
+            if docker._command[0] == "docker":
+                print "yes"
+            elif docker._command[0] == "sudo":
+                print "sudo"
+        except Exception:
+            print "no"
+
+        return
+
+
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
             usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 20:49   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
                   ` (46 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This tests for a working docker installation without sudo and sets up
config-host.mak accordingly. This will be useful from cross compiling
things in the future.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/configure b/configure
index 0a19b033bc..b0ae632ee4 100755
--- a/configure
+++ b/configure
@@ -451,6 +451,7 @@ jemalloc="no"
 replication="yes"
 vxhs=""
 libxml2=""
+docker="no"
 
 supported_cpu="no"
 supported_os="no"
@@ -5413,6 +5414,17 @@ EOF
   fi
 fi
 
+##########################################
+# Docker and cross-compiler support
+#
+# This is specifically for building test
+# cases for foreign architectures, not
+# cross-compiling QEMU itself.
+
+if has "docker"; then
+    docker=$($python $source_path/tests/docker/docker.py probe)
+fi
+
 ##########################################
 # End of CC checks
 # After here, no more $cc or $ld runs
@@ -5874,6 +5886,7 @@ echo "avx2 optimization $avx2_opt"
 echo "replication support $replication"
 echo "VxHS block device $vxhs"
 echo "capstone          $capstone"
+echo "docker            $docker"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -6697,6 +6710,10 @@ if test "$gcov" = "yes" ; then
   echo "GCOV=$gcov_tool" >> $config_host_mak
 fi
 
+if test "$docker" != "no"; then
+    echo "HAVE_USER_DOCKER=y" >> $config_host_mak
+fi
+
 # use included Linux headers
 if test "$linux" = "yes" ; then
   mkdir -p linux-headers
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 20:20   ` Richard Henderson
                     ` (2 more replies)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386 Alex Bennée
                   ` (45 subsequent siblings)
  48 siblings, 3 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This allows us to specify cross compilers for our guests. This is
useful for building test images/programs. Currently we re-run the
compile test for each target. I couldn't think of a way to cache the
value for a given arch without getting messier configure code.

The cross compiler for the guest is visible to each target as
CROSS_CC_GUEST in config-target.mak.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/configure b/configure
index b0ae632ee4..0dca341f2a 100755
--- a/configure
+++ b/configure
@@ -453,6 +453,13 @@ vxhs=""
 libxml2=""
 docker="no"
 
+# cross compilers defaults, can be overridden with --cross-cc-ARCH
+cross_cc_aarch64="aarch64-linux-gnu-gcc"
+cross_cc_arm="arm-linux-gnueabihf-gcc"
+cross_cc_powerpc="powerpc-linux-gnu-gcc"
+
+enabled_cross_compilers=""
+
 supported_cpu="no"
 supported_os="no"
 bogus_os="no"
@@ -483,6 +490,11 @@ for opt do
   ;;
   --disable-debug-info) debug_info="no"
   ;;
+  --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"
+  ;;
+  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+                eval "cross_cc_${cc_arch}=\$optarg"
+  ;;
   esac
 done
 # OS specific
@@ -675,10 +687,12 @@ case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
+    cross_cc_i386=gcc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
+    cross_cc_x86_64=gcc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
@@ -912,6 +926,8 @@ for opt do
   ;;
   --disable-debug-info)
   ;;
+  --cross-cc-*)
+  ;;
   --enable-modules)
       modules="yes"
   ;;
@@ -6777,6 +6793,8 @@ case "$target" in
     ;;
 esac
 
+target_compiler=""
+
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > $config_target_mak
 
@@ -6805,6 +6823,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_arm
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64
@@ -6812,6 +6831,7 @@ case "$target_name" in
     bflt="yes"
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
+    target_compiler=$cross_cc_aarch64
   ;;
   cris)
   ;;
@@ -6853,6 +6873,7 @@ case "$target_name" in
   ;;
   ppc)
     gdb_xml_files="power-core.xml power-fpu.xml power-altivec.xml power-spe.xml"
+    target_compiler=$cross_cc_powerpc
   ;;
   ppcemb)
     TARGET_BASE_ARCH=ppc
@@ -6927,6 +6948,25 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then
   TARGET_BASE_ARCH=$TARGET_ARCH
 fi
 
+# Do we have a cross compiler for this target?
+if has $target_compiler; then
+
+    cat > $TMPC << EOF
+#include <stdio.h>
+int main(void) {
+    printf("Hello World!\n");
+}
+EOF
+
+    if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then
+        target_compiler=""
+    else
+        enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}"
+    fi
+else
+    target_compiler=""
+fi
+
 symlink "$source_path/Makefile.target" "$target_dir/Makefile"
 
 upper() {
@@ -7000,6 +7040,10 @@ if test "$target_bsd_user" = "yes" ; then
   echo "CONFIG_BSD_USER=y" >> $config_target_mak
 fi
 
+if test -n "$target_compiler"; then
+  echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+fi
+
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
 cflags=""
@@ -7122,6 +7166,12 @@ echo "QEMU_CFLAGS+=$cflags" >> $config_target_mak
 
 done # for target in $targets
 
+if test -n "$enabled_cross_compilers"; then
+    echo
+    echo "NOTE: cross-compilers enabled:"
+    printf '%s\n' $enabled_cross_compilers | sort -u
+fi
+
 if [ "$dtc_internal" = "yes" ]; then
   echo "config-host.h: subdir-dtc" >> $config_host_mak
 fi
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (2 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 20:59   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= Alex Bennée
                   ` (44 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Also dont assume x86_64 compiler can build i386 binaries.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

---
v2
  - drop using system x86_64 compiler for i386 compiles
---
 configure | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 0dca341f2a..038fb9db7b 100755
--- a/configure
+++ b/configure
@@ -284,7 +284,6 @@ libs_softmmu=""
 libs_tools=""
 audio_pt_int=""
 audio_win_int=""
-cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 stack_protector=""
@@ -457,6 +456,8 @@ docker="no"
 cross_cc_aarch64="aarch64-linux-gnu-gcc"
 cross_cc_arm="arm-linux-gnueabihf-gcc"
 cross_cc_powerpc="powerpc-linux-gnu-gcc"
+cross_cc_i386="i386-pc-linux-gnu-gcc"
+cross_cc_cflags_i386=""
 
 enabled_cross_compilers=""
 
@@ -687,12 +688,10 @@ case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="i386"
     supported_cpu="yes"
-    cross_cc_i386=gcc
   ;;
   x86_64|amd64)
     cpu="x86_64"
     supported_cpu="yes"
-    cross_cc_x86_64=gcc
   ;;
   armv*b|armv*l|arm)
     cpu="arm"
@@ -1435,7 +1434,6 @@ case "$cpu" in
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
-           cc_i386='$(CC) -m32'
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1443,12 +1441,14 @@ case "$cpu" in
            # runtime and generate the fallback to serial emulation.
            CPU_CFLAGS="-m64 -mcx16"
            LDFLAGS="-m64 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           cross_cc_x86_64=$cc
+           cross_cc_cflags_x86_64=$CPU_CFLAGS
            ;;
     x32)
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
-           cc_i386='$(CC) -m32'
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386="-m32"
            ;;
     # No special flags required for other host CPUs
 esac
@@ -6675,7 +6675,6 @@ echo "CC=$cc" >> $config_host_mak
 if $iasl -h > /dev/null 2>&1; then
   echo "IASL=$iasl" >> $config_host_mak
 fi
-echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 echo "CXX=$cxx" >> $config_host_mak
 echo "OBJCC=$objcc" >> $config_host_mak
@@ -6794,6 +6793,7 @@ case "$target" in
 esac
 
 target_compiler=""
+target_compiler_cflags=""
 
 mkdir -p $target_dir
 echo "# Automatically generated by configure - do not modify" > $config_target_mak
@@ -6810,10 +6810,13 @@ TARGET_ABI_DIR=""
 case "$target_name" in
   i386)
     gdb_xml_files="i386-32bit.xml i386-32bit-core.xml i386-32bit-sse.xml"
+    target_compiler=$cross_cc_i386
+    target_compiler_cflags=$cross_cc_cflags_i386
   ;;
   x86_64)
     TARGET_BASE_ARCH=i386
     gdb_xml_files="i386-64bit.xml i386-64bit-core.xml i386-64bit-sse.xml"
+    target_compiler=$cross_cc_x86_64
   ;;
   alpha)
     mttcg="yes"
@@ -6958,7 +6961,7 @@ int main(void) {
 }
 EOF
 
-    if ! do_compiler $target_compiler -o $TMPE $TMPC -static ; then
+    if ! do_compiler $target_compiler $target_compiler_cflags -o $TMPE $TMPC -static ; then
         target_compiler=""
     else
         enabled_cross_compilers="${enabled_cross_compilers} ${target_compiler}"
@@ -7042,8 +7045,13 @@ fi
 
 if test -n "$target_compiler"; then
   echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak
+
+  if test -n "$target_compiler_cflags"; then
+      echo "CROSS_CC_GUEST_CFLAGS=$target_compiler_cflags" >> $config_target_mak
+  fi
 fi
 
+
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
 cflags=""
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo=
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (3 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler Alex Bennée
                   ` (43 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

As an individual compiler may be able to support several targets with
the appropriate flags we need to expose this to the user as well.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure b/configure
index 038fb9db7b..29af33716d 100755
--- a/configure
+++ b/configure
@@ -454,7 +454,10 @@ docker="no"
 
 # cross compilers defaults, can be overridden with --cross-cc-ARCH
 cross_cc_aarch64="aarch64-linux-gnu-gcc"
+cross_cc_aarch64_be="$cross_cc_aarch64"
+cross_cc_cflags_aarch64_be="-mbig-endian"
 cross_cc_arm="arm-linux-gnueabihf-gcc"
+cross_cc_cflags_armeb="-mbig-endian"
 cross_cc_powerpc="powerpc-linux-gnu-gcc"
 cross_cc_i386="i386-pc-linux-gnu-gcc"
 cross_cc_cflags_i386=""
@@ -493,6 +496,9 @@ for opt do
   ;;
   --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"
   ;;
+  --cross-cc-cflags*) cc_arch=${opt#--cross-cc-flags}
+                      eval "cross_cc_cflags_${cc_arch}=\$optarg"
+  ;;
   --cross-cc-*) cc_arch=${opt#--cross-cc-}
                 eval "cross_cc_${cc_arch}=\$optarg"
   ;;
@@ -6827,6 +6833,7 @@ case "$target_name" in
     mttcg="yes"
     gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
     target_compiler=$cross_cc_arm
+    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   aarch64|aarch64_be)
     TARGET_ARCH=aarch64
@@ -6835,6 +6842,7 @@ case "$target_name" in
     mttcg="yes"
     gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
     target_compiler=$cross_cc_aarch64
+    eval "target_compiler_cflags=\$cross_cc_cflags_${target_name}"
   ;;
   cris)
   ;;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (4 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:04   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST Alex Bennée
                   ` (42 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

We can build tests for the host system with the compiler that we have
selected.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 29af33716d..44d310a692 100755
--- a/configure
+++ b/configure
@@ -1416,30 +1416,44 @@ case "$cpu" in
     ppc)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_powerpc=$cc
+           cross_cc_cflags_powerpc=$CPU_CFLAGS
            ;;
     ppc64)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_ppc64=$cc
+           cross_cc_cflags_ppc64=$CPU_CFLAGS
            ;;
     sparc)
            CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc"
            LDFLAGS="-m32 -mv8plus $LDFLAGS"
+           cross_cc_sparc=$cc
+           cross_cc_cflags_sparc=$CPU_CFLAGS
            ;;
     sparc64)
            CPU_CFLAGS="-m64 -mcpu=ultrasparc"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_sparc64=$cc
+           cross_cc_cflags_sparc64=$CPU_CFLAGS
            ;;
     s390)
            CPU_CFLAGS="-m31"
            LDFLAGS="-m31 $LDFLAGS"
+           cross_cc_s390=$cc
+           cross_cc_cflags_s390=$CPU_CFLAGS
            ;;
     s390x)
            CPU_CFLAGS="-m64"
            LDFLAGS="-m64 $LDFLAGS"
+           cross_cc_s390x=$cc
+           cross_cc_cflags_s390x=$CPU_CFLAGS
            ;;
     i386)
            CPU_CFLAGS="-m32"
            LDFLAGS="-m32 $LDFLAGS"
+           cross_cc_i386=$cc
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     x86_64)
            # ??? Only extremely old AMD cpus do not have cmpxchg16b.
@@ -1454,7 +1468,7 @@ case "$cpu" in
            CPU_CFLAGS="-mx32"
            LDFLAGS="-mx32 $LDFLAGS"
            cross_cc_i386=$cc
-           cross_cc_cflags_i386="-m32"
+           cross_cc_cflags_i386=$CPU_CFLAGS
            ;;
     # No special flags required for other host CPUs
 esac
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (5 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:05   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand Alex Bennée
                   ` (41 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel

From: Fam Zheng <famz@redhat.com>

To be more accurate on its purpose and make code that looks for a certain
target out of this variable more readable.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 Makefile               | 20 ++++++++++----------
 configure              |  2 +-
 scripts/create_config  |  2 +-
 tests/Makefile.include |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index d71dd5bea4..e894431a89 100644
--- a/Makefile
+++ b/Makefile
@@ -62,8 +62,8 @@ seems to have been used for an in-tree build. You can fix this by running \
 endif
 endif
 
-CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_DIRS)),y)
-CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_DIRS)),y)
+CONFIG_SOFTMMU := $(if $(filter %-softmmu,$(TARGET_LIST)),y)
+CONFIG_USER_ONLY := $(if $(filter %-user,$(TARGET_LIST)),y)
 CONFIG_XEN := $(CONFIG_XEN_BACKEND)
 CONFIG_ALL=y
 -include config-all-devices.mak
@@ -362,8 +362,8 @@ DOCS=
 endif
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) BUILD_DIR=$(BUILD_DIR)
-SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_DIRS))
-SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_DIRS))
+SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_LIST))
+SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_LIST))
 
 ifeq ($(SUBDIR_DEVICES_MAK),)
 config-all-devices.mak:
@@ -466,7 +466,7 @@ config-host.h-timestamp: config-host.mak
 qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@")
 
-SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
+SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_LIST))
 SOFTMMU_SUBDIR_RULES=$(filter %-softmmu,$(SUBDIR_RULES))
 
 $(SOFTMMU_SUBDIR_RULES): $(block-obj-y)
@@ -510,7 +510,7 @@ ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
 romsubdir-%:
 	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)" TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",)
 
-ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
+ALL_SUBDIRS=$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS))
 
 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
 
@@ -763,7 +763,7 @@ distclean: clean
 	rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf
 	rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html
 	rm -f docs/qemu-block-drivers.7
-	for d in $(TARGET_DIRS); do \
+	for d in $(TARGET_LIST); do \
 	rm -rf $$d || exit 1 ; \
         done
 	rm -Rf .sdk
@@ -864,7 +864,7 @@ endif
 		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
 	$(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/trace-events-all"
-	for d in $(TARGET_DIRS); do \
+	for d in $(TARGET_LIST); do \
 	$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
         done
 
@@ -1062,9 +1062,9 @@ endif
 	@echo  '  ctags/TAGS      - Generate tags file for editors'
 	@echo  '  cscope          - Generate cscope index'
 	@echo  ''
-	@$(if $(TARGET_DIRS), \
+	@$(if $(TARGET_LIST), \
 		echo 'Architecture specific targets:'; \
-		$(foreach t, $(TARGET_DIRS), \
+		$(foreach t, $(TARGET_LIST), \
 		printf "  %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \
 		echo '')
 	@echo  'Cleaning targets:'
diff --git a/configure b/configure
index 44d310a692..0988c88d9f 100755
--- a/configure
+++ b/configure
@@ -6125,7 +6125,7 @@ qemu_version=$(head $source_path/VERSION)
 echo "VERSION=$qemu_version" >>$config_host_mak
 echo "PKGVERSION=$pkgversion" >>$config_host_mak
 echo "SRC_PATH=$source_path" >> $config_host_mak
-echo "TARGET_DIRS=$target_list" >> $config_host_mak
+echo "TARGET_LIST=$target_list" >> $config_host_mak
 if [ "$docs" = "yes" ] ; then
   echo "BUILD_DOCS=yes" >> $config_host_mak
 fi
diff --git a/scripts/create_config b/scripts/create_config
index d727e5e36e..58948a67a4 100755
--- a/scripts/create_config
+++ b/scripts/create_config
@@ -107,7 +107,7 @@ case $line in
     target_name=${line#*=}
     echo "#define TARGET_NAME \"$target_name\""
     ;;
- TARGET_DIRS=*)
+ TARGET_LIST=*)
     # do nothing
     ;;
  TARGET_*=y) # configuration
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3b9a5e31a2..3d2f0458ab 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -854,7 +854,7 @@ endif
 
 # QTest rules
 
-TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
+TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST)))
 ifeq ($(CONFIG_POSIX),y)
 QTEST_TARGETS = $(TARGETS)
 check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (6 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler Alex Bennée
                   ` (40 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Signed-off-by: Fam Zheng <famz@redhat.com>
[AJB: add if args.paths check]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2
  - add if args.paths check to avoid iterating null argument
---
 tests/docker/docker.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index f8267586eb..bcc3ee2dee 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -408,6 +408,31 @@ class ProbeCommand(SubCommand):
         return
 
 
+class CcCommand(SubCommand):
+    """Compile sources with cc in images"""
+    name = "cc"
+
+    def args(self, parser):
+        parser.add_argument("--image", "-i", required=True,
+                            help="The docker image in which to run cc")
+        parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
+                            help="""Extra paths to (ro) mount into container for
+                            reading sources""")
+
+    def run(self, args, argv):
+        if argv and argv[0] == "--":
+            argv = argv[1:]
+        cwd = os.getcwd()
+        cmd = ["--rm", "-w", cwd,
+               "-v", "%s:%s:rw" % (cwd, cwd)]
+        if args.paths:
+            for p in args.paths:
+                cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        cmd += [args.image, "cc"]
+        cmd += argv
+        return Docker().command("run", cmd, args.quiet)
+
+
 def main():
     parser = argparse.ArgumentParser(description="A Docker helper",
             usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (7 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-20  2:06   ` Fam Zheng
  2018-04-20  2:43   ` Philippe Mathieu-Daudé
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context Alex Bennée
                   ` (39 subsequent siblings)
  48 siblings, 2 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

When calling our cross-compilation images we want to call something
other than the default cc.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
v2
  - use arg.cc default to simplify logic
---
 tests/docker/docker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index bcc3ee2dee..59bce9f19a 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -415,6 +415,8 @@ class CcCommand(SubCommand):
     def args(self, parser):
         parser.add_argument("--image", "-i", required=True,
                             help="The docker image in which to run cc")
+        parser.add_argument("--cc", default="cc",
+                            help="The compiler executable to call")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -428,7 +430,7 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
-        cmd += [args.image, "cc"]
+        cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (8 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT Alex Bennée
                   ` (38 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/docker/docker.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/docker/docker.py b/tests/docker/docker.py
index 59bce9f19a..37bfa98005 100755
--- a/tests/docker/docker.py
+++ b/tests/docker/docker.py
@@ -417,6 +417,8 @@ class CcCommand(SubCommand):
                             help="The docker image in which to run cc")
         parser.add_argument("--cc", default="cc",
                             help="The compiler executable to call")
+        parser.add_argument("--user",
+                            help="The user-id to run under")
         parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
                             help="""Extra paths to (ro) mount into container for
                             reading sources""")
@@ -430,6 +432,8 @@ class CcCommand(SubCommand):
         if args.paths:
             for p in args.paths:
                 cmd += ["-v", "%s:%s:ro,z" % (p, p)]
+        if args.user:
+            cmd += ["-u", args.user]
         cmd += [args.image, args.cc]
         cmd += argv
         return Docker().command("run", cmd, args.quiet)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (9 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:08   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir Alex Bennée
                   ` (37 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Define this in one place to make it easy to re-use.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/docker/Makefile.include | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index de87341528..6a5aa9ec71 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -14,6 +14,8 @@ DOCKER_TESTS := $(notdir $(shell \
 
 DOCKER_TOOLS := travis
 
+DOCKER_SCRIPT=$(SRC_PATH)/tests/docker/docker.py
+
 TESTS ?= %
 IMAGES ?= %
 
@@ -37,7 +39,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \
 	fi
 	$(call quiet-command,\
-		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
+		$(DOCKER_SCRIPT) build qemu:$* $< \
 		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
 		$(if $(NOUSER),,--add-current-user) \
 		$(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\
@@ -129,11 +131,11 @@ docker-run: docker-qemu-src
 	fi
 	$(if $(EXECUTABLE),						\
 		$(call quiet-command,					\
-			$(SRC_PATH)/tests/docker/docker.py update 	\
+			$(DOCKER_SCRIPT) update 			\
 			$(IMAGE) $(EXECUTABLE),				\
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
-		$(SRC_PATH)/tests/docker/docker.py run 			\
+		$(DOCKER_SCRIPT) run 					\
 			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
@@ -163,4 +165,4 @@ docker-run-%:
 	@$(MAKE) docker-run TEST=$(CMD) IMAGE=qemu:$(IMAGE)
 
 docker-clean:
-	$(call quiet-command, $(SRC_PATH)/tests/docker/docker.py clean)
+	$(call quiet-command, $(DOCKER_SCRIPT) clean)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (10 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:20   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test Alex Bennée
                   ` (36 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

We will want to build these for all supported guest architectures so
lets move them all into one place. We also drop test_path at this
point because it needs qemu utils and glib bits which is hard to
support for cross compiling.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>

---
v2
  - move VPATH and TESTs setup into multiarch/Makefile.target
  - remove moved bits from tests/tcg/Makefile
---
 tests/tcg/Makefile                     |  31 -----
 tests/tcg/README                       |  10 +-
 tests/tcg/multiarch/Makefile.target    |  30 +++++
 tests/tcg/multiarch/README             |   1 +
 tests/tcg/{ => multiarch}/linux-test.c |   0
 tests/tcg/{ => multiarch}/sha1.c       |   0
 tests/tcg/{ => multiarch}/test-mmap.c  |   0
 tests/tcg/{ => multiarch}/testthread.c |   0
 tests/tcg/test_path.c                  | 157 -------------------------
 9 files changed, 35 insertions(+), 194 deletions(-)
 create mode 100644 tests/tcg/multiarch/Makefile.target
 create mode 100644 tests/tcg/multiarch/README
 rename tests/tcg/{ => multiarch}/linux-test.c (100%)
 rename tests/tcg/{ => multiarch}/sha1.c (100%)
 rename tests/tcg/{ => multiarch}/test-mmap.c (100%)
 rename tests/tcg/{ => multiarch}/testthread.c (100%)
 delete mode 100644 tests/tcg/test_path.c

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 89e3342f3d..e12395117a 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -18,12 +18,9 @@ LDFLAGS=
 # also, pi_10.com runs indefinitely
 
 I386_TESTS=hello-i386 \
-	   linux-test \
-	   testthread \
 	   sha1-i386 \
 	   test-i386 \
 	   test-i386-fprem \
-	   test-mmap \
 	   # runcom
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
@@ -47,8 +44,6 @@ run-%: %
 	-$(QEMU) ./$*
 
 run-hello-i386: hello-i386
-run-linux-test: linux-test
-run-testthread: testthread
 run-sha1-i386: sha1-i386
 
 run-test-i386: test-i386
@@ -66,11 +61,6 @@ run-test-x86_64: test-x86_64
 	-$(QEMU_X86_64) test-x86_64 > test-x86_64.out
 	@if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi
 
-run-test-mmap: test-mmap
-	-$(QEMU) ./test-mmap
-	-$(QEMU) -p 8192 ./test-mmap 8192
-	-$(QEMU) -p 16384 ./test-mmap 16384
-	-$(QEMU) -p 32768 ./test-mmap 32768
 
 run-runcom: runcom
 	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
@@ -80,17 +70,10 @@ run-test_path: test_path
 
 # rules to compile tests
 
-test_path: test_path.o
-
-test_path.o: test_path.c
-
 hello-i386: hello-i386.c
 	$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
 	strip $@
 
-testthread: testthread.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
-
 # i386/x86_64 emulation test (test various opcodes) */
 test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
            test-i386.h test-i386-shift.h test-i386-muldiv.h
@@ -104,28 +87,14 @@ test-x86_64: test-i386.c \
            test-i386.h test-i386-shift.h test-i386-muldiv.h
 	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
 
-# generic Linux and CPU test
-linux-test: linux-test.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
-
 # vm86 test
 runcom: runcom.c
 	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
-test-mmap: test-mmap.c
-	$(CC_I386) -m32 $(CFLAGS) -Wall -O2 $(LDFLAGS) -o $@ $<
-
 # speed test
 sha1-i386: sha1.c
 	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
-sha1: sha1.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-speed: sha1 sha1-i386
-	time ./sha1
-	time $(QEMU) ./sha1-i386
-
 # arm test
 hello-arm: hello-arm.o
 	arm-linux-ld -o $@ $<
diff --git a/tests/tcg/README b/tests/tcg/README
index 5dcfb4852b..0890044cf0 100644
--- a/tests/tcg/README
+++ b/tests/tcg/README
@@ -1,9 +1,7 @@
-This directory contains various interesting programs for
-regression testing.
-
-The target "make test" runs the programs and, if applicable,
-runs "diff" to detect mismatches between output on the host and
-output on QEMU.
+This directory contains various interesting guest programs for
+regression testing. Tests are either multi-arch, meaning they can be
+built for all guest architectures that support linux-user executable,
+or they are architecture specific.
 
 i386
 ====
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
new file mode 100644
index 0000000000..a691fd59d3
--- /dev/null
+++ b/tests/tcg/multiarch/Makefile.target
@@ -0,0 +1,30 @@
+# -*- Mode: makefile -*-
+#
+# Multiarch Tests - included from tests/tcg/Makefile.target
+#
+# These tests are plain C and built without any architecture specific code.
+#
+
+MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
+
+# Set search path for all sources
+VPATH 		+= $(MULTIARCH_SRC)
+MULTIARCH_SRCS   =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
+MULTIARCH_TESTS  =$(MULTIARCH_SRCS:.c=)
+
+# Update TESTS
+TESTS		+=$(MULTIARCH_TESTS)
+
+#
+# The following are any additional rules needed to build things
+#
+
+testthread: LDFLAGS=-lpthread
+
+# Specialist Runners
+run-test-mmap: test-mmap
+	-$(QEMU) ./test-mmap
+	-$(QEMU) -p 8192 ./test-mmap 8192
+	-$(QEMU) -p 16384 ./test-mmap 16384
+	-$(QEMU) -p 32768 ./test-mmap 32768
+
diff --git a/tests/tcg/multiarch/README b/tests/tcg/multiarch/README
new file mode 100644
index 0000000000..522c9d2ea3
--- /dev/null
+++ b/tests/tcg/multiarch/README
@@ -0,0 +1 @@
+Multi-architecture linux-user tests
diff --git a/tests/tcg/linux-test.c b/tests/tcg/multiarch/linux-test.c
similarity index 100%
rename from tests/tcg/linux-test.c
rename to tests/tcg/multiarch/linux-test.c
diff --git a/tests/tcg/sha1.c b/tests/tcg/multiarch/sha1.c
similarity index 100%
rename from tests/tcg/sha1.c
rename to tests/tcg/multiarch/sha1.c
diff --git a/tests/tcg/test-mmap.c b/tests/tcg/multiarch/test-mmap.c
similarity index 100%
rename from tests/tcg/test-mmap.c
rename to tests/tcg/multiarch/test-mmap.c
diff --git a/tests/tcg/testthread.c b/tests/tcg/multiarch/testthread.c
similarity index 100%
rename from tests/tcg/testthread.c
rename to tests/tcg/multiarch/testthread.c
diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c
deleted file mode 100644
index 1c29bce263..0000000000
--- a/tests/tcg/test_path.c
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Test path override code */
-#include "config-host.h"
-#include "util/cutils.c"
-#include "util/hexdump.c"
-#include "util/iov.c"
-#include "util/path.c"
-#include "util/qemu-timer-common.c"
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-void qemu_log(const char *fmt, ...);
-
-/* Any log message kills the test. */
-void qemu_log(const char *fmt, ...)
-{
-    va_list ap;
-
-    fprintf(stderr, "FATAL: ");
-    va_start(ap, fmt);
-    vfprintf(stderr, fmt, ap);
-    va_end(ap);
-    exit(1);
-}
-
-#define NO_CHANGE(_path)						\
-	do {								\
-	    if (strcmp(path(_path), _path) != 0) return __LINE__;	\
-	} while(0)
-
-#define CHANGE_TO(_path, _newpath)					\
-	do {								\
-	    if (strcmp(path(_path), _newpath) != 0) return __LINE__;	\
-	} while(0)
-
-static void cleanup(void)
-{
-    unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE2");
-    unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE3");
-    unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE4");
-    unlink("/tmp/qemu-test_path/DIR1/DIR2/FILE5");
-    rmdir("/tmp/qemu-test_path/DIR1/DIR2");
-    rmdir("/tmp/qemu-test_path/DIR1/DIR3");
-    rmdir("/tmp/qemu-test_path/DIR1");
-    rmdir("/tmp/qemu-test_path");
-}
-
-static unsigned int do_test(void)
-{
-    if (mkdir("/tmp/qemu-test_path", 0700) != 0)
-	return __LINE__;
-
-    if (mkdir("/tmp/qemu-test_path/DIR1", 0700) != 0)
-	return __LINE__;
-
-    if (mkdir("/tmp/qemu-test_path/DIR1/DIR2", 0700) != 0)
-	return __LINE__;
-
-    if (mkdir("/tmp/qemu-test_path/DIR1/DIR3", 0700) != 0)
-	return __LINE__;
-
-    if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE", 0600)) != 0)
-	return __LINE__;
-
-    if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE2", 0600)) != 0)
-	return __LINE__;
-
-    if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE3", 0600)) != 0)
-	return __LINE__;
-
-    if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE4", 0600)) != 0)
-	return __LINE__;
-
-    if (close(creat("/tmp/qemu-test_path/DIR1/DIR2/FILE5", 0600)) != 0)
-	return __LINE__;
-
-    init_paths("/tmp/qemu-test_path");
-
-    NO_CHANGE("/tmp");
-    NO_CHANGE("/tmp/");
-    NO_CHANGE("/tmp/qemu-test_path");
-    NO_CHANGE("/tmp/qemu-test_path/");
-    NO_CHANGE("/tmp/qemu-test_path/D");
-    NO_CHANGE("/tmp/qemu-test_path/DI");
-    NO_CHANGE("/tmp/qemu-test_path/DIR");
-    NO_CHANGE("/tmp/qemu-test_path/DIR1");
-    NO_CHANGE("/tmp/qemu-test_path/DIR1/");
-
-    NO_CHANGE("/D");
-    NO_CHANGE("/DI");
-    NO_CHANGE("/DIR");
-    NO_CHANGE("/DIR2");
-    NO_CHANGE("/DIR1.");
-
-    CHANGE_TO("/DIR1", "/tmp/qemu-test_path/DIR1");
-    CHANGE_TO("/DIR1/", "/tmp/qemu-test_path/DIR1");
-
-    NO_CHANGE("/DIR1/D");
-    NO_CHANGE("/DIR1/DI");
-    NO_CHANGE("/DIR1/DIR");
-    NO_CHANGE("/DIR1/DIR1");
-
-    CHANGE_TO("/DIR1/DIR2", "/tmp/qemu-test_path/DIR1/DIR2");
-    CHANGE_TO("/DIR1/DIR2/", "/tmp/qemu-test_path/DIR1/DIR2");
-
-    CHANGE_TO("/DIR1/DIR3", "/tmp/qemu-test_path/DIR1/DIR3");
-    CHANGE_TO("/DIR1/DIR3/", "/tmp/qemu-test_path/DIR1/DIR3");
-
-    NO_CHANGE("/DIR1/DIR2/F");
-    NO_CHANGE("/DIR1/DIR2/FI");
-    NO_CHANGE("/DIR1/DIR2/FIL");
-    NO_CHANGE("/DIR1/DIR2/FIL.");
-
-    CHANGE_TO("/DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/DIR2/FILE2", "/tmp/qemu-test_path/DIR1/DIR2/FILE2");
-    CHANGE_TO("/DIR1/DIR2/FILE3", "/tmp/qemu-test_path/DIR1/DIR2/FILE3");
-    CHANGE_TO("/DIR1/DIR2/FILE4", "/tmp/qemu-test_path/DIR1/DIR2/FILE4");
-    CHANGE_TO("/DIR1/DIR2/FILE5", "/tmp/qemu-test_path/DIR1/DIR2/FILE5");
-
-    NO_CHANGE("/DIR1/DIR2/FILE6");
-    NO_CHANGE("/DIR1/DIR2/FILE/X");
-
-    CHANGE_TO("/DIR1/../DIR1", "/tmp/qemu-test_path/DIR1");
-    CHANGE_TO("/DIR1/../DIR1/", "/tmp/qemu-test_path/DIR1");
-    CHANGE_TO("/../DIR1", "/tmp/qemu-test_path/DIR1");
-    CHANGE_TO("/../DIR1/", "/tmp/qemu-test_path/DIR1");
-    CHANGE_TO("/DIR1/DIR2/../DIR2", "/tmp/qemu-test_path/DIR1/DIR2");
-    CHANGE_TO("/DIR1/DIR2/../DIR2/../../DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/DIR2/../DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-
-    NO_CHANGE("/DIR1/DIR2/../DIR1");
-    NO_CHANGE("/DIR1/DIR2/../FILE");
-
-    CHANGE_TO("/./DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/././DIR1/DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/./DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/././DIR2/FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/DIR1/DIR2/././FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-    CHANGE_TO("/./DIR1/./DIR2/./FILE", "/tmp/qemu-test_path/DIR1/DIR2/FILE");
-
-    return 0;
-}
-
-int main(int argc, char *argv[])
-{
-    int ret;
-
-    ret = do_test();
-    cleanup();
-    if (ret) {
-	fprintf(stderr, "test_path: failed on line %i\n", ret);
-	return 1;
-    }
-    return 0;
-}
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (11 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:20   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests Alex Bennée
                   ` (35 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

From: Fam Zheng <famz@redhat.com>

To keep the compiler happy, and to fit in our buildsys flags:

- Make local functions "static"
- #ifdef out unused functions
- drop cutils/osdep dependencies

Signed-off-by: Fam Zheng <famz@redhat.com>
[AJB: drop cutils/osdep dependencies]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/tcg/multiarch/linux-test.c | 68 ++++++++++----------------------
 1 file changed, 21 insertions(+), 47 deletions(-)

diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c
index 5070d31446..4457bd04ba 100644
--- a/tests/tcg/multiarch/linux-test.c
+++ b/tests/tcg/multiarch/linux-test.c
@@ -16,7 +16,6 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
-#define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -31,6 +30,7 @@
 #include <utime.h>
 #include <time.h>
 #include <sys/time.h>
+#include <sys/resource.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -39,13 +39,12 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
-#include "qemu/cutils.h"
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
 #define STACK_SIZE 16384
 
-void error1(const char *filename, int line, const char *fmt, ...)
+static void error1(const char *filename, int line, const char *fmt, ...)
 {
     va_list ap;
     va_start(ap, fmt);
@@ -56,7 +55,7 @@ void error1(const char *filename, int line, const char *fmt, ...)
     exit(1);
 }
 
-int __chk_error(const char *filename, int line, int ret)
+static int __chk_error(const char *filename, int line, int ret)
 {
     if (ret < 0) {
         error1(filename, line, "%m (ret=%d, errno=%d)",
@@ -73,7 +72,7 @@ int __chk_error(const char *filename, int line, int ret)
 
 #define FILE_BUF_SIZE 300
 
-void test_file(void)
+static void test_file(void)
 {
     int fd, i, len, ret;
     uint8_t buf[FILE_BUF_SIZE];
@@ -210,7 +209,7 @@ void test_file(void)
     chk_error(rmdir(TESTPATH));
 }
 
-void test_fork(void)
+static void test_fork(void)
 {
     int pid, status;
 
@@ -224,7 +223,7 @@ void test_fork(void)
         error("waitpid status=0x%x", status);
 }
 
-void test_time(void)
+static void test_time(void)
 {
     struct timeval tv, tv2;
     struct timespec ts, rem;
@@ -251,34 +250,7 @@ void test_time(void)
         error("getrusage");
 }
 
-void pstrcpy(char *buf, int buf_size, const char *str)
-{
-    int c;
-    char *q = buf;
-
-    if (buf_size <= 0)
-        return;
-
-    for(;;) {
-        c = *str++;
-        if (c == 0 || q >= buf + buf_size - 1)
-            break;
-        *q++ = c;
-    }
-    *q = '\0';
-}
-
-/* strcat and truncate. */
-char *pstrcat(char *buf, int buf_size, const char *s)
-{
-    int len;
-    len = strlen(buf);
-    if (len < buf_size)
-        pstrcpy(buf + len, buf_size - len, s);
-    return buf;
-}
-
-int server_socket(void)
+static int server_socket(void)
 {
     int val, fd;
     struct sockaddr_in sockaddr;
@@ -298,7 +270,7 @@ int server_socket(void)
 
 }
 
-int client_socket(void)
+static int client_socket(void)
 {
     int fd;
     struct sockaddr_in sockaddr;
@@ -312,9 +284,9 @@ int client_socket(void)
     return fd;
 }
 
-const char socket_msg[] = "hello socket\n";
+static const char socket_msg[] = "hello socket\n";
 
-void test_socket(void)
+static void test_socket(void)
 {
     int server_fd, client_fd, fd, pid, ret, val;
     struct sockaddr_in sockaddr;
@@ -348,9 +320,10 @@ void test_socket(void)
     chk_error(close(server_fd));
 }
 
+#if 0
 #define WCOUNT_MAX 512
 
-void test_pipe(void)
+static void test_pipe(void)
 {
     fd_set rfds, wfds;
     int fds[2], fd_max, ret;
@@ -391,10 +364,10 @@ void test_pipe(void)
     chk_error(close(fds[1]));
 }
 
-int thread1_res;
-int thread2_res;
+static int thread1_res;
+static int thread2_res;
 
-int thread1_func(void *arg)
+static int thread1_func(void *arg)
 {
     int i;
     for(i=0;i<5;i++) {
@@ -404,7 +377,7 @@ int thread1_func(void *arg)
     return 0;
 }
 
-int thread2_func(void *arg)
+static int thread2_func(void *arg)
 {
     int i;
     for(i=0;i<6;i++) {
@@ -435,27 +408,28 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
+#endif
 
 /***********************************/
 
 volatile int alarm_count;
 jmp_buf jmp_env;
 
-void sig_alarm(int sig)
+static void sig_alarm(int sig)
 {
     if (sig != SIGALRM)
         error("signal");
     alarm_count++;
 }
 
-void sig_segv(int sig, siginfo_t *info, void *puc)
+static void sig_segv(int sig, siginfo_t *info, void *puc)
 {
     if (sig != SIGSEGV)
         error("signal");
     longjmp(jmp_env, 1);
 }
 
-void test_signal(void)
+static void test_signal(void)
 {
     struct sigaction act;
     struct itimerval it, oit;
@@ -510,7 +484,7 @@ void test_signal(void)
 
 #define SHM_SIZE 32768
 
-void test_shm(void)
+static void test_shm(void)
 {
     void *ptr;
     int shmid;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (12 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:22   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 15/43] tests/tcg: move i386 specific tests into subdir Alex Bennée
                   ` (34 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Un-comment the remaining tests. I removed the itimer value tests
because I'm fairly sure a re-arming timer will always have a different
value in it when you grab it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/multiarch/linux-test.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c
index 4457bd04ba..519b0ac653 100644
--- a/tests/tcg/multiarch/linux-test.c
+++ b/tests/tcg/multiarch/linux-test.c
@@ -16,6 +16,7 @@
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
+#define _GNU_SOURCE
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -39,6 +40,7 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
+#include <sched.h>
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
@@ -58,8 +60,8 @@ static void error1(const char *filename, int line, const char *fmt, ...)
 static int __chk_error(const char *filename, int line, int ret)
 {
     if (ret < 0) {
-        error1(filename, line, "%m (ret=%d, errno=%d)",
-               ret, errno);
+        error1(filename, line, "%m (ret=%d, errno=%d/%s)",
+               ret, errno, strerror(errno));
     }
     return ret;
 }
@@ -320,7 +322,6 @@ static void test_socket(void)
     chk_error(close(server_fd));
 }
 
-#if 0
 #define WCOUNT_MAX 512
 
 static void test_pipe(void)
@@ -355,7 +356,7 @@ static void test_pipe(void)
             }
             if (FD_ISSET(fds[1], &wfds)) {
                 ch = 'a';
-                chk_error(write(fds[0], &ch, 1));
+                chk_error(write(fds[1], &ch, 1));
                 wcount++;
             }
         }
@@ -408,7 +409,6 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
-#endif
 
 /***********************************/
 
@@ -449,12 +449,10 @@ static void test_signal(void)
     it.it_value.tv_usec = 10 * 1000;
     chk_error(setitimer(ITIMER_REAL, &it, NULL));
     chk_error(getitimer(ITIMER_REAL, &oit));
-    if (oit.it_value.tv_sec != it.it_value.tv_sec ||
-        oit.it_value.tv_usec != it.it_value.tv_usec)
-        error("itimer");
 
     while (alarm_count < 5) {
         usleep(10 * 1000);
+        getitimer(ITIMER_REAL, &oit);
     }
 
     it.it_interval.tv_sec = 0;
@@ -463,9 +461,6 @@ static void test_signal(void)
     it.it_value.tv_usec = 0;
     memset(&oit, 0xff, sizeof(oit));
     chk_error(setitimer(ITIMER_REAL, &it, &oit));
-    if (oit.it_value.tv_sec != 0 ||
-        oit.it_value.tv_usec != 10 * 1000)
-        error("setitimer");
 
     /* SIGSEGV test */
     act.sa_sigaction = sig_segv;
@@ -503,10 +498,11 @@ static void test_shm(void)
 int main(int argc, char **argv)
 {
     test_file();
+    test_pipe();
     test_fork();
     test_time();
     test_socket();
-    //    test_clone();
+    test_clone();
     test_signal();
     test_shm();
     return 0;
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 15/43] tests/tcg: move i386 specific tests into subdir
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (13 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image Alex Bennée
                   ` (33 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

These only need to be built for i386 guests. This includes a stub
tests/tcg/i386/Makfile.target which absorbs some of what was in
tests/tcg/Makefile.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2
  - move VPATH and TESTs setup into i386/Makefile.target
  - set CFLAGS+=-m32 for cross building
---
 tests/tcg/README                        |  39 ------------------------
 tests/tcg/i386/Makefile.target          |  30 ++++++++++++++++++
 tests/tcg/i386/README                   |  38 +++++++++++++++++++++++
 tests/tcg/{ => i386}/hello-i386.c       |   0
 tests/tcg/{ => i386}/pi_10.com          | Bin
 tests/tcg/{ => i386}/runcom.c           |   0
 tests/tcg/{ => i386}/test-i386-code16.S |   0
 tests/tcg/{ => i386}/test-i386-fprem.c  |   0
 tests/tcg/{ => i386}/test-i386-muldiv.h |   0
 tests/tcg/{ => i386}/test-i386-shift.h  |   0
 tests/tcg/{ => i386}/test-i386-ssse3.c  |   0
 tests/tcg/{ => i386}/test-i386-vm86.S   |   0
 tests/tcg/{ => i386}/test-i386.c        |   0
 tests/tcg/{ => i386}/test-i386.h        |   0
 14 files changed, 68 insertions(+), 39 deletions(-)
 create mode 100644 tests/tcg/i386/Makefile.target
 create mode 100644 tests/tcg/i386/README
 rename tests/tcg/{ => i386}/hello-i386.c (100%)
 rename tests/tcg/{ => i386}/pi_10.com (100%)
 rename tests/tcg/{ => i386}/runcom.c (100%)
 rename tests/tcg/{ => i386}/test-i386-code16.S (100%)
 rename tests/tcg/{ => i386}/test-i386-fprem.c (100%)
 rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%)
 rename tests/tcg/{ => i386}/test-i386-shift.h (100%)
 rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%)
 rename tests/tcg/{ => i386}/test-i386-vm86.S (100%)
 rename tests/tcg/{ => i386}/test-i386.c (100%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)

diff --git a/tests/tcg/README b/tests/tcg/README
index 0890044cf0..469504c4cb 100644
--- a/tests/tcg/README
+++ b/tests/tcg/README
@@ -3,45 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be
 built for all guest architectures that support linux-user executable,
 or they are architecture specific.
 
-i386
-====
-
-test-i386
----------
-
-This program executes most of the 16 bit and 32 bit x86 instructions and
-generates a text output, for comparison with the output obtained with
-a real CPU or another emulator.
-
-The Linux system call modify_ldt() is used to create x86 selectors
-to test some 16 bit addressing and 32 bit with segmentation cases.
-
-The Linux system call vm86() is used to test vm86 emulation.
-
-Various exceptions are raised to test most of the x86 user space
-exception reporting.
-
-linux-test
-----------
-
-This program tests various Linux system calls. It is used to verify
-that the system call parameters are correctly converted between target
-and host CPUs.
-
-test-i386-fprem
----------------
-
-runcom
-------
-
-test-mmap
----------
-
-sha1
-----
-
-hello-i386
-----------
 
 
 ARM
diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
new file mode 100644
index 0000000000..2f27b65e2d
--- /dev/null
+++ b/tests/tcg/i386/Makefile.target
@@ -0,0 +1,30 @@
+# i386 cross compile notes
+
+I386_SRC=$(SRC_PATH)/tests/tcg/i386
+
+# Set search path for all sources
+VPATH 		+= $(I386_SRC)
+
+I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
+I386_TESTS=$(I386_SRCS:.c=)
+
+# Update TESTS
+TESTS+=$(I386_TESTS)
+
+ifneq ($(TARGET_NAME),x86_64)
+CFLAGS+=-m32
+endif
+
+#
+# hello-i386 is a barebones app
+#
+hello-i386: CFLAGS+=-ffreestanding
+hello-i386: LDFLAGS+=-nostdlib
+
+#
+# test-386 includes a couple of additional objects that need to be linked together
+#
+
+test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S test-i386.h test-i386-shift.h test-i386-muldiv.h
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ \
+	   $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
diff --git a/tests/tcg/i386/README b/tests/tcg/i386/README
new file mode 100644
index 0000000000..7a0a47bf27
--- /dev/null
+++ b/tests/tcg/i386/README
@@ -0,0 +1,38 @@
+These are i386 specific guest programs
+
+test-i386
+---------
+
+This program executes most of the 16 bit and 32 bit x86 instructions and
+generates a text output, for comparison with the output obtained with
+a real CPU or another emulator.
+
+The Linux system call modify_ldt() is used to create x86 selectors
+to test some 16 bit addressing and 32 bit with segmentation cases.
+
+The Linux system call vm86() is used to test vm86 emulation.
+
+Various exceptions are raised to test most of the x86 user space
+exception reporting.
+
+linux-test
+----------
+
+This program tests various Linux system calls. It is used to verify
+that the system call parameters are correctly converted between target
+and host CPUs.
+
+test-i386-fprem
+---------------
+
+runcom
+------
+
+test-mmap
+---------
+
+sha1
+----
+
+hello-i386
+----------
diff --git a/tests/tcg/hello-i386.c b/tests/tcg/i386/hello-i386.c
similarity index 100%
rename from tests/tcg/hello-i386.c
rename to tests/tcg/i386/hello-i386.c
diff --git a/tests/tcg/pi_10.com b/tests/tcg/i386/pi_10.com
similarity index 100%
rename from tests/tcg/pi_10.com
rename to tests/tcg/i386/pi_10.com
diff --git a/tests/tcg/runcom.c b/tests/tcg/i386/runcom.c
similarity index 100%
rename from tests/tcg/runcom.c
rename to tests/tcg/i386/runcom.c
diff --git a/tests/tcg/test-i386-code16.S b/tests/tcg/i386/test-i386-code16.S
similarity index 100%
rename from tests/tcg/test-i386-code16.S
rename to tests/tcg/i386/test-i386-code16.S
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c
similarity index 100%
rename from tests/tcg/test-i386-fprem.c
rename to tests/tcg/i386/test-i386-fprem.c
diff --git a/tests/tcg/test-i386-muldiv.h b/tests/tcg/i386/test-i386-muldiv.h
similarity index 100%
rename from tests/tcg/test-i386-muldiv.h
rename to tests/tcg/i386/test-i386-muldiv.h
diff --git a/tests/tcg/test-i386-shift.h b/tests/tcg/i386/test-i386-shift.h
similarity index 100%
rename from tests/tcg/test-i386-shift.h
rename to tests/tcg/i386/test-i386-shift.h
diff --git a/tests/tcg/test-i386-ssse3.c b/tests/tcg/i386/test-i386-ssse3.c
similarity index 100%
rename from tests/tcg/test-i386-ssse3.c
rename to tests/tcg/i386/test-i386-ssse3.c
diff --git a/tests/tcg/test-i386-vm86.S b/tests/tcg/i386/test-i386-vm86.S
similarity index 100%
rename from tests/tcg/test-i386-vm86.S
rename to tests/tcg/i386/test-i386-vm86.S
diff --git a/tests/tcg/test-i386.c b/tests/tcg/i386/test-i386.c
similarity index 100%
rename from tests/tcg/test-i386.c
rename to tests/tcg/i386/test-i386.c
diff --git a/tests/tcg/test-i386.h b/tests/tcg/i386/test-i386.h
similarity index 100%
rename from tests/tcg/test-i386.h
rename to tests/tcg/i386/test-i386.h
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (14 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 15/43] tests/tcg: move i386 specific tests into subdir Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386 Alex Bennée
                   ` (32 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

From: Fam Zheng <famz@redhat.com>

It has some basic *-devel.i686 packages to be used with "gcc -m32" as a
32 bit cross build environment.

Signed-off-by: Fam Zheng <famz@redhat.com>
[AJB: add glibc-static]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
v2
  - include static glibc package as well
---
 tests/docker/dockerfiles/fedora-i386-cross.docker | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker

diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker
new file mode 100644
index 0000000000..8fbef2fa53
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora-i386-cross.docker
@@ -0,0 +1,14 @@
+FROM fedora:latest
+ENV PACKAGES \
+    gcc \
+    glibc-static.i686 \
+    glibc-devel.i686 \
+    glib2-devel.i686 \
+    zlib-devel.i686 \
+    glib2-devel.i686 \
+    nettle-devel.i686 \
+    pixman-devel.i686 \
+    gnutls-devel.i686
+
+RUN dnf install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (15 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386 Alex Bennée
                   ` (31 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

While you can construct a compile command that does work using the
x86_64 host compiler that most people use this is flakey. Different
distros handle this is different ways so we default to using a known
good i386 compiler via docker.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/Makefile.include | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 tests/tcg/i386/Makefile.include

diff --git a/tests/tcg/i386/Makefile.include b/tests/tcg/i386/Makefile.include
new file mode 100644
index 0000000000..be1c3008dd
--- /dev/null
+++ b/tests/tcg/i386/Makefile.include
@@ -0,0 +1,9 @@
+#
+# Makefile.include for all i386
+#
+# There is enough brokeness in x86_64 compilers that we don't default
+# to using the x86_64 system compiler for i386 binaries.
+#
+
+DOCKER_IMAGE=fedora-i386-cross
+DOCKER_CROSS_COMPILER=gcc
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (16 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:25   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386 Alex Bennée
                   ` (30 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel

From: Fam Zheng <famz@redhat.com>

We have -Werror=missing-prototype, add a dummy prototype to avoid that
warning.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 tests/tcg/i386/hello-i386.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c
index fa00380de2..cfeb24b2f5 100644
--- a/tests/tcg/i386/hello-i386.c
+++ b/tests/tcg/i386/hello-i386.c
@@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len)
   return status;
 }
 
+void _start(void);
 void _start(void)
 {
     write(1, "Hello World\n", 12);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (17 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:26   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 20/43] tests/tcg/i386: fix test-i386-fprem Alex Bennée
                   ` (29 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

The test-i386 test case is a little special as it includes assembler
files. Add the additional compile magic to assemble these bits and
link them to the final binary.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/tcg/i386/test-i386.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index 9599204895..cae6a7773a 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -17,7 +17,6 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #define _GNU_SOURCE
-#include "qemu/compiler.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 20/43] tests/tcg/i386: fix test-i386-fprem
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (18 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse Alex Bennée
                   ` (28 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Remove dependencies on QEMU's source tree and build directly.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/test-i386-fprem.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c
index 1a71623204..66f5a9657d 100644
--- a/tests/tcg/i386/test-i386-fprem.c
+++ b/tests/tcg/i386/test-i386-fprem.c
@@ -23,7 +23,10 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "qemu/osdep.h"
+#include <stdio.h>
+#include <stdint.h>
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 /*
  * Inspired by <ieee754.h>'s union ieee854_long_double, but with single
@@ -39,7 +42,7 @@ union float80u {
         unsigned int exponent:15;
         unsigned int negative:1;
         unsigned int empty:16;
-    } QEMU_PACKED ieee;
+    } __attribute__((packed)) ieee;
 
     /* This is for NaNs in the IEEE 854 double-extended-precision format.  */
     struct {
@@ -49,7 +52,7 @@ union float80u {
         unsigned int exponent:15;
         unsigned int negative:1;
         unsigned int empty:16;
-    } QEMU_PACKED ieee_nan;
+    } __attribute__((packed)) ieee_nan;
 };
 
 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff
@@ -229,6 +232,7 @@ static void test_fprem_cases(void)
     do_fprem_stack_underflow();
 
     printf("= invalid operation =\n");
+    do_fprem(q_nan.d, 1.0);
     do_fprem(s_nan.d, 1.0);
     do_fprem(1.0, 0.0);
     do_fprem(pos_inf.d, 1.0);
@@ -238,6 +242,8 @@ static void test_fprem_cases(void)
     do_fprem(pos_denorm.d, 1.0);
     do_fprem(1.0, pos_denorm.d);
 
+    do_fprem(smallest_positive_norm.d, smallest_positive_norm.d);
+
     /* printf("= underflow =\n"); */
     /* TODO: Is there a case where FPREM raises underflow? */
 }
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (19 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 20/43] tests/tcg/i386: fix test-i386-fprem Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target Alex Bennée
                   ` (27 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

It doesn't build for i386 easily and we probably need a better more
methodical test for SSE et all in QEMU.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/Makefile.target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index 2f27b65e2d..a6cc76664c 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -9,7 +9,7 @@ I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
 I386_TESTS=$(I386_SRCS:.c=)
 
 # Update TESTS
-TESTS+=$(I386_TESTS)
+TESTS+=$(I386_ONLY_TESTS)
 
 ifneq ($(TARGET_NAME),x86_64)
 CFLAGS+=-m32
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (20 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes Alex Bennée
                   ` (26 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

The sources for x86_64 are shared in the i386 directory which will be
included thanks to TARGET_BASE_ARCH. However not all sources build so
we need to filter out the ones we can't build in the 64 bit world.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/Makefile.target   |  2 +-
 tests/tcg/x86_64/Makefile.target | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/x86_64/Makefile.target

diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index a6cc76664c..3a2736616c 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -7,7 +7,7 @@ VPATH 		+= $(I386_SRC)
 
 I386_SRCS=$(notdir $(wildcard $(I386_SRC)/*.c))
 I386_TESTS=$(I386_SRCS:.c=)
-
+I386_ONLY_TESTS=$(filter-out test-i386-ssse3, $(I386_TESTS))
 # Update TESTS
 TESTS+=$(I386_ONLY_TESTS)
 
diff --git a/tests/tcg/x86_64/Makefile.target b/tests/tcg/x86_64/Makefile.target
new file mode 100644
index 0000000000..74f170b9ed
--- /dev/null
+++ b/tests/tcg/x86_64/Makefile.target
@@ -0,0 +1,15 @@
+# -*- Mode: makefile -*-
+#
+# x86_64 tests - included from tests/tcg/Makefile.target
+#
+# Currently we only build test-x86_64 and test-i386-ssse3 from
+# $(SRC)/tests/tcg/i386/
+#
+
+X86_64_TESTS=$(filter-out $(I386_ONLY_TESTS), $(TESTS))
+X86_64_TESTS+=test-x86_64
+TESTS:=$(X86_64_TESTS)
+
+test-x86_64: LDFLAGS+=-lm -lc
+test-x86_64: test-i386.c test-i386.h test-i386-shift.h test-i386-muldiv.h
+	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (21 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:27   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format Alex Bennée
                   ` (25 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

The compiler complains about the old __mode__ style attributes.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/test-i386.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index cae6a7773a..caef4da176 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -2106,8 +2106,8 @@ static void test_enter(void)
 
 #ifdef TEST_SSE
 
-typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
-typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
+typedef int __m64 __attribute__ ((vector_size(8)));
+typedef float __m128 __attribute__ ((vector_size(16)));
 
 typedef union {
     double d[2];
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (22 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:28   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir Alex Bennée
                   ` (24 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/i386/test-i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index caef4da176..a29b41e764 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -2258,7 +2258,7 @@ SSE_OP(a ## sd);
         "pop %0\n"\
         : "=rm" (eflags)\
         : "x" (a.dq), "x" (b.dq));\
-    printf("%-9s: a=%f b=%f cc=%04x\n",\
+    printf("%-9s: a=%f b=%f cc=%04lx\n",\
            #op, a1, b1,\
            eflags & (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A));\
 }
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (23 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:29   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test Alex Bennée
                   ` (23 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

These only need to be built for ARM guests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2
  - do VPATH manipulation in tests/tcg/arm/Makefile.target
  - merge with fix hello-arm test
---
 tests/tcg/README                      |  9 ---------
 tests/tcg/arm/Makefile.target         | 13 +++++++++++++
 tests/tcg/arm/README                  | 11 +++++++++++
 tests/tcg/{ => arm}/hello-arm.c       |  0
 tests/tcg/{ => arm}/test-arm-iwmmxt.s |  0
 5 files changed, 24 insertions(+), 9 deletions(-)
 create mode 100644 tests/tcg/arm/Makefile.target
 create mode 100644 tests/tcg/arm/README
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)

diff --git a/tests/tcg/README b/tests/tcg/README
index 469504c4cb..625f2326e6 100644
--- a/tests/tcg/README
+++ b/tests/tcg/README
@@ -5,15 +5,6 @@ or they are architecture specific.
 
 
 
-ARM
-===
-
-hello-arm
----------
-
-test-arm-iwmmxt
----------------
-
 MIPS
 ====
 
diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target
new file mode 100644
index 0000000000..bc6962ecc6
--- /dev/null
+++ b/tests/tcg/arm/Makefile.target
@@ -0,0 +1,13 @@
+# -*- Mode: makefile -*-
+#
+# ARM - included from tests/tcg/Makefile.target
+#
+
+ARM_SRC=$(SRC_PATH)/tests/tcg/arm
+
+# Set search path for all sources
+VPATH 		+= $(ARM_SRC)
+
+
+hello-arm: CFLAGS+=-marm -ffreestanding
+hello-arm: LDFLAGS+=-nostdlib
diff --git a/tests/tcg/arm/README b/tests/tcg/arm/README
new file mode 100644
index 0000000000..e6307116e2
--- /dev/null
+++ b/tests/tcg/arm/README
@@ -0,0 +1,11 @@
+These are ARM specific guest programs
+
+hello-arm
+---------
+
+A very simple inline assembly, write syscall based hello world
+
+test-arm-iwmmxt
+---------------
+
+A simple test case for older iwmmxt extended ARMs
diff --git a/tests/tcg/hello-arm.c b/tests/tcg/arm/hello-arm.c
similarity index 100%
rename from tests/tcg/hello-arm.c
rename to tests/tcg/arm/hello-arm.c
diff --git a/tests/tcg/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.s
similarity index 100%
rename from tests/tcg/test-arm-iwmmxt.s
rename to tests/tcg/arm/test-arm-iwmmxt.s
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (24 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:32   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target Alex Bennée
                   ` (22 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

We need to rename the source file to a .S so we can do a single-line
assemble and link invocation. We also specify the additional CFLAGS
for the compile as it's a non-standard ARM binary.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/arm/Makefile.target                          | 5 +++++
 tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} | 0
 2 files changed, 5 insertions(+)
 rename tests/tcg/arm/{test-arm-iwmmxt.s => test-arm-iwmmxt.S} (100%)

diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target
index bc6962ecc6..be9d3fb4a1 100644
--- a/tests/tcg/arm/Makefile.target
+++ b/tests/tcg/arm/Makefile.target
@@ -8,6 +8,11 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm
 # Set search path for all sources
 VPATH 		+= $(ARM_SRC)
 
+TESTS += hello-arm test-arm-iwmmxt
 
 hello-arm: CFLAGS+=-marm -ffreestanding
 hello-arm: LDFLAGS+=-nostdlib
+
+test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
+test-arm-iwmmxt: test-arm-iwmmxt.S
+	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
diff --git a/tests/tcg/arm/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.S
similarity index 100%
rename from tests/tcg/arm/test-arm-iwmmxt.s
rename to tests/tcg/arm/test-arm-iwmmxt.S
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (25 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64 Alex Bennée
                   ` (21 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Nothing much here yet.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/aarch64/Makefile.target | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 tests/tcg/aarch64/Makefile.target

diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
new file mode 100644
index 0000000000..4ac8fbe73f
--- /dev/null
+++ b/tests/tcg/aarch64/Makefile.target
@@ -0,0 +1,5 @@
+# -*- Mode: makefile -*-
+#
+# AArch64 specific tweaks
+
+fcvt: LDFLAGS+=-lm
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (26 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test Alex Bennée
                   ` (20 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This runs through the usual float to float conversions and crucially
also runs with ARM Alternative Half Precision Format.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/aarch64/Makefile.target |    8 +
 tests/tcg/aarch64/fcvt.c          |  260 ++++++
 tests/tcg/aarch64/fcvt.out        | 1305 +++++++++++++++++++++++++++++
 tests/tcg/arm/Makefile.target     |    4 +-
 4 files changed, 1576 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/aarch64/fcvt.c
 create mode 100644 tests/tcg/aarch64/fcvt.out

diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 4ac8fbe73f..26be1c58ef 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -2,4 +2,12 @@
 #
 # AArch64 specific tweaks
 
+AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
+VPATH 		+= $(AARCH64_SRC)
+
+# we don't build any of the ARM tests
+AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
+AARCH64_TESTS+=fcvt
+TESTS:=$(AARCH64_TESTS)
+
 fcvt: LDFLAGS+=-lm
diff --git a/tests/tcg/aarch64/fcvt.c b/tests/tcg/aarch64/fcvt.c
new file mode 100644
index 0000000000..e8d322e0bd
--- /dev/null
+++ b/tests/tcg/aarch64/fcvt.c
@@ -0,0 +1,260 @@
+/*
+ * Test Floating Point Conversion
+ */
+
+#include <stdio.h>
+#include <inttypes.h>
+#include <math.h>
+#include <float.h>
+#include <fenv.h>
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+static char flag_str[256];
+
+static char *get_flag_state(int flags)
+{
+    if (flags) {
+        snprintf(flag_str, sizeof(flag_str), "%s %s %s %s %s",
+                 flags & FE_OVERFLOW ? "OVERFLOW" : "",
+                 flags & FE_UNDERFLOW ? "UNDERFLOW" : "",
+                 flags & FE_DIVBYZERO ? "DIV0" : "",
+                 flags & FE_INEXACT ? "INEXACT" : "",
+                 flags & FE_INVALID ? "INVALID" : "");
+    } else {
+        snprintf(flag_str, sizeof(flag_str), "OK");
+    }
+
+    return flag_str;
+}
+
+static void print_double_number(int i, double num)
+{
+    uint64_t double_as_hex = *(uint64_t *) &num;
+    int flags = fetestexcept(FE_ALL_EXCEPT);
+    char *fstr = get_flag_state(flags);
+
+    printf("%02d DOUBLE: %02.20e / %#020lx  (%#x => %s)\n",
+           i, num, double_as_hex, flags, fstr);
+}
+
+static void print_single_number(int i, float num)
+{
+    uint32_t single_as_hex = *(uint32_t *) &num;
+    int flags = fetestexcept(FE_ALL_EXCEPT);
+    char *fstr = get_flag_state(flags);
+
+    printf("%02d SINGLE: %02.20e / %#010x  (%#x => %s)\n",
+           i, num, single_as_hex, flags, fstr);
+}
+
+static void print_half_number(int i, uint16_t num)
+{
+    int flags = fetestexcept(FE_ALL_EXCEPT);
+    char *fstr = get_flag_state(flags);
+
+    printf("%02d   HALF: %#04x  (%#x => %s)\n",
+           i, num, flags, fstr);
+}
+
+float single_numbers[] = { -FLT_MAX, -FLT_MIN,
+                           0.0,
+                           FLT_MIN,
+                           1.0, 2.0,
+                           M_E, M_PI,
+                           0x9EA82A22,
+                           0xAB98FBA8,
+                           FLT_MAX };
+
+static void convert_single_to_half(void)
+{
+    int i;
+
+    printf("Converting single-precision to half-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) {
+        float input = single_numbers[i];
+        uint16_t output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_single_number(i, input);
+        asm("fcvt %h0, %d1" : "=w" (output) : "x" (input));
+        print_half_number(i, output);
+    }
+}
+
+static void convert_single_to_double(void)
+{
+    int i;
+
+    printf("Converting single-precision to double-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) {
+        float input = single_numbers[i];
+        uint64_t output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_single_number(i, input);
+        asm("fcvt %h0, %d1" : "=w" (output) : "x" (input));
+        print_double_number(i, output);
+    }
+}
+
+double double_numbers[] = { -DBL_MAX,
+                            -2.0, -1.0,
+                            -DBL_MIN,
+                            0.0,
+                            DBL_MIN,
+                            1.0, 2.0,
+                            M_E, M_PI,
+                            0x9EA82A2287680UL,
+                            0xAB98FBA843210UL,
+                            DBL_MAX };
+
+static void convert_double_to_half(void)
+{
+    int i;
+
+    printf("Converting double-precision to half-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) {
+        double input = double_numbers[i];
+        uint16_t output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_double_number(i, input);
+
+        /* as we don't have _Float16 support */
+        asm("fcvt %h0, %d1" : "=w" (output) : "x" (input));
+        print_half_number(i, output);
+    }
+}
+
+static void convert_double_to_single(void)
+{
+    int i;
+
+    printf("Converting double-precision to single-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(single_numbers); ++i) {
+        double input = double_numbers[i];
+        uint32_t output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_double_number(i, input);
+
+        asm("fcvt %s0, %d1" : "=w" (output) : "x" (input));
+
+        print_single_number(i, output);
+    }
+}
+
+/* no handy defines for these numbers */
+uint16_t half_numbers[] = {
+    0xffff, /* -NaN / AHP -Max */
+    0xfcff, /* -NaN / AHP */
+    0xfc01, /* -NaN / AHP */
+    0xfc00, /* -Inf */
+    0xfbff, /* -Max */
+    0xc000, /* -2 */
+    0xbc00, /* -1 */
+    0x8001, /* -MIN subnormal */
+    0x8000, /* -0 */
+    0x0000, /* +0 */
+    0x0001, /* MIN subnormal */
+    0x3c00, /* 1 */
+    0x7bff, /* Max */
+    0x7c00, /* Inf */
+    0x7c01, /* NaN / AHP */
+    0x7cff, /* NaN / AHP */
+    0x7fff, /* NaN / AHP +Max*/
+};
+
+static void convert_half_to_double(void)
+{
+    int i;
+
+    printf("Converting half-precision to double-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(half_numbers); ++i) {
+        uint16_t input = half_numbers[i];
+        double output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_half_number(i, input);
+        asm("fcvt %d0, %h1" : "=w" (output) : "x" (input));
+        print_double_number(i, output);
+    }
+}
+
+static void convert_half_to_single(void)
+{
+    int i;
+
+    printf("Converting half-precision to single-precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(half_numbers); ++i) {
+        uint16_t input = half_numbers[i];
+        float output;
+
+        feclearexcept(FE_ALL_EXCEPT);
+
+        print_half_number(i, input);
+        asm("fcvt %s0, %h1" : "=w" (output) : "x" (input));
+        print_single_number(i, output);
+    }
+}
+
+typedef struct {
+    int flag;
+    char *desc;
+} float_mapping;
+
+float_mapping round_flags[] = {
+    { FE_TONEAREST, "to nearest" },
+    { FE_UPWARD, "upwards" },
+    { FE_DOWNWARD, "downwards" },
+    { FE_TOWARDZERO, "to zero" }
+};
+
+int main(int argc, char *argv[argc])
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(round_flags); ++i) {
+        fesetround(round_flags[i].flag);
+        printf("### Rounding %s\n", round_flags[i].desc);
+        convert_single_to_half();
+        convert_single_to_double();
+        convert_double_to_half();
+        convert_double_to_single();
+        convert_half_to_single();
+        convert_half_to_double();
+    }
+
+    /* And now with ARM alternative FP16 */
+    asm("msr fpsr, x1\n\t"
+        "orr x1, x1, %[flags]\n\t"
+        "mrs x1, fpsr\n\t"
+        : /* no output */ : [flags] "n" (1 << 26) : "x1" );
+
+    printf("#### Enabling ARM Alternative Half Precision\n");
+
+    for (i = 0; i < ARRAY_SIZE(round_flags); ++i) {
+        fesetround(round_flags[i].flag);
+        printf("### Rounding %s\n", round_flags[i].desc);
+        convert_single_to_half();
+        convert_single_to_double();
+        convert_double_to_half();
+        convert_double_to_single();
+        convert_half_to_single();
+        convert_half_to_double();
+    }
+
+    return 0;
+}
diff --git a/tests/tcg/aarch64/fcvt.out b/tests/tcg/aarch64/fcvt.out
new file mode 100644
index 0000000000..48e62ac955
--- /dev/null
+++ b/tests/tcg/aarch64/fcvt.out
@@ -0,0 +1,1305 @@
+### Rounding to nearest
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fc00  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x00004170  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007c00  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding upwards
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fbff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x00004170  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004249  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007c00  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518144000000000000e+09 / 0x4eb23d51  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding downwards
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fc00  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008001  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x0000416f  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007bff  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding to zero
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fbff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x0000416f  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007bff  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+#### Enabling ARM Alternative Half Precision
+### Rounding to nearest
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fc00  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x00004170  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007c00  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding upwards
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750797e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324219e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859812e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fbff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0x00000001  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x00004170  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004249  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007c00  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138310e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509080e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675456000000000000e+09 / 0x4e805bf1  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311600e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07853004800000000000e+09 / 0x4e809220  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518144000000000000e+09 / 0x4eb23d51  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding downwards
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859812e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750797e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fc00  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008001  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x0000416f  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007bff  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570815e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657868800000000000e+09 / 0x4f7f8000  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138310e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+### Rounding to zero
+Converting single-precision to half-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02   HALF: 0000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting single-precision to double-precision
+00 SINGLE: -3.40282346638528859811e+38 / 0xff7fffff  (0 => OK)
+00 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+01 SINGLE: -1.17549435082228750796e-38 / 0x80800000  (0 => OK)
+01 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+02 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+02 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+03 SINGLE: 1.17549435082228750796e-38 / 0x00800000  (0 => OK)
+03 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 SINGLE: 1.00000000000000000000e+00 / 0x3f800000  (0 => OK)
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+05 SINGLE: 2.00000000000000000000e+00 / 0x40000000  (0 => OK)
+05 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 SINGLE: 2.71828174591064453125e+00 / 0x402df854  (0 => OK)
+06 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+07 SINGLE: 3.14159274101257324218e+00 / 0x40490fdb  (0 => OK)
+07 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+08 SINGLE: 2.66182092800000000000e+09 / 0x4f1ea82a  (0 => OK)
+08 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+09 SINGLE: 2.87892992000000000000e+09 / 0x4f2b98fc  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+10 SINGLE: 3.40282346638528859811e+38 / 0x7f7fffff  (0 => OK)
+10 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0x18 =>  UNDERFLOW  INEXACT )
+Converting double-precision to half-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00   HALF: 0x0000fbff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01   HALF: 0x0000c000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02   HALF: 0x0000bc00  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03   HALF: 0x00008000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04   HALF: 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05   HALF: 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06   HALF: 0x00003c00  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07   HALF: 0x00004000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08   HALF: 0x0000416f  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09   HALF: 0x00004248  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10   HALF: 0x00007bff  (0x14 => OVERFLOW   INEXACT )
+Converting double-precision to single-precision
+00 DOUBLE: -1.79769313486231570814e+308 / 0x00ffefffffffffffff  (0 => OK)
+00 SINGLE: 4.28657843200000000000e+09 / 0x4f7f7fff  (0x14 => OVERFLOW   INEXACT )
+01 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+01 SINGLE: 3.22122547200000000000e+09 / 0x4f400000  (0 => OK)
+02 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+02 SINGLE: 3.21283686400000000000e+09 / 0x4f3f8000  (0 => OK)
+03 DOUBLE: -2.22507385850720138309e-308 / 0x008010000000000000  (0 => OK)
+03 SINGLE: 2.14748364800000000000e+09 / 0x4f000000  (0x18 =>  UNDERFLOW  INEXACT )
+04 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+04 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0 => OK)
+05 DOUBLE: 2.22507385850720138309e-308 / 0x000010000000000000  (0 => OK)
+05 SINGLE: 0.00000000000000000000e+00 / 0000000000  (0x18 =>  UNDERFLOW  INEXACT )
+06 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+06 SINGLE: 1.06535321600000000000e+09 / 0x4e7e0000  (0 => OK)
+07 DOUBLE: 2.00000000000000000000e+00 / 0x004000000000000000  (0 => OK)
+07 SINGLE: 1.07374182400000000000e+09 / 0x4e800000  (0 => OK)
+08 DOUBLE: 2.71828182845904509079e+00 / 0x004005bf0a8b145769  (0 => OK)
+08 SINGLE: 1.07675443200000000000e+09 / 0x4e805bf0  (0x10 =>    INEXACT )
+09 DOUBLE: 3.14159265358979311599e+00 / 0x00400921fb54442d18  (0 => OK)
+09 SINGLE: 1.07852992000000000000e+09 / 0x4e80921f  (0x10 =>    INEXACT )
+10 DOUBLE: 2.79112157760473600000e+15 / 0x004323d5054450ed00  (0 => OK)
+10 SINGLE: 1.49518131200000000000e+09 / 0x4eb23d50  (0x10 =>    INEXACT )
+Converting half-precision to single-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
+Converting half-precision to double-precision
+00   HALF: 0x0000ffff  (0 => OK)
+00 DOUBLE: -nan / 0x00fffffc0000000000  (0 => OK)
+01   HALF: 0x0000fcff  (0 => OK)
+01 DOUBLE: -nan / 0x00fffbfc0000000000  (0x1 =>     INVALID)
+02   HALF: 0x0000fc01  (0 => OK)
+02 DOUBLE: -nan / 0x00fff8040000000000  (0x1 =>     INVALID)
+03   HALF: 0x0000fc00  (0 => OK)
+03 DOUBLE: -inf / 0x00fff0000000000000  (0 => OK)
+04   HALF: 0x0000fbff  (0 => OK)
+04 DOUBLE: -6.55040000000000000000e+04 / 0x00c0effc0000000000  (0 => OK)
+05   HALF: 0x0000c000  (0 => OK)
+05 DOUBLE: -2.00000000000000000000e+00 / 0x00c000000000000000  (0 => OK)
+06   HALF: 0x0000bc00  (0 => OK)
+06 DOUBLE: -1.00000000000000000000e+00 / 0x00bff0000000000000  (0 => OK)
+07   HALF: 0x00008001  (0 => OK)
+07 DOUBLE: -5.96046447753906250000e-08 / 0x00be70000000000000  (0 => OK)
+08   HALF: 0x00008000  (0 => OK)
+08 DOUBLE: -0.00000000000000000000e+00 / 0x008000000000000000  (0 => OK)
+09   HALF: 0000000000  (0 => OK)
+09 DOUBLE: 0.00000000000000000000e+00 / 00000000000000000000  (0 => OK)
+10   HALF: 0x00000001  (0 => OK)
+10 DOUBLE: 5.96046447753906250000e-08 / 0x003e70000000000000  (0 => OK)
+11   HALF: 0x00003c00  (0 => OK)
+11 DOUBLE: 1.00000000000000000000e+00 / 0x003ff0000000000000  (0 => OK)
+12   HALF: 0x00007bff  (0 => OK)
+12 DOUBLE: 6.55040000000000000000e+04 / 0x0040effc0000000000  (0 => OK)
+13   HALF: 0x00007c00  (0 => OK)
+13 DOUBLE: inf / 0x007ff0000000000000  (0 => OK)
+14   HALF: 0x00007c01  (0 => OK)
+14 DOUBLE: nan / 0x007ff8040000000000  (0x1 =>     INVALID)
+15   HALF: 0x00007cff  (0 => OK)
+15 DOUBLE: nan / 0x007ffbfc0000000000  (0x1 =>     INVALID)
+16   HALF: 0x00007fff  (0 => OK)
+16 DOUBLE: nan / 0x007ffffc0000000000  (0 => OK)
diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target
index be9d3fb4a1..f1c7ec46b5 100644
--- a/tests/tcg/arm/Makefile.target
+++ b/tests/tcg/arm/Makefile.target
@@ -8,7 +8,9 @@ ARM_SRC=$(SRC_PATH)/tests/tcg/arm
 # Set search path for all sources
 VPATH 		+= $(ARM_SRC)
 
-TESTS += hello-arm test-arm-iwmmxt
+ARM_TESTS=hello-arm test-arm-iwmmxt
+
+TESTS += $(ARM_TESTS)
 
 hello-arm: CFLAGS+=-marm -ffreestanding
 hello-arm: LDFLAGS+=-nostdlib
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (27 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir Alex Bennée
                   ` (19 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/aarch64/Makefile.target |  2 +-
 tests/tcg/aarch64/sysregs.c       | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 tests/tcg/aarch64/sysregs.c

diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target
index 26be1c58ef..0727bd3bd2 100644
--- a/tests/tcg/aarch64/Makefile.target
+++ b/tests/tcg/aarch64/Makefile.target
@@ -7,7 +7,7 @@ VPATH 		+= $(AARCH64_SRC)
 
 # we don't build any of the ARM tests
 AARCH64_TESTS=$(filter-out $(ARM_TESTS), $(TESTS))
-AARCH64_TESTS+=fcvt
+AARCH64_TESTS+=fcvt sysregs
 TESTS:=$(AARCH64_TESTS)
 
 fcvt: LDFLAGS+=-lm
diff --git a/tests/tcg/aarch64/sysregs.c b/tests/tcg/aarch64/sysregs.c
new file mode 100644
index 0000000000..0cd0c42d8c
--- /dev/null
+++ b/tests/tcg/aarch64/sysregs.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+#define get_cpu_reg(id) ({                                      \
+                unsigned long __val;                            \
+                asm("mrs %0, "#id : "=r" (__val));              \
+                printf("%-20s: 0x%016lx\n", #id, __val);        \
+        })
+
+int main(void)
+{
+    get_cpu_reg(cntvct_el0);
+    get_cpu_reg(cntfrq_el0);
+    return 0;
+}
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (28 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS Alex Bennée
                   ` (18 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée, Yongbok Kim

These only need to be built for MIPS guests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/tcg/README                  | 11 -----------
 tests/tcg/mips/README             |  7 +++++++
 tests/tcg/{ => mips}/hello-mips.c |  0
 3 files changed, 7 insertions(+), 11 deletions(-)
 create mode 100644 tests/tcg/mips/README
 rename tests/tcg/{ => mips}/hello-mips.c (100%)

diff --git a/tests/tcg/README b/tests/tcg/README
index 625f2326e6..a5643d33e7 100644
--- a/tests/tcg/README
+++ b/tests/tcg/README
@@ -3,17 +3,6 @@ regression testing. Tests are either multi-arch, meaning they can be
 built for all guest architectures that support linux-user executable,
 or they are architecture specific.
 
-
-
-MIPS
-====
-
-hello-mips
-----------
-
-hello-mipsel
-------------
-
 CRIS
 ====
 The testsuite for CRIS is in tests/tcg/cris.  You can run it
diff --git a/tests/tcg/mips/README b/tests/tcg/mips/README
new file mode 100644
index 0000000000..e5bbc58ec5
--- /dev/null
+++ b/tests/tcg/mips/README
@@ -0,0 +1,7 @@
+MIPS
+====
+
+hello-mips
+----------
+
+A very simple inline assembly, write syscall based hello world
diff --git a/tests/tcg/hello-mips.c b/tests/tcg/mips/hello-mips.c
similarity index 100%
rename from tests/tcg/hello-mips.c
rename to tests/tcg/mips/hello-mips.c
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (29 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 17:05   ` Philippe Mathieu-Daudé
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 32/43] tests/tcg/mips: include common mips hello-mips Alex Bennée
                   ` (17 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée, Yongbok Kim

This doesn't add any additional tests but enables building the
multiarch tests for MIPS using docker cross compilers. We don't have a
cross compiler for mips64 big endian though.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.include

diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include
new file mode 100644
index 0000000000..a9beceb623
--- /dev/null
+++ b/tests/tcg/mips/Makefile.include
@@ -0,0 +1,17 @@
+#
+# Makefile.include for all MIPs targets
+#
+# As Debian doesn't support mip64 in big endian mode the only way to
+# build BE is to pass a working cross compiler to ./configure
+#
+
+ifeq ($(TARGET_NAME),mips64el)
+DOCKER_IMAGE=debian-mips64el-cross
+DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
+else ifeq ($(TARGET_NAME),mipsel)
+DOCKER_IMAGE=debian-mipsel-cross
+DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
+else ifeq ($(TARGET_NAME),mips)
+DOCKER_IMAGE=debian-mips-cross
+DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
+endif
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 32/43] tests/tcg/mips: include common mips hello-mips
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (30 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x Alex Bennée
                   ` (16 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée, Yongbok Kim

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/mips/Makefile.target | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/tcg/mips/Makefile.target

diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target
new file mode 100644
index 0000000000..71f0c2dd53
--- /dev/null
+++ b/tests/tcg/mips/Makefile.target
@@ -0,0 +1,19 @@
+# -*- Mode: makefile -*-
+#
+# MIPS - included from tests/tcg/Makefile.target
+#
+
+MIPS_SRC=$(SRC_PATH)/tests/tcg/mips
+
+# Set search path for all sources
+VPATH 		+= $(MIPS_SRC)
+
+MIPS_TESTS=hello-mips
+
+TESTS += $(MIPS_TESTS)
+
+hello-mips: CFLAGS+=-ffreestanding
+hello-mips: LDFLAGS+=-nostdlib
+
+# For MIPS32 and 64 we have a bunch of extra tests in sub-directories
+# however they are intended for system tests.
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (31 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 32/43] tests/tcg/mips: include common mips hello-mips Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64 Alex Bennée
                   ` (15 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée, Cornelia Huck, open list:S390

This doesn't add any additional tests but enables building the
multiarch tests for s390x.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/tcg/s390x/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 tests/tcg/s390x/Makefile.include

diff --git a/tests/tcg/s390x/Makefile.include b/tests/tcg/s390x/Makefile.include
new file mode 100644
index 0000000000..1f58115d96
--- /dev/null
+++ b/tests/tcg/s390x/Makefile.include
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-s390x-cross
+DOCKER_CROSS_COMPILER=s390x-linux-gnu-gcc
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (32 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target Alex Bennée
                   ` (14 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Currently this just enables building the multiarch tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 tests/tcg/ppc64le/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 tests/tcg/ppc64le/Makefile.include

diff --git a/tests/tcg/ppc64le/Makefile.include b/tests/tcg/ppc64le/Makefile.include
new file mode 100644
index 0000000000..d71cfc9aa7
--- /dev/null
+++ b/tests/tcg/ppc64le/Makefile.include
@@ -0,0 +1,2 @@
+DOCKER_IMAGE=debian-ppc64el-cross
+DOCKER_CROSS_COMPILER=powerpc64le-linux-gnu-gcc
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (33 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64 Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets Alex Bennée
                   ` (13 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This make is now invoked from each individual target make with the
appropriate CC and EXTRA_CFLAGS set for each guest. It then includes
additional Makefile.targets from:

  - tests/tcg/multiarch (always)
  - tests/tcg/$(TARGET_BASE_ARCH) (if available)
  - tests/tcg/$(TARGET_NAME)

The order is important as the later Makefile's may want to suppress
TESTS from it's base arch profile. Each included Makefile.target is
responsible for adding TESTS as well as defining any special build
instructions for individual tests.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
v2
  - cleaner approach to include sub makefiles
  - move TESTS/VPATH manipulation into sub-makefile
  - avoid double inclusion when TARGET_BASE_ARCH==TARGET_NAME
---
 tests/tcg/Makefile | 153 +++++++++++----------------------------------
 1 file changed, 38 insertions(+), 115 deletions(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index e12395117a..b9291acc89 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -1,125 +1,48 @@
--include ../../config-host.mak
--include $(SRC_PATH)/rules.mak
+# -*- Mode: makefile -*-
+#
+# TCG tests
+#
+# These are complicated by the fact we want to build them for guest
+# systems. This requires knowing what guests we are building and which
+# ones we have cross-compilers for or docker images with
+# cross-compilers.
+#
+# The tests themselves should be as minimal as possible as
+# cross-compilers don't always have a large amount of libraries
+# available.
+#
+# We only include the host build system for SRC_PATH and we don't
+# bother with the common rules.mk. We expect CC/LD to have been set for
+# us from the parent make as well as being passed EXTRA_CFLAGS.
+#
+# We also expect to be in the tests build dir for the FOO-linux-user.
+#
 
-$(call set-vpath, $(SRC_PATH)/tests/tcg)
+-include ../../config-host.mak
+-include ../config-target.mak
 
-QEMU=../../i386-linux-user/qemu-i386
-QEMU_X86_64=../../x86_64-linux-user/qemu-x86_64
-CC_X86_64=$(CC_I386) -m64
+# Tests we are building
+TESTS=
 
-QEMU_INCLUDES += -I../..
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
-#CFLAGS+=-msse2
+# Start with a blank slate, the build targets get to add stuff first
+CFLAGS=
+QEMU_CFLAGS=
 LDFLAGS=
 
-# TODO: automatically detect ARM and MIPS compilers, and run those too
-
-# runcom maps page 0, so it requires root privileges
-# also, pi_10.com runs indefinitely
-
-I386_TESTS=hello-i386 \
-	   sha1-i386 \
-	   test-i386 \
-	   test-i386-fprem \
-	   # runcom
-
-# native i386 compilers sometimes are not biarch.  assume cross-compilers are
-ifneq ($(ARCH),i386)
-I386_TESTS+=run-test-x86_64
-endif
-
-TESTS = test_path
-ifneq ($(call find-in-path, $(CC_I386)),)
-TESTS += $(I386_TESTS)
+# The order we include is important. We include multiarch, base arch and finally arch
+-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
+-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target
+ifneq ($(TARGET_BASE_ARCH),$(TARGET_NAME))
+-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
 endif
 
-all: $(patsubst %,run-%,$(TESTS))
-test: all
-
-# rules to run tests
-
-.PHONY: $(patsubst %,run-%,$(TESTS))
-
-run-%: %
-	-$(QEMU) ./$*
-
-run-hello-i386: hello-i386
-run-sha1-i386: sha1-i386
-
-run-test-i386: test-i386
-	./test-i386 > test-i386.ref
-	-$(QEMU) test-i386 > test-i386.out
-	@if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
-
-run-test-i386-fprem: test-i386-fprem
-	./test-i386-fprem > test-i386-fprem.ref
-	-$(QEMU) test-i386-fprem > test-i386-fprem.out
-	@if diff -u test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Test OK"; fi
-
-run-test-x86_64: test-x86_64
-	./test-x86_64 > test-x86_64.ref
-	-$(QEMU_X86_64) test-x86_64 > test-x86_64.out
-	@if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi
-
-
-run-runcom: runcom
-	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
-
-run-test_path: test_path
-	./test_path
-
-# rules to compile tests
-
-hello-i386: hello-i386.c
-	$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
-	strip $@
-
-# i386/x86_64 emulation test (test various opcodes) */
-test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
-           test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \
-              $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
-
-test-i386-fprem: test-i386-fprem.c
-	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $^
-
-test-x86_64: test-i386.c \
-           test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
-
-# vm86 test
-runcom: runcom.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-# speed test
-sha1-i386: sha1.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-# arm test
-hello-arm: hello-arm.o
-	arm-linux-ld -o $@ $<
-
-hello-arm.o: hello-arm.c
-	arm-linux-gcc -Wall -g -O2 -c -o $@ $<
-
-test-arm-iwmmxt: test-arm-iwmmxt.s
-	cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
-
-# MIPS test
-hello-mips: hello-mips.c
-	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-
-hello-mipsel: hello-mips.c
-	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
+# Add the common build options
+CFLAGS+=-Wall -O0 -g -fno-strict-aliasing
+LDFLAGS+=-static
 
-# testsuite for the CRIS port.
-test-cris:
-	$(MAKE) -C cris check
+%: %.c
+	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
 
-# testsuite for the LM32 port.
-test-lm32:
-	$(MAKE) -C lm32 check
+all: $(TESTS)
 
-clean:
-	rm -f *~ *.o test-i386.out test-i386.ref \
-           test-x86_64.log test-x86_64.ref qruncom $(TESTS)
+# There is no clean target, the calling make just rm's the tests build dir
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (34 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets Alex Bennée
                   ` (12 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

Now all the build infrastructure is in place we can build tests for
each guest that we support. That support mainly depends on having
cross compilers installed or docker setup. To keep all the logic for
that together we put the rules in tests/tcg/Makefile.include and
include it from the main Makefile.target.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 Makefile.target            |  5 +++
 tests/tcg/Makefile.include | 79 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+)
 create mode 100644 tests/tcg/Makefile.include

diff --git a/Makefile.target b/Makefile.target
index d0ec77a307..a30fd40257 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -36,6 +36,11 @@ endif
 PROGS=$(QEMU_PROG) $(QEMU_PROGW)
 STPFILES=
 
+# Makefile Tests
+ifdef CONFIG_USER_ONLY
+include $(SRC_PATH)/tests/tcg/Makefile.include
+endif
+
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
new file mode 100644
index 0000000000..cb8bb36026
--- /dev/null
+++ b/tests/tcg/Makefile.include
@@ -0,0 +1,79 @@
+# -*- Mode: makefile -*-
+#
+# TCG tests (per-target rules)
+#
+# This Makefile fragement is included from the per-target
+# Makefile.target so will be invoked for each linux-user program we
+# build. We have two options for compiling, either using a configured
+# guest compiler or calling one of our docker images to do it for us.
+#
+
+# The per ARCH makefile, if it exists holds extra information about
+# useful docker images or alternative compiler flags. Include it if it
+# exists
+
+ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
+CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE))
+
+ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE))
+include $(ARCH_MAKEFILE)
+endif
+
+GUEST_BUILD=
+
+# Support installed Cross Compilers
+
+ifdef CROSS_CC_GUEST
+
+.PHONY: cross-build-guest-tests
+cross-build-guest-tests:
+	$(call quiet-command, \
+          (mkdir -p tests && cd tests && \
+	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \
+	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
+
+
+GUEST_BUILD=cross-build-guest-tests
+
+endif
+
+# Support building with Docker
+
+ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y)
+ifneq ($(DOCKER_IMAGE),)
+
+# We also need the Docker make rules to depend on
+include $(SRC_PATH)/tests/docker/Makefile.include
+
+DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \
+		--cc $(DOCKER_CROSS_COMPILER) \
+		-i qemu:$(DOCKER_IMAGE) \
+		-s $(SRC_PATH) -- "
+DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE)
+
+.PHONY: docker-build-guest-tests
+docker-build-guest-tests: $(DOCKER_PREREQ)
+	$(call quiet-command, \
+          (mkdir -p tests && cd tests && \
+	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \
+	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
+
+GUEST_BUILD=docker-build-guest-tests
+
+endif
+endif
+
+# Final targets
+.PHONY: guest-tests
+
+ifneq ($(GUEST_BUILD),)
+guest-tests: $(GUEST_BUILD)
+else
+guest-tests:
+	$(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED")
+endif
+
+# It doesn't mater if these don't exits
+.PHONY: clean-guest-tests
+clean-guest-tests:
+	rm -rf tests || echo "no $(TARGET_NAME) tests to remove"
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (35 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB Alex Bennée
                   ` (11 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This will ensure all linux-user targets build their guest test
programs.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2
  - use -include instead of complex macro stuff
  - also include TARGET_BASE_ARCH/Makefile
---
 tests/Makefile.include     | 19 ++++++++++++++++++-
 tests/tcg/Makefile.include | 33 +++++++++++++++------------------
 2 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3d2f0458ab..c402de901e 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -10,6 +10,7 @@ check-help:
 	@echo " $(MAKE) check-speed          Run qobject speed tests"
 	@echo " $(MAKE) check-qapi-schema    Run QAPI schema tests"
 	@echo " $(MAKE) check-block          Run block tests"
+	@echo " $(MAKE) check-tcg            Run TCG tests"
 	@echo " $(MAKE) check-report.html    Generates an HTML test report"
 	@echo " $(MAKE) check-clean          Clean the tests"
 	@echo
@@ -916,6 +917,23 @@ check-report.xml: $(patsubst %,check-report-qtest-%.xml, $(QTEST_TARGETS)) check
 check-report.html: check-report.xml
 	$(call quiet-command,gtester-report $< > $@,"GEN","$@")
 
+# Per guest TCG tests
+
+LINUX_USER_TARGETS=$(filter %-linux-user,$(TARGET_LIST))
+BUILD_TCG_TARGET_RULES=$(patsubst %,tcg-tests-%, $(LINUX_USER_TARGETS))
+CLEAN_TCG_TARGET_RULES=$(patsubst %,clean-tcg-tests-%, $(LINUX_USER_TARGETS))
+
+tcg-tests-%:
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" guest-tests,)
+
+clean-tcg-tests-%:
+	$(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" clean-guest-tests,)
+
+.PHONY: check-tcg
+check-tcg: $(BUILD_TCG_TARGET_RULES)
+
+.PHONY: clean-tcg
+clean-tcg: $(CLEAN_TCG_TARGET_RULES)
 
 # Other tests
 
@@ -958,7 +976,6 @@ check-speed: $(patsubst %,check-%, $(check-speed-y))
 check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest check-decodetree
 check-clean:
-	$(MAKE) -C tests/tcg clean
 	rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
 	rm -f tests/test-qapi-gen-timestamp
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
index cb8bb36026..d82f4d32fb 100644
--- a/tests/tcg/Makefile.include
+++ b/tests/tcg/Makefile.include
@@ -8,19 +8,14 @@
 # guest compiler or calling one of our docker images to do it for us.
 #
 
-# The per ARCH makefile, if it exists holds extra information about
-# useful docker images or alternative compiler flags. Include it if it
-# exists
+# The per ARCH makefile, if it exists, holds extra information about
+# useful docker images or alternative compiler flags.
 
-ARCH_MAKEFILE=$(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
-CHECK_INCLUDE=$(wildcard $(ARCH_MAKEFILE))
-
-ifeq ($(ARCH_MAKEFILE),$(CHECK_INCLUDE))
-include $(ARCH_MAKEFILE)
-endif
+-include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.include
+-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.include
 
 GUEST_BUILD=
-
+TCG_MAKE=$(SRC_PATH)/tests/tcg/Makefile
 # Support installed Cross Compilers
 
 ifdef CROSS_CC_GUEST
@@ -28,10 +23,10 @@ ifdef CROSS_CC_GUEST
 .PHONY: cross-build-guest-tests
 cross-build-guest-tests:
 	$(call quiet-command, \
-          (mkdir -p tests && cd tests && \
-	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(CROSS_CC_GUEST)), \
-	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
-
+	   (mkdir -p tests && cd tests && \
+	    make -f $(TCG_MAKE) CC=$(CROSS_CC_GUEST) \
+				EXTRA_CFLAGS=$(CROSS_CC_GUEST_CFLAGS)), \
+	"CROSS-BUILD","$(TARGET_NAME) guest-tests with $(CROSS_CC_GUEST)")
 
 GUEST_BUILD=cross-build-guest-tests
 
@@ -54,9 +49,10 @@ DOCKER_PREREQ=docker-image-$(DOCKER_IMAGE)
 .PHONY: docker-build-guest-tests
 docker-build-guest-tests: $(DOCKER_PREREQ)
 	$(call quiet-command, \
-          (mkdir -p tests && cd tests && \
-	   make -f $(SRC_PATH)/tests/tcg/Makefile ARCH=$(TARGET_NAME) CC=$(DOCKER_COMPILE_CMD)), \
-	  "CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
+	  (mkdir -p tests && cd tests && \
+	   make -f $(TCG_MAKE) CC=$(DOCKER_COMPILE_CMD) \
+			       EXTRA_CFLAGS=$(DOCKER_CROSS_COMPILER_CFLAGS)), \
+	"CROSS-BUILD","$(TARGET_NAME) guest-tests with docker qemu:$(DOCKER_IMAGE)")
 
 GUEST_BUILD=docker-build-guest-tests
 
@@ -70,7 +66,8 @@ ifneq ($(GUEST_BUILD),)
 guest-tests: $(GUEST_BUILD)
 else
 guest-tests:
-	$(call quiet-command, /bin/true, "CROSS-BUILD", "$(TARGET_NAME) guest-tests SKIPPED")
+	$(call quiet-command, /bin/true, "CROSS-BUILD", \
+		"$(TARGET_NAME) guest-tests SKIPPED")
 endif
 
 # It doesn't mater if these don't exits
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (36 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:41   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers Alex Bennée
                   ` (10 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel

From: "Emilio G. Cota" <cota@braap.org>

To ease the cross-compilation of tests that do not use glib.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 include/qemu/osdep.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 41658060a7..fabaf73007 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -104,7 +104,9 @@ extern int daemon(int, int);
 #include "sysemu/os-posix.h"
 #endif
 
+#ifndef QEMU_NO_GLIB
 #include "glib-compat.h"
+#endif
 #include "qemu/typedefs.h"
 
 /*
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (37 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 21:41   ` Richard Henderson
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite Alex Bennée
                   ` (9 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel

From: "Emilio G. Cota" <cota@braap.org>

To ease the cross-compilation of softfloat.o.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 fpu/softfloat.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 70e0c40a1c..a2a5d4ea33 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -82,6 +82,7 @@ this code that are retained.
 /* softfloat (and in particular the code in softfloat-specialize.h) is
  * target-dependent and needs the TARGET_* macros.
  */
+#define QEMU_NO_GLIB
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
 #include "fpu/softfloat.h"
@@ -105,6 +106,9 @@ this code that are retained.
 *----------------------------------------------------------------------------*/
 #include "softfloat-specialize.h"
 
+/* glib headers are not included due to QEMU_NO_GLIB */
+#define g_assert_not_reached() assert(false)
+
 /*----------------------------------------------------------------------------
 | Returns the fraction bits of the half-precision floating-point value `a'.
 *----------------------------------------------------------------------------*/
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (38 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set Alex Bennée
                   ` (8 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel

From: "Emilio G. Cota" <cota@braap.org>

This will allow us to run correctness tests against our
FP implementation. The test can be run in two modes (called
"testers"): host and soft. With the former we check the results
and FP flags on the host machine against the model.
With the latter we check QEMU's fpu primitives against the
model. Note that in soft mode we are not instantiating any
particular CPU (hence the HW_POISON_H hack to avoid macro poisoning);
for that we need to run the test in host mode under QEMU.

The input files are taken from IBM's FPGen test suite:
https://www.research.ibm.com/haifa/projects/verification/fpgen/

I see no license file in there so I am just downloading them
with wget. We might want to keep a copy on a qemu server though,
in case IBM takes those files down in the future.

The "IBM" syntax of those files (for now the only syntax supported
in fp-test) is documented here:
https://www.research.ibm.com/haifa/projects/verification/fpgen/papers/ieee-test-suite-v2.pdf

Note that the syntax document has some inaccuracies; the appended
parsing code works around some of those.

The exception flag (-e) is important: many of the optimizations
included in the following commits assume that the inexact flag
is set, so "-e x" is necessary in order to test those code paths.

The whitelist flag (-w) points to a file with test cases to be ignored.
I have put some whitelist files online, but we should have them
on a QEMU-related server.

Thus, a typical of fp-test is as follows:

  $ cd qemu/build/tests/fp-test
  $ make -j && \
	./fp-test -t soft ibm/*.fptest \
	-w whitelist.txt \
	-e x

If we want to test after-rounding tininess detection, then we need to
pass "-a -w whitelist-tininess-after.txt" in addition to the above.
(NB. we can pass "-w" as many times as we want.)

The patch immediately after this one fixes a mismatch against the model
in softfloat, but after that is applied the above should finish with a 0
return code, and print something like:
  All tests OK.
  Tests passed: 76572. Not handled: 51237, whitelisted: 2662

The tests pass on "host" mode on x86_64 and aarch64 machines, although
note that for the x86_64 you need to pass -w whitelist-tininess-after.txt.

Running on host mode under QEMU reports flag mismatches (e.g. for
x86_64-linux-user), but that isn't too surprising given how little
love the i386 frontend gets. Host mode under aarch64-linux-user
passes OK.

Flush-to-zero and flush-inputs-to-zero modes can be tested with the
-z and -Z flags. Note however that the IBM input files are only
IEEE-compliant, so for now I've tested these modes by diff'ing
the reported errors against the model files. We should look into
generating files for these non-standard modes to make testing
these modes less painful.

Signed-off-by: Emilio G. Cota <cota@braap.org>

---
v2 (ajb,cota):
  - build fixes to avoid glib dependency
---
 configure              |    2 +
 tests/Makefile.include |    3 +
 tests/fp/.gitignore    |    3 +
 tests/fp/Makefile      |   34 ++
 tests/fp/fp-test.c     | 1173 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 1215 insertions(+)
 create mode 100644 tests/fp/.gitignore
 create mode 100644 tests/fp/Makefile
 create mode 100644 tests/fp/fp-test.c

diff --git a/configure b/configure
index 0988c88d9f..6362f3af8e 100755
--- a/configure
+++ b/configure
@@ -7222,12 +7222,14 @@ fi
 
 # build tree in object directory in case the source is not in the current directory
 DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32 tests/libqos tests/qapi-schema tests/tcg/xtensa tests/qemu-iotests tests/vm"
+DIRS="$DIRS tests/fp"
 DIRS="$DIRS docs docs/interop fsdev scsi"
 DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas pc-bios/s390-ccw"
 DIRS="$DIRS roms/seabios roms/vgabios"
 FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
 FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
 FILES="$FILES tests/tcg/lm32/Makefile tests/tcg/xtensa/Makefile po/Makefile"
+FILES="$FILES tests/fp/Makefile"
 FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
 FILES="$FILES pc-bios/spapr-rtas/Makefile"
 FILES="$FILES pc-bios/s390-ccw/Makefile"
diff --git a/tests/Makefile.include b/tests/Makefile.include
index c402de901e..c019aa46a2 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -644,6 +644,9 @@ tests/qht-bench$(EXESUF): tests/qht-bench.o $(test-util-obj-y)
 tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y)
 tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y)
 
+tests/fp/%:
+	$(MAKE) -C $(dir $@) $(notdir $@)
+
 tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
 	hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\
 	hw/core/bus.o \
diff --git a/tests/fp/.gitignore b/tests/fp/.gitignore
new file mode 100644
index 0000000000..0a9fef4368
--- /dev/null
+++ b/tests/fp/.gitignore
@@ -0,0 +1,3 @@
+ibm
+*.txt
+fp-test
diff --git a/tests/fp/Makefile b/tests/fp/Makefile
new file mode 100644
index 0000000000..a208f4cefc
--- /dev/null
+++ b/tests/fp/Makefile
@@ -0,0 +1,34 @@
+BUILD_DIR=$(CURDIR)/../..
+
+include ../../config-host.mak
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/fp $(SRC_PATH)/fpu)
+
+QEMU_INCLUDES += -I../..
+QEMU_INCLUDES += -I$(SRC_PATH)/fpu
+# work around TARGET_* poisoning
+QEMU_CFLAGS += -DHW_POISON_H
+
+IBMFP := ibm-fptests.zip
+
+OBJS := fp-test$(EXESUF)
+
+WHITELIST_FILES := whitelist.txt whitelist-tininess-after.txt
+
+all: $(OBJS) ibm $(WHITELIST_FILES)
+
+ibm:
+	wget -nv -O $(IBMFP) http://www.haifa.il.ibm.com/projects/verification/fpgen/download/test_suite.zip
+	mkdir -p $@
+	unzip $(IBMFP) -d $@
+	rm -rf $(IBMFP)
+
+# XXX: upload this to a qemu server, or just commit it.
+$(WHITELIST_FILES):
+	wget -nv -O $@ http://www.cs.columbia.edu/~cota/qemu/fpbench-$@
+
+fp-test$(EXESUF): fp-test.o softfloat.o
+
+clean:
+	rm -f *.o *.d $(OBJS)
diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c
new file mode 100644
index 0000000000..27db552160
--- /dev/null
+++ b/tests/fp/fp-test.c
@@ -0,0 +1,1173 @@
+/*
+ * fp-test.c - Floating point test suite.
+ *
+ * Copyright (C) 2018, Emilio G. Cota <cota@braap.org>
+ *
+ * License: GNU GPL, version 2 or later.
+ *   See the COPYING file in the top-level directory.
+ */
+#ifndef HW_POISON_H
+#error Must define HW_POISON_H to work around TARGET_* poisoning
+#endif
+
+#define QEMU_NO_GLIB
+#include "qemu/osdep.h"
+#include <search.h>
+#include <fenv.h>
+#include <math.h>
+#include "fpu/softfloat.h"
+
+enum error {
+    ERROR_NONE,
+    ERROR_NOT_HANDLED,
+    ERROR_WHITELISTED,
+    ERROR_COMMENT,
+    ERROR_INPUT,
+    ERROR_RESULT,
+    ERROR_EXCEPTIONS,
+    ERROR_MAX,
+};
+
+enum input_fmt {
+    INPUT_FMT_IBM,
+};
+
+struct input {
+    const char * const name;
+    enum error (*test_line)(const char *line);
+};
+
+enum precision {
+    PREC_FLOAT,
+    PREC_DOUBLE,
+    PREC_QUAD,
+    PREC_FLOAT_TO_DOUBLE,
+};
+
+struct op_desc {
+    const char * const name;
+    int n_operands;
+};
+
+enum op {
+    OP_ADD,
+    OP_SUB,
+    OP_MUL,
+    OP_MULADD,
+    OP_DIV,
+    OP_SQRT,
+    OP_MINNUM,
+    OP_MAXNUM,
+    OP_MAXNUMMAG,
+    OP_ABS,
+    OP_IS_NAN,
+    OP_IS_INF,
+    OP_FLOAT_TO_DOUBLE,
+};
+
+static const struct op_desc ops[] = {
+    [OP_ADD] =       { "+", 2 },
+    [OP_SUB] =       { "-", 2 },
+    [OP_MUL] =       { "*", 2 },
+    [OP_MULADD] =    { "*+", 3 },
+    [OP_DIV] =       { "/", 2 },
+    [OP_SQRT] =      { "V", 1 },
+    [OP_MINNUM] =    { "<C", 2 },
+    [OP_MAXNUM] =    { ">C", 2 },
+    [OP_MAXNUMMAG] = { ">A", 2 },
+    [OP_ABS] =       { "A", 1 },
+    [OP_IS_NAN] =    { "?N", 1 },
+    [OP_IS_INF] =    { "?i", 1 },
+    [OP_FLOAT_TO_DOUBLE] = { "cff", 1 },
+};
+
+/*
+ * We could enumerate all the types here. But really we only care about
+ * QNaN and SNaN since only those can vary across ISAs.
+ */
+enum op_type {
+    OP_TYPE_NUMBER,
+    OP_TYPE_QNAN,
+    OP_TYPE_SNAN,
+};
+
+struct operand {
+    uint64_t val;
+    enum op_type type;
+};
+
+struct test_op {
+    struct operand operands[3];
+    struct operand expected_result;
+    enum precision prec;
+    enum op op;
+    signed char round;
+    uint8_t trapped_exceptions;
+    uint8_t exceptions;
+    bool expected_result_is_valid;
+};
+
+typedef enum error (*tester_func_t)(struct test_op *);
+
+struct tester {
+    tester_func_t func;
+    const char *name;
+};
+
+struct whitelist {
+    char **lines;
+    size_t n;
+    struct hsearch_data ht;
+};
+
+static uint64_t test_stats[ERROR_MAX];
+static struct whitelist whitelist;
+static uint8_t default_exceptions;
+static bool die_on_error = true;
+static struct float_status soft_status = {
+    .float_detect_tininess = float_tininess_before_rounding,
+};
+
+static inline float u64_to_float(uint64_t v)
+{
+    uint32_t v32 = v;
+    uint32_t *v32p = &v32;
+
+    return *(float *)v32p;
+}
+
+static inline double u64_to_double(uint64_t v)
+{
+    uint64_t *vp = &v;
+
+    return *(double *)vp;
+}
+
+static inline uint64_t float_to_u64(float f)
+{
+    float *fp = &f;
+
+    return *(uint32_t *)fp;
+}
+
+static inline uint64_t double_to_u64(double d)
+{
+    double *dp = &d;
+
+    return *(uint64_t *)dp;
+}
+
+static inline bool is_err(enum error err)
+{
+    return err != ERROR_NONE &&
+        err != ERROR_NOT_HANDLED &&
+        err != ERROR_WHITELISTED &&
+        err != ERROR_COMMENT;
+}
+
+static int host_exceptions_translate(int host_flags)
+{
+    int flags = 0;
+
+    if (host_flags & FE_INEXACT) {
+        flags |= float_flag_inexact;
+    }
+    if (host_flags & FE_UNDERFLOW) {
+        flags |= float_flag_underflow;
+    }
+    if (host_flags & FE_OVERFLOW) {
+        flags |= float_flag_overflow;
+    }
+    if (host_flags & FE_DIVBYZERO) {
+        flags |= float_flag_divbyzero;
+    }
+    if (host_flags & FE_INVALID) {
+        flags |= float_flag_invalid;
+    }
+    return flags;
+}
+
+static inline uint8_t host_get_exceptions(void)
+{
+    return host_exceptions_translate(fetestexcept(FE_ALL_EXCEPT));
+}
+
+static void host_set_exceptions(uint8_t flags)
+{
+    int host_flags = 0;
+
+    if (flags & float_flag_inexact) {
+        host_flags |= FE_INEXACT;
+    }
+    if (flags & float_flag_underflow) {
+        host_flags |= FE_UNDERFLOW;
+    }
+    if (flags & float_flag_overflow) {
+        host_flags |= FE_OVERFLOW;
+    }
+    if (flags & float_flag_divbyzero) {
+        host_flags |= FE_DIVBYZERO;
+    }
+    if (flags & float_flag_invalid) {
+        host_flags |= FE_INVALID;
+    }
+    feraiseexcept(host_flags);
+}
+
+#define STANDARD_EXCEPTIONS \
+    (float_flag_inexact | float_flag_underflow | \
+     float_flag_overflow | float_flag_divbyzero | float_flag_invalid)
+#define FMT_EXCEPTIONS "%s%s%s%s%s%s"
+#define PR_EXCEPTIONS(x)                                \
+        ((x) & STANDARD_EXCEPTIONS ? "" : "none"),      \
+        (((x) & float_flag_inexact)   ? "x" : ""),      \
+        (((x) & float_flag_underflow) ? "u" : ""),      \
+        (((x) & float_flag_overflow)  ? "o" : ""),      \
+        (((x) & float_flag_divbyzero) ? "z" : ""),      \
+        (((x) & float_flag_invalid)   ? "i" : "")
+
+static enum error tester_check(const struct test_op *t, uint64_t res64,
+                               bool res_is_nan, uint8_t flags)
+{
+    enum error err = ERROR_NONE;
+
+    if (t->expected_result_is_valid) {
+        if (t->expected_result.type == OP_TYPE_QNAN ||
+            t->expected_result.type == OP_TYPE_SNAN) {
+            if (!res_is_nan) {
+                err = ERROR_RESULT;
+                goto out;
+            }
+        } else if (res64 != t->expected_result.val) {
+            err = ERROR_RESULT;
+            goto out;
+        }
+    }
+    if (t->exceptions && flags != (t->exceptions | default_exceptions)) {
+        err = ERROR_EXCEPTIONS;
+        goto out;
+    }
+
+ out:
+    if (is_err(err)) {
+        int i;
+
+        fprintf(stderr, "%s ", ops[t->op].name);
+        for (i = 0; i < ops[t->op].n_operands; i++) {
+            fprintf(stderr, "0x%" PRIx64 "%s", t->operands[i].val,
+                    i < ops[t->op].n_operands - 1 ? " " : "");
+        }
+        fprintf(stderr, ", expected: 0x%" PRIx64 ", returned: 0x%" PRIx64,
+                t->expected_result.val, res64);
+        if (err == ERROR_EXCEPTIONS) {
+            fprintf(stderr, ", expected exceptions: " FMT_EXCEPTIONS
+                    ", returned: " FMT_EXCEPTIONS,
+                    PR_EXCEPTIONS(t->exceptions), PR_EXCEPTIONS(flags));
+        }
+        fprintf(stderr, "\n");
+    }
+    return err;
+}
+
+static enum error host_tester(struct test_op *t)
+{
+    uint64_t res64;
+    bool result_is_nan;
+    uint8_t flags = 0;
+
+    feclearexcept(FE_ALL_EXCEPT);
+    if (default_exceptions) {
+        host_set_exceptions(default_exceptions);
+    }
+
+    if (t->prec == PREC_FLOAT) {
+        float a, b, c;
+        float *in[] = { &a, &b, &c };
+        float res;
+        int i;
+
+        assert(ops[t->op].n_operands <= ARRAY_SIZE(in));
+        for (i = 0; i < ops[t->op].n_operands; i++) {
+            /* use the host's QNaN/SNaN patterns */
+            if (t->operands[i].type == OP_TYPE_QNAN) {
+                *in[i] = __builtin_nanf("");
+            } else if (t->operands[i].type == OP_TYPE_SNAN) {
+                *in[i] = __builtin_nansf("");
+            } else {
+                *in[i] = u64_to_float(t->operands[i].val);
+            }
+        }
+
+        if (t->expected_result.type == OP_TYPE_QNAN) {
+            t->expected_result.val = float_to_u64(__builtin_nanf(""));
+        } else if (t->expected_result.type == OP_TYPE_SNAN) {
+            t->expected_result.val = float_to_u64(__builtin_nansf(""));
+        }
+
+        switch (t->op) {
+        case OP_ADD:
+            res = a + b;
+            break;
+        case OP_SUB:
+            res = a - b;
+            break;
+        case OP_MUL:
+            res = a * b;
+            break;
+        case OP_MULADD:
+            res = fmaf(a, b, c);
+            break;
+        case OP_DIV:
+            res = a / b;
+            break;
+        case OP_SQRT:
+            res = sqrtf(a);
+            break;
+        case OP_ABS:
+            res = fabsf(a);
+            break;
+        case OP_IS_NAN:
+            res = !!isnan(a);
+            break;
+        case OP_IS_INF:
+            res = !!isinf(a);
+            break;
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        flags = host_get_exceptions();
+        res64 = float_to_u64(res);
+        result_is_nan = isnan(res);
+    } else if (t->prec == PREC_DOUBLE) {
+        double a, b, c;
+        double *in[] = { &a, &b, &c };
+        double res;
+        int i;
+
+        assert(ops[t->op].n_operands <= ARRAY_SIZE(in));
+        for (i = 0; i < ops[t->op].n_operands; i++) {
+            /* use the host's QNaN/SNaN patterns */
+            if (t->operands[i].type == OP_TYPE_QNAN) {
+                *in[i] = __builtin_nan("");
+            } else if (t->operands[i].type == OP_TYPE_SNAN) {
+                *in[i] = __builtin_nans("");
+            } else {
+                *in[i] = u64_to_double(t->operands[i].val);
+            }
+        }
+
+        if (t->expected_result.type == OP_TYPE_QNAN) {
+            t->expected_result.val = double_to_u64(__builtin_nan(""));
+        } else if (t->expected_result.type == OP_TYPE_SNAN) {
+            t->expected_result.val = double_to_u64(__builtin_nans(""));
+        }
+
+        switch (t->op) {
+        case OP_ADD:
+            res = a + b;
+            break;
+        case OP_SUB:
+            res = a - b;
+            break;
+        case OP_MUL:
+            res = a * b;
+            break;
+        case OP_MULADD:
+            res = fma(a, b, c);
+            break;
+        case OP_DIV:
+            res = a / b;
+            break;
+        case OP_SQRT:
+            res = sqrt(a);
+            break;
+        case OP_ABS:
+            res = fabs(a);
+            break;
+        case OP_IS_NAN:
+            res = !!isnan(a);
+            break;
+        case OP_IS_INF:
+            res = !!isinf(a);
+            break;
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        flags = host_get_exceptions();
+        res64 = double_to_u64(res);
+        result_is_nan = isnan(res);
+    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
+        float a;
+        double res;
+
+        if (t->operands[0].type == OP_TYPE_QNAN) {
+            a = __builtin_nanf("");
+        } else if (t->operands[0].type == OP_TYPE_SNAN) {
+            a = __builtin_nansf("");
+        } else {
+            a = u64_to_float(t->operands[0].val);
+        }
+
+        if (t->expected_result.type == OP_TYPE_QNAN) {
+            t->expected_result.val = double_to_u64(__builtin_nan(""));
+        } else if (t->expected_result.type == OP_TYPE_SNAN) {
+            t->expected_result.val = double_to_u64(__builtin_nans(""));
+        }
+
+        switch (t->op) {
+        case OP_FLOAT_TO_DOUBLE:
+            res = a;
+            break;
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        flags = host_get_exceptions();
+        res64 = double_to_u64(res);
+        result_is_nan = isnan(res);
+    } else {
+        return ERROR_NOT_HANDLED; /* XXX */
+    }
+    return tester_check(t, res64, result_is_nan, flags);
+}
+
+static enum error soft_tester(struct test_op *t)
+{
+    float_status *s = &soft_status;
+    uint64_t res64;
+    enum error err = ERROR_NONE;
+    bool result_is_nan;
+
+    s->float_rounding_mode = t->round;
+    s->float_exception_flags = default_exceptions;
+
+    if (t->prec == PREC_FLOAT) {
+        float32 a, b, c;
+        float32 *in[] = { &a, &b, &c };
+        float32 res;
+        int i;
+
+        assert(ops[t->op].n_operands <= ARRAY_SIZE(in));
+        for (i = 0; i < ops[t->op].n_operands; i++) {
+            *in[i] = t->operands[i].val;
+        }
+
+        switch (t->op) {
+        case OP_ADD:
+            res = float32_add(a, b, s);
+            break;
+        case OP_SUB:
+            res = float32_sub(a, b, s);
+            break;
+        case OP_MUL:
+            res = float32_mul(a, b, s);
+            break;
+        case OP_MULADD:
+            res = float32_muladd(a, b, c, 0, s);
+            break;
+        case OP_DIV:
+            res = float32_div(a, b, s);
+            break;
+        case OP_SQRT:
+            res = float32_sqrt(a, s);
+            break;
+        case OP_MINNUM:
+            res = float32_minnum(a, b, s);
+            break;
+        case OP_MAXNUM:
+            res = float32_maxnum(a, b, s);
+            break;
+        case OP_MAXNUMMAG:
+            res = float32_maxnummag(a, b, s);
+            break;
+        case OP_IS_NAN:
+        {
+            float f = !!float32_is_any_nan(a);
+
+            res = float_to_u64(f);
+            break;
+        }
+        case OP_IS_INF:
+        {
+            float f = !!float32_is_infinity(a);
+
+            res = float_to_u64(f);
+            break;
+        }
+        case OP_ABS:
+            /* Fall-through: float32_abs does not handle NaN's */
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        res64 = res;
+        result_is_nan = isnan(*(float *)&res);
+    } else if (t->prec == PREC_DOUBLE) {
+        float64 a, b, c;
+        float64 *in[] = { &a, &b, &c };
+        int i;
+
+        assert(ops[t->op].n_operands <= ARRAY_SIZE(in));
+        for (i = 0; i < ops[t->op].n_operands; i++) {
+            *in[i] = t->operands[i].val;
+        }
+
+        switch (t->op) {
+        case OP_ADD:
+            res64 = float64_add(a, b, s);
+            break;
+        case OP_SUB:
+            res64 = float64_sub(a, b, s);
+            break;
+        case OP_MUL:
+            res64 = float64_mul(a, b, s);
+            break;
+        case OP_MULADD:
+            res64 = float64_muladd(a, b, c, 0, s);
+            break;
+        case OP_DIV:
+            res64 = float64_div(a, b, s);
+            break;
+        case OP_SQRT:
+            res64 = float64_sqrt(a, s);
+            break;
+        case OP_MINNUM:
+            res64 = float64_minnum(a, b, s);
+            break;
+        case OP_MAXNUM:
+            res64 = float64_maxnum(a, b, s);
+            break;
+        case OP_MAXNUMMAG:
+            res64 = float64_maxnummag(a, b, s);
+            break;
+        case OP_IS_NAN:
+        {
+            double d = !!float64_is_any_nan(a);
+
+            res64 = double_to_u64(d);
+            break;
+        }
+        case OP_IS_INF:
+        {
+            double d = !!float64_is_infinity(a);
+
+            res64 = double_to_u64(d);
+            break;
+        }
+        case OP_ABS:
+            /* Fall-through: float64_abs does not handle NaN's */
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        result_is_nan = isnan(*(double *)&res64);
+    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
+        float32 a = t->operands[0].val;
+
+        switch (t->op) {
+        case OP_FLOAT_TO_DOUBLE:
+            res64 = float32_to_float64(a, s);
+            break;
+        default:
+            return ERROR_NOT_HANDLED;
+        }
+        result_is_nan = isnan(*(double *)&res64);
+    } else {
+        return ERROR_NOT_HANDLED; /* XXX */
+    }
+    return tester_check(t, res64, result_is_nan, s->float_exception_flags);
+    return err;
+}
+
+static const struct tester valid_testers[] = {
+    [0] = {
+        .name = "soft",
+        .func = soft_tester,
+    },
+    [1] = {
+        .name = "host",
+        .func = host_tester,
+    },
+};
+
+static const struct tester *tester = &valid_testers[0];
+
+static int ibm_get_exceptions(const char *p, uint8_t *excp)
+{
+    while (*p) {
+        switch (*p) {
+        case 'x':
+            *excp |= float_flag_inexact;
+            break;
+        case 'u':
+            *excp |= float_flag_underflow;
+            break;
+        case 'o':
+            *excp |= float_flag_overflow;
+            break;
+        case 'z':
+            *excp |= float_flag_divbyzero;
+            break;
+        case 'i':
+            *excp |= float_flag_invalid;
+            break;
+        default:
+            return 1;
+        }
+        p++;
+    }
+    return 0;
+}
+
+static uint64_t fp_choose(enum precision prec, uint64_t f, uint64_t d)
+{
+    switch (prec) {
+    case PREC_FLOAT:
+        return f;
+    case PREC_DOUBLE:
+        return d;
+    default:
+        assert(false);
+    }
+}
+
+static int
+ibm_fp_hex(const char *p, enum precision prec, struct operand *ret)
+{
+    int len;
+
+    ret->type = OP_TYPE_NUMBER;
+
+    /* QNaN */
+    if (unlikely(!strcmp("Q", p))) {
+        ret->val = fp_choose(prec, 0xffc00000, 0xfff8000000000000);
+        ret->type = OP_TYPE_QNAN;
+        return 0;
+    }
+    /* SNaN */
+    if (unlikely(!strcmp("S", p))) {
+        ret->val = fp_choose(prec, 0xffb00000, 0xfff7000000000000);
+        ret->type = OP_TYPE_SNAN;
+        return 0;
+    }
+    if (unlikely(!strcmp("+Zero", p))) {
+        ret->val = fp_choose(prec, 0x00000000, 0x0000000000000000);
+        return 0;
+    }
+    if (unlikely(!strcmp("-Zero", p))) {
+        ret->val = fp_choose(prec, 0x80000000, 0x8000000000000000);
+        return 0;
+    }
+    if (unlikely(!strcmp("+inf", p) || !strcmp("+Inf", p))) {
+        ret->val = fp_choose(prec, 0x7f800000, 0x7ff0000000000000);
+        return 0;
+    }
+    if (unlikely(!strcmp("-inf", p) || !strcmp("-Inf", p))) {
+        ret->val = fp_choose(prec, 0xff800000, 0xfff0000000000000);
+        return 0;
+    }
+
+    len = strlen(p);
+
+    if (strchr(p, 'P')) {
+        bool negative = p[0] == '-';
+        char *pos;
+        bool denormal;
+
+        if (len <= 4) {
+            return 1;
+        }
+        denormal = p[1] == '0';
+        if (prec == PREC_FLOAT) {
+            uint32_t exponent;
+            uint32_t significand;
+            uint32_t h;
+
+            significand = strtoul(&p[3], &pos, 16);
+            if (*pos != 'P') {
+                return 1;
+            }
+            pos++;
+            exponent = strtol(pos, &pos, 10) + 127;
+            if (pos != p + len) {
+                return 1;
+            }
+            /*
+             * When there's a leading zero, we have a denormal number. We'd
+             * expect the input (unbiased) exponent to be -127, but for some
+             * reason -126 is used. Correct that here.
+             */
+            if (denormal) {
+                if (exponent != 1) {
+                    return 1;
+                }
+                exponent = 0;
+            }
+            h = negative ? (1 << 31) : 0;
+            h |= exponent << 23;
+            h |= significand;
+            ret->val = h;
+            return 0;
+        } else if (prec == PREC_DOUBLE) {
+            uint64_t exponent;
+            uint64_t significand;
+            uint64_t h;
+
+            significand = strtoul(&p[3], &pos, 16);
+            if (*pos != 'P') {
+                return 1;
+            }
+            pos++;
+            exponent = strtol(pos, &pos, 10) + 1023;
+            if (pos != p + len) {
+                return 1;
+            }
+            if (denormal) {
+                return 1; /* XXX */
+            }
+            h = negative ? (1ULL << 63) : 0;
+            h |= exponent << 52;
+            h |= significand;
+            ret->val = h;
+            return 0;
+        } else { /* XXX */
+            return 1;
+        }
+    } else if (strchr(p, 'e')) {
+        char *pos;
+
+        if (prec == PREC_FLOAT) {
+            float f = strtof(p, &pos);
+
+            if (*pos) {
+                return 1;
+            }
+            ret->val = float_to_u64(f);
+            return 0;
+        }
+        if (prec == PREC_DOUBLE) {
+            double d = strtod(p, &pos);
+
+            if (*pos) {
+                return 1;
+            }
+            ret->val = double_to_u64(d);
+            return 0;
+        }
+        return 0;
+    } else if (!strcmp(p, "0x0")) {
+        if (prec == PREC_FLOAT) {
+            ret->val = float_to_u64(0.0);
+        } else if (prec == PREC_DOUBLE) {
+            ret->val = double_to_u64(0.0);
+        } else {
+            assert(false);
+        }
+        return 0;
+    } else if (!strcmp(p, "0x1")) {
+        if (prec == PREC_FLOAT) {
+            ret->val = float_to_u64(1.0);
+        } else if (prec == PREC_DOUBLE) {
+            ret->val = double_to_u64(1.0);
+        } else {
+            assert(false);
+        }
+        return 0;
+    }
+    return 1;
+}
+
+static int find_op(const char *name, enum op *op)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(ops); i++) {
+        if (strcmp(ops[i].name, name) == 0) {
+            *op = i;
+            return 0;
+        }
+    }
+    return 1;
+}
+
+/* Syntax of IBM FP test cases:
+ * https://www.research.ibm.com/haifa/projects/verification/fpgen/syntax.txt
+ */
+static enum error ibm_test_line(const char *line)
+{
+    struct test_op t;
+    /* at most nine fields; this should be more than enough for each field */
+    char s[9][64];
+    char *p;
+    int n, field;
+    int i;
+
+    /* data lines start with either b32 or d(64|128) */
+    if (unlikely(line[0] != 'b' && line[0] != 'd')) {
+        return ERROR_COMMENT;
+    }
+    n = sscanf(line, "%63s %63s %63s %63s %63s %63s %63s %63s %63s",
+               s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7], s[8]);
+    if (unlikely(n < 5 || n > 9)) {
+        return ERROR_INPUT;
+    }
+
+    field = 0;
+    p = s[field];
+    if (unlikely(strlen(p) < 4)) {
+        return ERROR_INPUT;
+    }
+    if (strcmp("b32b64cff", p) == 0) {
+        t.prec = PREC_FLOAT_TO_DOUBLE;
+        if (find_op(&p[6], &t.op)) {
+            return ERROR_NOT_HANDLED;
+        }
+    } else {
+        if (strncmp("b32", p, 3) == 0) {
+            t.prec = PREC_FLOAT;
+        } else if (strncmp("d64", p, 3) == 0) {
+            t.prec = PREC_DOUBLE;
+        } else if (strncmp("d128", p, 4) == 0) {
+            return ERROR_NOT_HANDLED; /* XXX */
+        } else {
+            return ERROR_INPUT;
+        }
+        if (find_op(&p[3], &t.op)) {
+            return ERROR_NOT_HANDLED;
+        }
+    }
+
+    field = 1;
+    p = s[field];
+    if (!strncmp("=0", p, 2)) {
+        t.round = float_round_nearest_even;
+    } else {
+        return ERROR_NOT_HANDLED; /* XXX */
+    }
+
+    /* The trapped exceptions field is optional */
+    t.trapped_exceptions = 0;
+    field = 2;
+    p = s[field];
+    if (ibm_get_exceptions(p, &t.trapped_exceptions)) {
+        if (unlikely(n == 9)) {
+            return ERROR_INPUT;
+        }
+    } else {
+        field++;
+    }
+
+    for (i = 0; i < ops[t.op].n_operands; i++) {
+        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
+            PREC_FLOAT : t.prec;
+
+        p = s[field++];
+        if (ibm_fp_hex(p, prec, &t.operands[i])) {
+            return ERROR_INPUT;
+        }
+    }
+
+    p = s[field++];
+    if (strcmp("->", p)) {
+        return ERROR_INPUT;
+    }
+
+    p = s[field++];
+    if (unlikely(strcmp("#", p) == 0)) {
+        t.expected_result_is_valid = false;
+    } else {
+        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
+            PREC_DOUBLE : t.prec;
+
+        if (ibm_fp_hex(p, prec, &t.expected_result)) {
+            return ERROR_INPUT;
+        }
+        t.expected_result_is_valid = true;
+    }
+
+    /*
+     * A 0 here means "do not check the exceptions", i.e. it does NOT mean
+     * "there should be no exceptions raised".
+     */
+    t.exceptions = 0;
+    /* the expected exceptions field is optional */
+    if (field == n - 1) {
+        p = s[field++];
+        if (ibm_get_exceptions(p, &t.exceptions)) {
+            return ERROR_INPUT;
+        }
+    }
+
+    /*
+     * We ignore "trapped exceptions" because we're not testing the trapping
+     * mechanism of the host CPU.
+     * We test though that the exception bits are correctly set.
+     */
+    if (t.trapped_exceptions) {
+        return ERROR_NOT_HANDLED;
+    }
+    return tester->func(&t);
+}
+
+static const struct input valid_input_types[] = {
+    [INPUT_FMT_IBM] = {
+        .name = "ibm",
+        .test_line = ibm_test_line,
+    },
+};
+
+static const struct input *input_type = &valid_input_types[INPUT_FMT_IBM];
+
+static bool line_is_whitelisted(char *line)
+{
+    ENTRY e, *ep;
+
+    if (whitelist.ht.size == 0) {
+        return false;
+    }
+    e.key = line;
+    return hsearch_r(e, FIND, &ep, &whitelist.ht);
+}
+
+static void test_file(const char *filename)
+{
+    static char line[256];
+    unsigned int i;
+    FILE *fp;
+
+    fp = fopen(filename, "r");
+    if (fp == NULL) {
+        fprintf(stderr, "cannot open file '%s': %s\n",
+                filename, strerror(errno));
+        exit(EXIT_FAILURE);
+    }
+    i = 0;
+    while (fgets(line, sizeof(line), fp)) {
+        enum error err;
+
+        i++;
+        if (unlikely(line_is_whitelisted(line))) {
+            test_stats[ERROR_WHITELISTED]++;
+            continue;
+        }
+        err = input_type->test_line(line);
+        if (unlikely(is_err(err))) {
+            switch (err) {
+            case ERROR_INPUT:
+                fprintf(stderr, "error: malformed input @ %s:%d:\n",
+                        filename, i);
+                break;
+            case ERROR_RESULT:
+                fprintf(stderr, "error: result mismatch for input @ %s:%d:\n",
+                        filename, i);
+                break;
+            case ERROR_EXCEPTIONS:
+                fprintf(stderr, "error: flags mismatch for input @ %s:%d:\n",
+                        filename, i);
+                break;
+            default:
+                assert(false);
+            }
+            fprintf(stderr, "%s", line);
+            if (die_on_error) {
+                exit(EXIT_FAILURE);
+            }
+        }
+        test_stats[err]++;
+    }
+    if (fclose(fp)) {
+        fprintf(stderr, "warning: cannot close file '%s': %s\n",
+                filename, strerror(errno));
+    }
+}
+
+static void set_input_fmt(const char *optarg)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(valid_input_types); i++) {
+        const struct input *type = &valid_input_types[i];
+
+        if (strcmp(optarg, type->name) == 0) {
+            input_type = type;
+            return;
+        }
+    }
+    fprintf(stderr, "Unknown input format '%s'", optarg);
+    exit(EXIT_FAILURE);
+}
+
+static void set_tester(const char *optarg)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(valid_testers); i++) {
+        const struct tester *t = &valid_testers[i];
+
+        if (strcmp(optarg, t->name) == 0) {
+            tester = t;
+            return;
+        }
+    }
+    fprintf(stderr, "Unknown tester '%s'", optarg);
+    exit(EXIT_FAILURE);
+}
+
+static void whitelist_add_line(const char *orig_line)
+{
+    char *line = strdup(orig_line);
+    bool inserted;
+    ENTRY e, *ep;
+    int r;
+
+    if (whitelist.ht.size == 0) {
+        if (!hcreate_r(4096, &whitelist.ht)) {
+            fprintf(stderr, "%s: error creating hash table\n", __func__);
+        }
+    }
+
+    int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,
+              struct hsearch_data *htab);
+
+    e.key = line;
+    r = hsearch_r(e, FIND, &ep, &whitelist.ht);
+    if (unlikely(r)) {
+        free(line);
+        return;
+    }
+    whitelist.n++;
+    whitelist.lines = realloc(whitelist.lines, (whitelist.n * sizeof(line)));
+    whitelist.lines[whitelist.n - 1] = line;
+    e.data = line;
+    inserted = hsearch_r(e, ENTER, &ep, &whitelist.ht);
+    assert(inserted);
+}
+
+static void set_whitelist(const char *filename)
+{
+    FILE *fp;
+    static char line[256];
+
+    fp = fopen(filename, "r");
+    if (fp == NULL) {
+        fprintf(stderr, "warning: cannot open white list file '%s': %s\n",
+                filename, strerror(errno));
+        return;
+    }
+    while (fgets(line, sizeof(line), fp)) {
+        if (isspace(line[0]) || line[0] == '#') {
+            continue;
+        }
+        whitelist_add_line(line);
+    }
+    if (fclose(fp)) {
+        fprintf(stderr, "warning: cannot close file '%s': %s\n",
+                filename, strerror(errno));
+    }
+}
+
+static void set_default_exceptions(const char *str)
+{
+    if (ibm_get_exceptions(str, &default_exceptions)) {
+        fprintf(stderr, "Invalid exception '%s'\n", str);
+        exit(EXIT_FAILURE);
+    }
+}
+
+static void usage_complete(int argc, char *argv[])
+{
+    fprintf(stderr, "Usage: %s [options] file1 [file2 ...]\n", argv[0]);
+    fprintf(stderr, "options:\n");
+    fprintf(stderr, "  -n = do not die on error. Default: dies on error\n");
+    fprintf(stderr, "  -e = default exception flags (xiozu). Default: none\n");
+    fprintf(stderr, "  -f = format of the input file(s). Default: %s\n",
+            valid_input_types[0].name);
+    fprintf(stderr, "  -t = tester. Default: %s\n", valid_testers[0].name);
+    fprintf(stderr, "  -w = path to file with test cases to be whitelisted\n");
+    fprintf(stderr, "  -a = Perform tininess detection after rounding "
+            "(soft tester only). Default: before\n");
+    fprintf(stderr, "  -z = flush inputs to zero (soft tester only). "
+            "Default: disabled\n");
+    fprintf(stderr, "  -Z = flush output to zero (soft tester only). "
+            "Default: disabled\n");
+}
+
+static void parse_opts(int argc, char *argv[])
+{
+    int c;
+
+    for (;;) {
+        c = getopt(argc, argv, "ae:f:hnt:w:zZ");
+        if (c < 0) {
+            return;
+        }
+        switch (c) {
+        case 'e':
+            set_default_exceptions(optarg);
+            break;
+        case 'f':
+            set_input_fmt(optarg);
+            break;
+        case 'h':
+            usage_complete(argc, argv);
+            exit(EXIT_SUCCESS);
+        case 'n':
+            die_on_error = false;
+            break;
+        case 't':
+            set_tester(optarg);
+            break;
+        case 'w':
+            set_whitelist(optarg);
+            break;
+        case 'a':
+            soft_status.float_detect_tininess = float_tininess_after_rounding;
+            break;
+        case 'z':
+            soft_status.flush_inputs_to_zero = 1;
+            break;
+        case 'Z':
+            soft_status.flush_to_zero = 1;
+            break;
+        }
+    }
+    assert(false);
+}
+
+static uint64_t count_errors(void)
+{
+    uint64_t ret = 0;
+    int i;
+
+    for (i = ERROR_INPUT; i < ERROR_MAX; i++) {
+        ret += test_stats[i];
+    }
+    return ret;
+}
+
+int main(int argc, char *argv[])
+{
+    uint64_t n_errors;
+    int i;
+
+    if (argc == 1) {
+        usage_complete(argc, argv);
+        exit(EXIT_FAILURE);
+    }
+    parse_opts(argc, argv);
+    for (i = optind; i < argc; i++) {
+        test_file(argv[i]);
+    }
+
+    n_errors = count_errors();
+    if (n_errors) {
+        printf("Tests failed: %"PRIu64". Parsing: %"PRIu64
+               ", result:%"PRIu64", flags:%"PRIu64"\n",
+               n_errors, test_stats[ERROR_INPUT], test_stats[ERROR_RESULT],
+               test_stats[ERROR_EXCEPTIONS]);
+    } else {
+        printf("All tests OK.\n");
+    }
+    printf("Tests passed: %" PRIu64 ". Not handled: %" PRIu64
+           ", whitelisted: %"PRIu64 "\n",
+           test_stats[ERROR_NONE], test_stats[ERROR_NOT_HANDLED],
+           test_stats[ERROR_WHITELISTED]);
+    return !!n_errors;
+}
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (39 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite Alex Bennée
@ 2018-04-19 13:58 ` Alex Bennée
  2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!) Alex Bennée
                   ` (7 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:58 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

The compile for fp-test is a little funky as we need to include a
build of QEMU's softfloat as well. There is still a problem caused by
the inclusion of config-host.h by osdep.h as it will trigger problems
like:

  In file included from /home/alex/lsrc/qemu/qemu.git/include/qemu/bitops.h:16:0,
                   from /home/alex/lsrc/qemu/qemu.git/fpu/softfloat.c:87:
  /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h: In function ‘mulu64’:
  /home/alex/lsrc/qemu/qemu.git/include/qemu/host-utils.h:35:5: error: unknown type name ‘__uint128_t’
       __uint128_t r = (__uint128_t)a * b;
     ^

When trying to cross build i386 on an x86_64 host.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/multiarch/Makefile.target | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index a691fd59d3..52adc18625 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -28,3 +28,21 @@ run-test-mmap: test-mmap
 	-$(QEMU) -p 16384 ./test-mmap 16384
 	-$(QEMU) -p 32768 ./test-mmap 32768
 
+#
+# Include the fp-test from the main test suite
+#
+
+VPATH+=$(SRC_PATH)/tests/fp
+VPATH+=$(SRC_PATH)/fpu
+TESTS+=fp-test
+
+FP_CFLAGS := $(CFLAGS) -Wall -O0 -g -fno-strict-aliasing
+FP_CFLAGS += $(QEMU_INCLUDES)
+FP_CFLAGS += -D_GNU_SOURCE -DHW_POISON_H
+
+fp-test.o softfloat.o: %.o: %.c
+	$(CC) $(FP_CFLAGS) -c $< -o $@
+
+fp-test: fp-test.o softfloat.o
+	$(CC) $^ -o $@ -lm -static
+
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (40 preceding siblings ...)
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set Alex Bennée
@ 2018-04-19 13:59 ` Alex Bennée
  2018-04-19 22:02   ` Richard Henderson
  2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP) Alex Bennée
                   ` (6 subsequent siblings)
  48 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:59 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This prevents us trying to build fp-test for 32 bit guests as they
would fail due to pollution from config-host.h when including osdep.h.
As keeping softfloat.o would be useful maybe we can conditionally
disabled it?

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/tcg/multiarch/Makefile.target | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target
index 52adc18625..8bf6f3f8dc 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -31,6 +31,7 @@ run-test-mmap: test-mmap
 #
 # Include the fp-test from the main test suite
 #
+ifneq (,$(findstring 64,$(TARGET_NAME)))
 
 VPATH+=$(SRC_PATH)/tests/fp
 VPATH+=$(SRC_PATH)/fpu
@@ -46,3 +47,4 @@ fp-test.o softfloat.o: %.o: %.c
 fp-test: fp-test.o softfloat.o
 	$(CC) $^ -o $@ -lm -static
 
+endif
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* [Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP)
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (41 preceding siblings ...)
  2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!) Alex Bennée
@ 2018-04-19 13:59 ` Alex Bennée
  2018-04-19 14:52 ` [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg no-reply
                   ` (5 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 13:59 UTC (permalink / raw)
  To: peter.maydell, cota, famz, berrange, f4bug, richard.henderson,
	balrogg, aurelien, agraf
  Cc: qemu-devel, Alex Bennée

This adds support for the various FOO-to-BAR conversions to fp-test.
It also defines PREC_HALF although currently that is not used and will
need compile time detection for _Float16 support.

I've added a small test file for testing against regressions.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/fp/fp-test.c                    | 535 +++++++++++++++++++++++---
 tests/fp/qemu/regression-tests.fptest |   7 +
 2 files changed, 479 insertions(+), 63 deletions(-)
 create mode 100644 tests/fp/qemu/regression-tests.fptest

diff --git a/tests/fp/fp-test.c b/tests/fp/fp-test.c
index 27db552160..320da2398a 100644
--- a/tests/fp/fp-test.c
+++ b/tests/fp/fp-test.c
@@ -38,15 +38,167 @@ struct input {
 };
 
 enum precision {
+    PREC_HALF,
     PREC_FLOAT,
     PREC_DOUBLE,
     PREC_QUAD,
+    /* Integers */
+    PREC_INT16,
+    PREC_INT32,
+    PREC_INT64,
+    PREC_UINT16,
+    PREC_UINT32,
+    PREC_UINT64,
+    /* Float to Float conversions */
+    PREC_HALF_TO_FLOAT,
+    PREC_HALF_TO_DOUBLE,
+    PREC_FLOAT_TO_HALF,
     PREC_FLOAT_TO_DOUBLE,
+    PREC_DOUBLE_TO_HALF,
+    PREC_DOUBLE_TO_FLOAT,
+    /* Float to Int conversions */
+    PREC_HALF_TO_INT16,
+    PREC_HALF_TO_INT32,
+    PREC_HALF_TO_INT64,
+    PREC_FLOAT_TO_INT16,
+    PREC_FLOAT_TO_INT32,
+    PREC_FLOAT_TO_INT64,
+    PREC_DOUBLE_TO_INT16,
+    PREC_DOUBLE_TO_INT32,
+    PREC_DOUBLE_TO_INT64,
+    /* Float to unsigned int conversions */
+    PREC_HALF_TO_UINT16,
+    PREC_HALF_TO_UINT32,
+    PREC_HALF_TO_UINT64,
+    PREC_FLOAT_TO_UINT16,
+    PREC_FLOAT_TO_UINT32,
+    PREC_FLOAT_TO_UINT64,
+    PREC_DOUBLE_TO_UINT16,
+    PREC_DOUBLE_TO_UINT32,
+    PREC_DOUBLE_TO_UINT64,
+    /* Int to float conversions */
+    PREC_INT16_TO_HALF,
+    PREC_INT16_TO_FLOAT,
+    PREC_INT16_TO_DOUBLE,
+    PREC_INT32_TO_HALF,
+    PREC_INT32_TO_FLOAT,
+    PREC_INT32_TO_DOUBLE,
+    PREC_INT64_TO_HALF,
+    PREC_INT64_TO_FLOAT,
+    PREC_INT64_TO_DOUBLE,
+    /* Unsigned int to float conversions */
+    PREC_UINT16_TO_HALF,
+    PREC_UINT16_TO_FLOAT,
+    PREC_UINT16_TO_DOUBLE,
+    PREC_UINT32_TO_HALF,
+    PREC_UINT32_TO_FLOAT,
+    PREC_UINT32_TO_DOUBLE,
+    PREC_UINT64_TO_HALF,
+    PREC_UINT64_TO_FLOAT,
+    PREC_UINT64_TO_DOUBLE,
 };
 
+static enum precision get_input_prec(enum precision prec)
+{
+    /* Map conversions to input precision */
+    if (prec >= PREC_HALF_TO_FLOAT) {
+        switch (prec) {
+        case PREC_HALF_TO_FLOAT:
+        case PREC_HALF_TO_DOUBLE:
+        case PREC_HALF_TO_INT16:
+        case PREC_HALF_TO_INT32:
+        case PREC_HALF_TO_INT64:
+        case PREC_HALF_TO_UINT16:
+        case PREC_HALF_TO_UINT32:
+        case PREC_HALF_TO_UINT64:
+            return PREC_HALF;
+        case PREC_FLOAT_TO_HALF:
+        case PREC_FLOAT_TO_DOUBLE:
+        case PREC_FLOAT_TO_INT16:
+        case PREC_FLOAT_TO_INT32:
+        case PREC_FLOAT_TO_INT64:
+        case PREC_FLOAT_TO_UINT16:
+        case PREC_FLOAT_TO_UINT32:
+        case PREC_FLOAT_TO_UINT64:
+            return PREC_FLOAT;
+        case PREC_DOUBLE_TO_HALF:
+        case PREC_DOUBLE_TO_FLOAT:
+        case PREC_DOUBLE_TO_INT16:
+        case PREC_DOUBLE_TO_INT32:
+        case PREC_DOUBLE_TO_INT64:
+        case PREC_DOUBLE_TO_UINT16:
+        case PREC_DOUBLE_TO_UINT32:
+        case PREC_DOUBLE_TO_UINT64:
+            return PREC_DOUBLE;
+        default:
+            assert(false);
+        }
+    }
+
+    return prec;
+}
+
+static enum precision get_output_prec(enum precision prec)
+{
+    /* Map conversions to input precision */
+    if (prec >= PREC_HALF_TO_FLOAT) {
+        switch (prec) {
+        case PREC_FLOAT_TO_HALF:
+        case PREC_DOUBLE_TO_HALF:
+        case PREC_INT16_TO_HALF:
+        case PREC_INT32_TO_HALF:
+        case PREC_INT64_TO_HALF:
+        case PREC_UINT16_TO_HALF:
+        case PREC_UINT32_TO_HALF:
+        case PREC_UINT64_TO_HALF:
+            return PREC_HALF;
+        case PREC_HALF_TO_FLOAT:
+        case PREC_DOUBLE_TO_FLOAT:
+            return PREC_FLOAT;
+        case PREC_HALF_TO_DOUBLE:
+        case PREC_FLOAT_TO_DOUBLE:
+            return PREC_DOUBLE;
+        case PREC_HALF_TO_INT16:
+        case PREC_FLOAT_TO_INT16:
+        case PREC_DOUBLE_TO_INT16:
+            return PREC_INT16;
+        case PREC_HALF_TO_INT32:
+        case PREC_FLOAT_TO_INT32:
+        case PREC_DOUBLE_TO_INT32:
+            return PREC_INT32;
+        case PREC_HALF_TO_INT64:
+        case PREC_FLOAT_TO_INT64:
+        case PREC_DOUBLE_TO_INT64:
+            return PREC_INT64;
+        case PREC_HALF_TO_UINT16:
+        case PREC_FLOAT_TO_UINT16:
+        case PREC_DOUBLE_TO_UINT16:
+            return PREC_UINT16;
+        case PREC_HALF_TO_UINT32:
+        case PREC_FLOAT_TO_UINT32:
+        case PREC_DOUBLE_TO_UINT32:
+            return PREC_UINT32;
+        case PREC_HALF_TO_UINT64:
+        case PREC_FLOAT_TO_UINT64:
+        case PREC_DOUBLE_TO_UINT64:
+            return PREC_UINT64;
+        default:
+            assert(false);
+        }
+    }
+
+    return prec;
+}
+
+typedef struct {
+    char *opstr;
+    enum precision prec;
+} map_to_prec;
+
 struct op_desc {
     const char * const name;
     int n_operands;
+    map_to_prec *decode_tbl;
 };
 
 enum op {
@@ -62,9 +214,46 @@ enum op {
     OP_ABS,
     OP_IS_NAN,
     OP_IS_INF,
-    OP_FLOAT_TO_DOUBLE,
+    /* All above are conversions */
+    OP_FLOAT_TO_FLOAT,
+    OP_FLOAT_TO_INT,
+    OP_FLOAT_TO_UINT,
+    OP_INT_TO_FLOAT,
+    OP_UINT_TO_FLOAT
 };
 
+map_to_prec float_to_float[] = { {"b16b32", PREC_HALF_TO_FLOAT},
+                                 {"b16b64", PREC_HALF_TO_DOUBLE},
+                                 {"b32b16", PREC_FLOAT_TO_HALF},
+                                 {"b32b64", PREC_FLOAT_TO_DOUBLE},
+                                 {"b64b16", PREC_DOUBLE_TO_HALF},
+                                 {"b64b32", PREC_DOUBLE_TO_FLOAT},
+                                 { NULL, 0} };
+
+map_to_prec float_to_int[] = { {"b16b16", PREC_HALF_TO_INT16},
+                               {"b16b32", PREC_HALF_TO_INT16},
+                               {"b16b64", PREC_HALF_TO_INT16},
+                               {"b32b16", PREC_FLOAT_TO_INT16},
+                               {"b32b32", PREC_FLOAT_TO_INT32},
+                               {"b32b64", PREC_FLOAT_TO_INT64},
+                               {"b64b16", PREC_DOUBLE_TO_INT16},
+                               {"b64b32", PREC_DOUBLE_TO_INT32},
+                               {"b64b64", PREC_DOUBLE_TO_INT64},
+                               { NULL, 0} };
+
+static enum precision decode_map_table(map_to_prec *tbl, char *opstr)
+{
+    while (tbl->opstr) {
+        if (strncmp(tbl->opstr, opstr, strlen(tbl->opstr)) == 0) {
+            return tbl->prec;
+        }
+        tbl++;
+    }
+
+    /* lookup failed */
+    assert(false);
+}
+
 static const struct op_desc ops[] = {
     [OP_ADD] =       { "+", 2 },
     [OP_SUB] =       { "-", 2 },
@@ -78,7 +267,11 @@ static const struct op_desc ops[] = {
     [OP_ABS] =       { "A", 1 },
     [OP_IS_NAN] =    { "?N", 1 },
     [OP_IS_INF] =    { "?i", 1 },
-    [OP_FLOAT_TO_DOUBLE] = { "cff", 1 },
+    [OP_FLOAT_TO_FLOAT] = { "cff", 1, float_to_float },
+    [OP_FLOAT_TO_INT] = { "cfi", 1, float_to_int },
+    [OP_FLOAT_TO_UINT] = { "cfu", 1 },
+    [OP_INT_TO_FLOAT] = { "cif", 1 },
+    [OP_UINT_TO_FLOAT] = { "cuf", 1 },
 };
 
 /*
@@ -269,6 +462,159 @@ static enum error tester_check(const struct test_op *t, uint64_t res64,
     return err;
 }
 
+static float get_float(struct operand op)
+{
+    switch (op.type) {
+    case OP_TYPE_QNAN:
+        return __builtin_nanf("");
+    case OP_TYPE_SNAN:
+        return __builtin_nansf("");
+    default:
+        return u64_to_float(op.val);
+    }
+}
+
+static double get_double(struct operand op)
+{
+    switch (op.type) {
+    case OP_TYPE_QNAN:
+        return __builtin_nanf("");
+    case OP_TYPE_SNAN:
+        return __builtin_nansf("");
+    default:
+        return u64_to_double(op.val);
+    }
+}
+
+static enum error host_tester_cff(struct test_op *t)
+{
+    float in32, res32;
+    double in64, res64;
+    bool result_is_nan;
+    uint8_t flags = 0;
+
+    assert(t->op == OP_FLOAT_TO_FLOAT);
+
+    switch (t->prec) {
+    case PREC_HALF_TO_FLOAT:
+    case PREC_HALF_TO_DOUBLE:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_DOUBLE:
+    {
+        in32 = get_float(t->operands[0]);
+        t->expected_result.val = double_to_u64(get_double(t->expected_result));
+        res64 = (double) in32;
+        break;
+    }
+    case PREC_DOUBLE_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_DOUBLE_TO_FLOAT:
+        in64 = get_double(t->operands[0]);
+        t->expected_result.val = float_to_u64(get_float(t->expected_result));
+        res32 = (float) in64;
+        break;
+    default:
+        return ERROR_NOT_HANDLED;
+    }
+
+    flags = host_get_exceptions();
+
+    switch (t->prec) {
+    case PREC_HALF_TO_DOUBLE:
+    case PREC_FLOAT_TO_DOUBLE:
+        result_is_nan = isnan(res64);
+        return tester_check(t, res64, result_is_nan, flags);
+    case PREC_HALF_TO_FLOAT:
+    case PREC_DOUBLE_TO_FLOAT:
+        result_is_nan = isnan(res32);
+        return tester_check(t, res32, result_is_nan, flags);
+    default:
+        assert(false);
+    }
+
+    return ERROR_NOT_HANDLED;
+}
+
+static enum error host_tester_cfi(struct test_op *t)
+{
+    uint8_t flags = 0;
+    float in32;
+    double in64;
+    uint64_t res;
+
+    assert(t->op == OP_FLOAT_TO_INT || t->op == OP_FLOAT_TO_UINT);
+
+    switch (get_input_prec(t->prec)) {
+    case PREC_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT:
+        in32 = get_float(t->operands[0]);
+        break;
+    case PREC_DOUBLE:
+        in64 = get_double(t->operands[0]);
+        break;
+    default:
+        assert(false);
+    }
+
+
+    switch (t->prec) {
+    case PREC_HALF_TO_INT16:
+    case PREC_HALF_TO_INT32:
+    case PREC_HALF_TO_INT64:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_INT16:
+    {
+        int16_t oi16 = (int16_t) in32;
+        res = (uint64_t) oi16;
+        break;
+    }
+    case PREC_FLOAT_TO_INT32:
+    {
+        int32_t oi32 = (int32_t) in32;
+        res = (uint64_t) oi32;
+        break;
+    }
+    case PREC_FLOAT_TO_INT64:
+    {
+        int64_t oi64 = (int64_t) in32;
+        res = (uint64_t) oi64;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT16:
+    {
+        int16_t oi16 = (int16_t) in64;
+        res = (uint64_t) oi16;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT32:
+    {
+        int32_t oi32 = (int32_t) in64;
+        res = (uint64_t) oi32;
+        break;
+    }
+    case PREC_DOUBLE_TO_INT64:
+    {
+        int64_t oi64 = (int64_t) in64;
+        res = (uint64_t) oi64;
+        break;
+    }
+    default:
+        assert(false);
+    }
+
+    flags = host_get_exceptions();
+
+    return tester_check(t, res, false, flags);
+}
+
+static enum error host_tester_cif(struct test_op *t)
+{
+    return ERROR_NOT_HANDLED;
+}
+
 static enum error host_tester(struct test_op *t)
 {
     uint64_t res64;
@@ -280,6 +626,20 @@ static enum error host_tester(struct test_op *t)
         host_set_exceptions(default_exceptions);
     }
 
+    /* Handle conversions first */
+    switch (t->op) {
+    case OP_FLOAT_TO_FLOAT:
+        return host_tester_cff(t);
+    case OP_FLOAT_TO_INT:
+    case OP_FLOAT_TO_UINT:
+        return host_tester_cfi(t);
+    case OP_INT_TO_FLOAT:
+    case OP_UINT_TO_FLOAT:
+        return host_tester_cif(t);
+    default:
+        break;
+    }
+
     if (t->prec == PREC_FLOAT) {
         float a, b, c;
         float *in[] = { &a, &b, &c };
@@ -396,40 +756,68 @@ static enum error host_tester(struct test_op *t)
         flags = host_get_exceptions();
         res64 = double_to_u64(res);
         result_is_nan = isnan(res);
-    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
-        float a;
-        double res;
-
-        if (t->operands[0].type == OP_TYPE_QNAN) {
-            a = __builtin_nanf("");
-        } else if (t->operands[0].type == OP_TYPE_SNAN) {
-            a = __builtin_nansf("");
-        } else {
-            a = u64_to_float(t->operands[0].val);
-        }
-
-        if (t->expected_result.type == OP_TYPE_QNAN) {
-            t->expected_result.val = double_to_u64(__builtin_nan(""));
-        } else if (t->expected_result.type == OP_TYPE_SNAN) {
-            t->expected_result.val = double_to_u64(__builtin_nans(""));
-        }
-
-        switch (t->op) {
-        case OP_FLOAT_TO_DOUBLE:
-            res = a;
-            break;
-        default:
-            return ERROR_NOT_HANDLED;
-        }
-        flags = host_get_exceptions();
-        res64 = double_to_u64(res);
-        result_is_nan = isnan(res);
     } else {
         return ERROR_NOT_HANDLED; /* XXX */
     }
     return tester_check(t, res64, result_is_nan, flags);
 }
 
+static enum error soft_tester_cff(struct test_op *t, float_status *s)
+{
+    float in32, res32;
+    double in64, res64;
+    bool result_is_nan;
+
+    assert(t->op == OP_FLOAT_TO_FLOAT);
+
+    switch (t->prec) {
+    case PREC_HALF_TO_FLOAT:
+    case PREC_HALF_TO_DOUBLE:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_FLOAT_TO_DOUBLE:
+    {
+        in32 = get_float(t->operands[0]);
+        t->expected_result.val = double_to_u64(get_double(t->expected_result));
+        res64 = float32_to_float64(in32, s);
+        break;
+    }
+    case PREC_DOUBLE_TO_HALF:
+        return ERROR_NOT_HANDLED;
+    case PREC_DOUBLE_TO_FLOAT:
+        in64 = get_double(t->operands[0]);
+        t->expected_result.val = float_to_u64(get_float(t->expected_result));
+        res32 = float64_to_float32(in64, s);
+        break;
+    default:
+        return ERROR_NOT_HANDLED;
+    }
+
+    switch (t->prec) {
+    case PREC_HALF_TO_DOUBLE:
+    case PREC_FLOAT_TO_DOUBLE:
+        result_is_nan = isnan(res64);
+        return tester_check(t, res64, result_is_nan, s->float_exception_flags);
+    case PREC_HALF_TO_FLOAT:
+    case PREC_DOUBLE_TO_FLOAT:
+        result_is_nan = isnan(res32);
+        return tester_check(t, res32, result_is_nan, s->float_exception_flags);
+    default:
+        assert(false);
+    }
+}
+
+static enum error soft_tester_cfi(struct test_op *t, float_status *s)
+{
+    return ERROR_NOT_HANDLED;
+}
+
+static enum error soft_tester_cif(struct test_op *t, float_status *s)
+{
+    return ERROR_NOT_HANDLED;
+}
+
 static enum error soft_tester(struct test_op *t)
 {
     float_status *s = &soft_status;
@@ -440,6 +828,20 @@ static enum error soft_tester(struct test_op *t)
     s->float_rounding_mode = t->round;
     s->float_exception_flags = default_exceptions;
 
+    /* Handle conversions first */
+    switch (t->op) {
+    case OP_FLOAT_TO_FLOAT:
+        return soft_tester_cff(t, s);
+    case OP_FLOAT_TO_INT:
+    case OP_FLOAT_TO_UINT:
+        return soft_tester_cfi(t, s);
+    case OP_INT_TO_FLOAT:
+    case OP_UINT_TO_FLOAT:
+        return soft_tester_cif(t, s);
+    default:
+        break;
+    }
+
     if (t->prec == PREC_FLOAT) {
         float32 a, b, c;
         float32 *in[] = { &a, &b, &c };
@@ -558,17 +960,6 @@ static enum error soft_tester(struct test_op *t)
             return ERROR_NOT_HANDLED;
         }
         result_is_nan = isnan(*(double *)&res64);
-    } else if (t->prec == PREC_FLOAT_TO_DOUBLE) {
-        float32 a = t->operands[0].val;
-
-        switch (t->op) {
-        case OP_FLOAT_TO_DOUBLE:
-            res64 = float32_to_float64(a, s);
-            break;
-        default:
-            return ERROR_NOT_HANDLED;
-        }
-        result_is_nan = isnan(*(double *)&res64);
     } else {
         return ERROR_NOT_HANDLED; /* XXX */
     }
@@ -752,23 +1143,41 @@ ibm_fp_hex(const char *p, enum precision prec, struct operand *ret)
             return 0;
         }
         return 0;
-    } else if (!strcmp(p, "0x0")) {
-        if (prec == PREC_FLOAT) {
-            ret->val = float_to_u64(0.0);
-        } else if (prec == PREC_DOUBLE) {
-            ret->val = double_to_u64(0.0);
-        } else {
-            assert(false);
+    } else if (strncmp("0x", p, 2) == 0) {
+        unsigned long long result;
+        char *end;
+
+        result = strtoull(p, &end, 16);
+        if (result == 0 && end == p) {
+            /* not a number */
+            return 1;
+        } else if (result == ULLONG_MAX && errno) {
+            /* value does not fit in unsigned long long */
+            return 1;
+        } else if (*end) {
+            /* began with a number but has junk left over at the end */
+            return 1;
         }
-        return 0;
-    } else if (!strcmp(p, "0x1")) {
-        if (prec == PREC_FLOAT) {
-            ret->val = float_to_u64(1.0);
-        } else if (prec == PREC_DOUBLE) {
-            ret->val = double_to_u64(1.0);
-        } else {
+
+        switch (prec) {
+        case PREC_FLOAT:
+            ret->val = float_to_u64(result);
+            break;
+        case PREC_DOUBLE:
+            ret->val = double_to_u64(result);
+            break;
+        case PREC_INT16:
+        case PREC_INT32:
+        case PREC_INT64:
+        case PREC_UINT16:
+        case PREC_UINT32:
+        case PREC_UINT64:
+            ret->val = result;
+            break;
+        default:
             assert(false);
         }
+
         return 0;
     }
     return 1;
@@ -814,11 +1223,14 @@ static enum error ibm_test_line(const char *line)
     if (unlikely(strlen(p) < 4)) {
         return ERROR_INPUT;
     }
-    if (strcmp("b32b64cff", p) == 0) {
-        t.prec = PREC_FLOAT_TO_DOUBLE;
+    /* Conversions are of the form bXXbYYcZZ */
+    if (p[0] == 'b' && p[3] == 'b' && p[6] == 'c') {
         if (find_op(&p[6], &t.op)) {
+            fprintf(stderr, "%s: unhandled conversion %s\n", __func__, p);
             return ERROR_NOT_HANDLED;
         }
+        assert(ops[t.op].decode_tbl);
+        t.prec = decode_map_table(ops[t.op].decode_tbl, p);
     } else {
         if (strncmp("b32", p, 3) == 0) {
             t.prec = PREC_FLOAT;
@@ -855,9 +1267,7 @@ static enum error ibm_test_line(const char *line)
     }
 
     for (i = 0; i < ops[t.op].n_operands; i++) {
-        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
-            PREC_FLOAT : t.prec;
-
+        enum precision prec = get_input_prec(t.prec);
         p = s[field++];
         if (ibm_fp_hex(p, prec, &t.operands[i])) {
             return ERROR_INPUT;
@@ -873,8 +1283,7 @@ static enum error ibm_test_line(const char *line)
     if (unlikely(strcmp("#", p) == 0)) {
         t.expected_result_is_valid = false;
     } else {
-        enum precision prec = t.prec == PREC_FLOAT_TO_DOUBLE ?
-            PREC_DOUBLE : t.prec;
+        enum precision prec = get_output_prec(t.prec);
 
         if (ibm_fp_hex(p, prec, &t.expected_result)) {
             return ERROR_INPUT;
@@ -943,7 +1352,7 @@ static void test_file(const char *filename)
         enum error err;
 
         i++;
-        if (unlikely(line_is_whitelisted(line))) {
+        if (whitelist.n > 0 && unlikely(line_is_whitelisted(line))) {
             test_stats[ERROR_WHITELISTED]++;
             continue;
         }
diff --git a/tests/fp/qemu/regression-tests.fptest b/tests/fp/qemu/regression-tests.fptest
new file mode 100644
index 0000000000..a105d3aa44
--- /dev/null
+++ b/tests/fp/qemu/regression-tests.fptest
@@ -0,0 +1,7 @@
+QEMU Floating point regression tests
+------------------------------------
+
+b32b32cfi =0 -Inf -> 0xffffffff80000000 i
+b32b32cfi =0 +Inf -> 0xffffffff80000000 i
+b32b64cfi =0 -Inf -> 0x8000000000000000 i
+b32b64cfi =0 +Inf -> 0x8000000000000000 i
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (42 preceding siblings ...)
  2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP) Alex Bennée
@ 2018-04-19 14:52 ` no-reply
  2018-04-19 15:02 ` no-reply
                   ` (4 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: no-reply @ 2018-04-19 14:52 UTC (permalink / raw)
  To: alex.bennee; +Cc: famz, peter.maydell, cota

Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180419135901.30035-1-alex.bennee@linaro.org
Subject: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/20180411185425.2461-1-mreitz@redhat.com -> patchew/20180411185425.2461-1-mreitz@redhat.com
 * [new tag]               patchew/20180419135901.30035-1-alex.bennee@linaro.org -> patchew/20180419135901.30035-1-alex.bennee@linaro.org
Switched to a new branch 'test'
2cf210de25 tests: fp-test add fcvt support (!INCOMPLETE WIP)
c59ace380c tests/tcg: disable fp-test for 32 bit (HACK!)
3f6d6b37b3 tests/tcg/multiarch: add fp-test into multiarch set
a3942903d8 tests: add fp-test, a floating point test suite
93637ad78f softfloat: do not include glib headers
6cee90fce9 osdep: disable glib-compat.h include with QEMU_NO_GLIB
3f76b148e3 tests/Makefile.include: add (clean-)check-tcg targets
2b09de310b Makefile.target: add (clean-)guest-tests targets
64f32a347c tests/tcg/Makefile: update to be called from Makefile.target
b6dd1c4257 tests/tcg: enable building for ppc64
ed516c56c9 tests/tcg: enable building for s390x
af045c00c8 tests/tcg/mips: include common mips hello-mips
9c8573e3ad tests/tcg: enable building for MIPS
801dbba4ae tests/tcg: move MIPS specific tests into subdir
842030aa82 tests/tcg/aarch64: userspace system register test
a64644b63b tests/tcg/aarch64: add fcvt test cases for AArch64
1c9bd71293 tests/tcg/aarch64: add Makefile.target
c52e2f1c49 tests/tcg/arm: fix up test-arm-iwmmxt test
d14bdceb14 tests/tcg: move ARM specific tests into subdir
a929743e6c tests/tcg/i386/test-i386: fix printf format
1ab161b2e5 tests/tcg/i386/test-i386: use modern vector_size attributes
4a0590ba5e tests/tcg/x86_64: add Makefile.target
7732ca011f tests/tcg/i386: disable i386 version of test-i386-ssse
f95c12d39d tests/tcg/i386: fix test-i386-fprem
40782bcd69 tests/tcg/i386: fix test-i386
ea0cc36d3a tests/tcg/i386: Build fix for hello-i386
f86342742d tests/tcg: enable building for i386
c5ddd1785c docker: Add fedora-i386-cross image
58d31ffc85 tests/tcg: move i386 specific tests into subdir
0f322b2f8a tests/tcg/multiarch: enable additional linux-test tests
d2b649419a tests/tcg/multiarch: Build fix for linux-test
7c270a5818 tests/tcg: move architecture independent tests into subdir
fe04f2a58e docker: Makefile.include introduce DOCKER_SCRIPT
387090cde5 docker: allow "cc" command to run in user context
cc7e3225c2 docker: extend "cc" command to accept compiler
b2098ca1ca docker: Add "cc" subcommand
307a60adf2 Makefile: Rename TARGET_DIRS to TARGET_LIST
d6157c5262 configure: set cross_cc_FOO for host compiler
2afce5fc4d configure: allow user to specify --cross-cc-cflags-foo=
efd2616b8e configure: move i386_cc to cross_cc_i386
887941a91c configure: add support for --cross-cc-FOO
947d99fae7 configure: add test for docker availability
7e41971dca docker: add "probe" command for configure

=== OUTPUT BEGIN ===
Checking PATCH 1/43: docker: add "probe" command for configure...
Checking PATCH 2/43: configure: add test for docker availability...
Checking PATCH 3/43: configure: add support for --cross-cc-FOO...
Checking PATCH 4/43: configure: move i386_cc to cross_cc_i386...
Checking PATCH 5/43: configure: allow user to specify --cross-cc-cflags-foo=...
Checking PATCH 6/43: configure: set cross_cc_FOO for host compiler...
Checking PATCH 7/43: Makefile: Rename TARGET_DIRS to TARGET_LIST...
Checking PATCH 8/43: docker: Add "cc" subcommand...
Checking PATCH 9/43: docker: extend "cc" command to accept compiler...
Checking PATCH 10/43: docker: allow "cc" command to run in user context...
Checking PATCH 11/43: docker: Makefile.include introduce DOCKER_SCRIPT...
Checking PATCH 12/43: tests/tcg: move architecture independent tests into subdir...
Checking PATCH 13/43: tests/tcg/multiarch: Build fix for linux-test...
ERROR: if this code is redundant consider removing it
#153: FILE: tests/tcg/multiarch/linux-test.c:323:
+#if 0

total: 1 errors, 0 warnings, 185 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 14/43: tests/tcg/multiarch: enable additional linux-test tests...
Checking PATCH 15/43: tests/tcg: move i386 specific tests into subdir...
Checking PATCH 16/43: docker: Add fedora-i386-cross image...
Checking PATCH 17/43: tests/tcg: enable building for i386...
Checking PATCH 18/43: tests/tcg/i386: Build fix for hello-i386...
ERROR: externs should be avoided in .c files
#21: FILE: tests/tcg/i386/hello-i386.c:23:
+void _start(void);

total: 1 errors, 0 warnings, 7 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 19/43: tests/tcg/i386: fix test-i386...
Checking PATCH 20/43: tests/tcg/i386: fix test-i386-fprem...
Checking PATCH 21/43: tests/tcg/i386: disable i386 version of test-i386-ssse...
Checking PATCH 22/43: tests/tcg/x86_64: add Makefile.target...
Checking PATCH 23/43: tests/tcg/i386/test-i386: use modern vector_size attributes...
Checking PATCH 24/43: tests/tcg/i386/test-i386: fix printf format...
Checking PATCH 25/43: tests/tcg: move ARM specific tests into subdir...
Checking PATCH 26/43: tests/tcg/arm: fix up test-arm-iwmmxt test...
Checking PATCH 27/43: tests/tcg/aarch64: add Makefile.target...
Checking PATCH 28/43: tests/tcg/aarch64: add fcvt test cases for AArch64...
ERROR: space prohibited before open square bracket '['
#281: FILE: tests/tcg/aarch64/fcvt.c:244:
+        : /* no output */ : [flags] "n" (1 << 26) : "x1" );

ERROR: space prohibited before that close parenthesis ')'
#281: FILE: tests/tcg/aarch64/fcvt.c:244:
+        : /* no output */ : [flags] "n" (1 << 26) : "x1" );

total: 2 errors, 0 warnings, 1587 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 29/43: tests/tcg/aarch64: userspace system register test...
Checking PATCH 30/43: tests/tcg: move MIPS specific tests into subdir...
Checking PATCH 31/43: tests/tcg: enable building for MIPS...
Checking PATCH 32/43: tests/tcg/mips: include common mips hello-mips...
Checking PATCH 33/43: tests/tcg: enable building for s390x...
Checking PATCH 34/43: tests/tcg: enable building for ppc64...
Checking PATCH 35/43: tests/tcg/Makefile: update to be called from Makefile.target...
Checking PATCH 36/43: Makefile.target: add (clean-)guest-tests targets...
Checking PATCH 37/43: tests/Makefile.include: add (clean-)check-tcg targets...
Checking PATCH 38/43: osdep: disable glib-compat.h include with QEMU_NO_GLIB...
Checking PATCH 39/43: softfloat: do not include glib headers...
Checking PATCH 40/43: tests: add fp-test, a floating point test suite...
ERROR: Macros with complex values should be enclosed in parenthesis
#382: FILE: tests/fp/fp-test.c:221:
+#define PR_EXCEPTIONS(x)                                \
+        ((x) & STANDARD_EXCEPTIONS ? "" : "none"),      \
+        (((x) & float_flag_inexact)   ? "x" : ""),      \
+        (((x) & float_flag_underflow) ? "u" : ""),      \
+        (((x) & float_flag_overflow)  ? "o" : ""),      \
+        (((x) & float_flag_divbyzero) ? "z" : ""),      \
+        (((x) & float_flag_invalid)   ? "i" : "")

ERROR: consider using qemu_strtoul in preference to strtoul
#844: FILE: tests/fp/fp-test.c:683:
+            significand = strtoul(&p[3], &pos, 16);

ERROR: consider using qemu_strtol in preference to strtol
#849: FILE: tests/fp/fp-test.c:688:
+            exponent = strtol(pos, &pos, 10) + 127;

ERROR: consider using qemu_strtoul in preference to strtoul
#874: FILE: tests/fp/fp-test.c:713:
+            significand = strtoul(&p[3], &pos, 16);

ERROR: consider using qemu_strtol in preference to strtol
#879: FILE: tests/fp/fp-test.c:718:
+            exponent = strtol(pos, &pos, 10) + 1023;

ERROR: consider using qemu_strtof in preference to strtof
#898: FILE: tests/fp/fp-test.c:737:
+            float f = strtof(p, &pos);

ERROR: externs should be avoided in .c files
#1187: FILE: tests/fp/fp-test.c:1026:
+    int hsearch_r(ENTRY item, ACTION action, ENTRY **retval,

total: 7 errors, 0 warnings, 1233 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 41/43: tests/tcg/multiarch: add fp-test into multiarch set...
Checking PATCH 42/43: tests/tcg: disable fp-test for 32 bit (HACK!)...
Checking PATCH 43/43: tests: fp-test add fcvt support (!INCOMPLETE WIP)...
ERROR: consider using qemu_strtoull in preference to strtoull
#591: FILE: tests/fp/fp-test.c:1150:
+        result = strtoull(p, &end, 16);

total: 1 errors, 0 warnings, 644 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (43 preceding siblings ...)
  2018-04-19 14:52 ` [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg no-reply
@ 2018-04-19 15:02 ` no-reply
  2018-04-20  0:12 ` Richard Henderson
                   ` (3 subsequent siblings)
  48 siblings, 0 replies; 93+ messages in thread
From: no-reply @ 2018-04-19 15:02 UTC (permalink / raw)
  To: alex.bennee; +Cc: famz, peter.maydell, cota

Hi,

This series failed docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

Type: series
Message-id: 20180419135901.30035-1-alex.bennee@linaro.org
Subject: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
time make docker-test-mingw@fedora
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
2cf210de25 tests: fp-test add fcvt support (!INCOMPLETE WIP)
c59ace380c tests/tcg: disable fp-test for 32 bit (HACK!)
3f6d6b37b3 tests/tcg/multiarch: add fp-test into multiarch set
a3942903d8 tests: add fp-test, a floating point test suite
93637ad78f softfloat: do not include glib headers
6cee90fce9 osdep: disable glib-compat.h include with QEMU_NO_GLIB
3f76b148e3 tests/Makefile.include: add (clean-)check-tcg targets
2b09de310b Makefile.target: add (clean-)guest-tests targets
64f32a347c tests/tcg/Makefile: update to be called from Makefile.target
b6dd1c4257 tests/tcg: enable building for ppc64
ed516c56c9 tests/tcg: enable building for s390x
af045c00c8 tests/tcg/mips: include common mips hello-mips
9c8573e3ad tests/tcg: enable building for MIPS
801dbba4ae tests/tcg: move MIPS specific tests into subdir
842030aa82 tests/tcg/aarch64: userspace system register test
a64644b63b tests/tcg/aarch64: add fcvt test cases for AArch64
1c9bd71293 tests/tcg/aarch64: add Makefile.target
c52e2f1c49 tests/tcg/arm: fix up test-arm-iwmmxt test
d14bdceb14 tests/tcg: move ARM specific tests into subdir
a929743e6c tests/tcg/i386/test-i386: fix printf format
1ab161b2e5 tests/tcg/i386/test-i386: use modern vector_size attributes
4a0590ba5e tests/tcg/x86_64: add Makefile.target
7732ca011f tests/tcg/i386: disable i386 version of test-i386-ssse
f95c12d39d tests/tcg/i386: fix test-i386-fprem
40782bcd69 tests/tcg/i386: fix test-i386
ea0cc36d3a tests/tcg/i386: Build fix for hello-i386
f86342742d tests/tcg: enable building for i386
c5ddd1785c docker: Add fedora-i386-cross image
58d31ffc85 tests/tcg: move i386 specific tests into subdir
0f322b2f8a tests/tcg/multiarch: enable additional linux-test tests
d2b649419a tests/tcg/multiarch: Build fix for linux-test
7c270a5818 tests/tcg: move architecture independent tests into subdir
fe04f2a58e docker: Makefile.include introduce DOCKER_SCRIPT
387090cde5 docker: allow "cc" command to run in user context
cc7e3225c2 docker: extend "cc" command to accept compiler
b2098ca1ca docker: Add "cc" subcommand
307a60adf2 Makefile: Rename TARGET_DIRS to TARGET_LIST
d6157c5262 configure: set cross_cc_FOO for host compiler
2afce5fc4d configure: allow user to specify --cross-cc-cflags-foo=
efd2616b8e configure: move i386_cc to cross_cc_i386
887941a91c configure: add support for --cross-cc-FOO
947d99fae7 configure: add test for docker availability
7e41971dca docker: add "probe" command for configure

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
  BUILD   fedora
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-qv4p4631/src'
  GEN     /var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot'...
done.
Checking out files:  50% (3088/6088)   
Checking out files:  51% (3105/6088)   
Checking out files:  52% (3166/6088)   
Checking out files:  53% (3227/6088)   
Checking out files:  54% (3288/6088)   
Checking out files:  55% (3349/6088)   
Checking out files:  56% (3410/6088)   
Checking out files:  57% (3471/6088)   
Checking out files:  58% (3532/6088)   
Checking out files:  59% (3592/6088)   
Checking out files:  60% (3653/6088)   
Checking out files:  61% (3714/6088)   
Checking out files:  62% (3775/6088)   
Checking out files:  63% (3836/6088)   
Checking out files:  64% (3897/6088)   
Checking out files:  65% (3958/6088)   
Checking out files:  66% (4019/6088)   
Checking out files:  67% (4079/6088)   
Checking out files:  68% (4140/6088)   
Checking out files:  69% (4201/6088)   
Checking out files:  70% (4262/6088)   
Checking out files:  71% (4323/6088)   
Checking out files:  72% (4384/6088)   
Checking out files:  73% (4445/6088)   
Checking out files:  74% (4506/6088)   
Checking out files:  75% (4566/6088)   
Checking out files:  76% (4627/6088)   
Checking out files:  77% (4688/6088)   
Checking out files:  78% (4749/6088)   
Checking out files:  79% (4810/6088)   
Checking out files:  80% (4871/6088)   
Checking out files:  81% (4932/6088)   
Checking out files:  82% (4993/6088)   
Checking out files:  83% (5054/6088)   
Checking out files:  84% (5114/6088)   
Checking out files:  85% (5175/6088)   
Checking out files:  86% (5236/6088)   
Checking out files:  87% (5297/6088)   
Checking out files:  88% (5358/6088)   
Checking out files:  89% (5419/6088)   
Checking out files:  90% (5480/6088)   
Checking out files:  91% (5541/6088)   
Checking out files:  92% (5601/6088)   
Checking out files:  93% (5662/6088)   
Checking out files:  94% (5723/6088)   
Checking out files:  95% (5784/6088)   
Checking out files:  96% (5845/6088)   
Checking out files:  97% (5906/6088)   
Checking out files:  98% (5967/6088)   
Checking out files:  99% (6028/6088)   
Checking out files: 100% (6088/6088)   
Checking out files: 100% (6088/6088), done.
Your branch is up-to-date with 'origin/test'.
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb'
Cloning into '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953/qemu.tar.vroot/ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
  COPY    RUNNER
    RUN test-mingw in qemu:fedora 
Packages installed:
PyYAML-3.12-5.fc27.x86_64
SDL2-devel-2.0.7-2.fc27.x86_64
bc-1.07.1-3.fc27.x86_64
bison-3.0.4-8.fc27.x86_64
bluez-libs-devel-5.48-3.fc27.x86_64
brlapi-devel-0.6.6-8.fc27.x86_64
bzip2-1.0.6-24.fc27.x86_64
bzip2-devel-1.0.6-24.fc27.x86_64
ccache-3.3.6-1.fc27.x86_64
clang-5.0.1-5.fc27.x86_64
device-mapper-multipath-devel-0.7.1-9.git847cc43.fc27.x86_64
findutils-4.6.0-16.fc27.x86_64
flex-2.6.1-5.fc27.x86_64
gcc-7.3.1-5.fc27.x86_64
gcc-c++-7.3.1-5.fc27.x86_64
gettext-0.19.8.1-12.fc27.x86_64
git-2.14.3-3.fc27.x86_64
glib2-devel-2.54.3-2.fc27.x86_64
glusterfs-api-devel-3.12.7-1.fc27.x86_64
gnutls-devel-3.5.18-2.fc27.x86_64
gtk3-devel-3.22.26-2.fc27.x86_64
hostname-3.18-4.fc27.x86_64
libaio-devel-0.3.110-9.fc27.x86_64
libasan-7.3.1-5.fc27.x86_64
libattr-devel-2.4.47-21.fc27.x86_64
libcap-devel-2.25-7.fc27.x86_64
libcap-ng-devel-0.7.8-5.fc27.x86_64
libcurl-devel-7.55.1-10.fc27.x86_64
libfdt-devel-1.4.6-1.fc27.x86_64
libpng-devel-1.6.31-1.fc27.x86_64
librbd-devel-12.2.4-1.fc27.x86_64
libssh2-devel-1.8.0-5.fc27.x86_64
libubsan-7.3.1-5.fc27.x86_64
libusbx-devel-1.0.21-4.fc27.x86_64
libxml2-devel-2.9.7-1.fc27.x86_64
llvm-5.0.1-6.fc27.x86_64
lzo-devel-2.08-11.fc27.x86_64
make-4.2.1-4.fc27.x86_64
mingw32-SDL-1.2.15-9.fc27.noarch
mingw32-bzip2-1.0.6-9.fc27.noarch
mingw32-curl-7.54.1-2.fc27.noarch
mingw32-glib2-2.54.1-1.fc27.noarch
mingw32-gmp-6.1.2-2.fc27.noarch
mingw32-gnutls-3.5.13-2.fc27.noarch
mingw32-gtk2-2.24.31-4.fc27.noarch
mingw32-gtk3-3.22.16-1.fc27.noarch
mingw32-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw32-libpng-1.6.29-2.fc27.noarch
mingw32-libssh2-1.8.0-3.fc27.noarch
mingw32-libtasn1-4.13-1.fc27.noarch
mingw32-nettle-3.3-3.fc27.noarch
mingw32-pixman-0.34.0-3.fc27.noarch
mingw32-pkg-config-0.28-9.fc27.x86_64
mingw64-SDL-1.2.15-9.fc27.noarch
mingw64-bzip2-1.0.6-9.fc27.noarch
mingw64-curl-7.54.1-2.fc27.noarch
mingw64-glib2-2.54.1-1.fc27.noarch
mingw64-gmp-6.1.2-2.fc27.noarch
mingw64-gnutls-3.5.13-2.fc27.noarch
mingw64-gtk2-2.24.31-4.fc27.noarch
mingw64-gtk3-3.22.16-1.fc27.noarch
mingw64-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw64-libpng-1.6.29-2.fc27.noarch
mingw64-libssh2-1.8.0-3.fc27.noarch
mingw64-libtasn1-4.13-1.fc27.noarch
mingw64-nettle-3.3-3.fc27.noarch
mingw64-pixman-0.34.0-3.fc27.noarch
mingw64-pkg-config-0.28-9.fc27.x86_64
ncurses-devel-6.0-13.20170722.fc27.x86_64
nettle-devel-3.4-1.fc27.x86_64
nss-devel-3.36.0-1.0.fc27.x86_64
numactl-devel-2.0.11-5.fc27.x86_64
package libjpeg-devel is not installed
perl-5.26.1-403.fc27.x86_64
pixman-devel-0.34.0-4.fc27.x86_64
python3-3.6.2-13.fc27.x86_64
snappy-devel-1.1.4-5.fc27.x86_64
sparse-0.5.1-2.fc27.x86_64
spice-server-devel-0.14.0-1.fc27.x86_64
systemtap-sdt-devel-3.2-3.fc27.x86_64
tar-1.29-7.fc27.x86_64
usbredir-devel-0.7.1-5.fc27.x86_64
virglrenderer-devel-0.6.0-3.20170210git76b3da97b.fc27.x86_64
vte3-devel-0.36.5-5.fc27.x86_64
which-2.21-4.fc27.x86_64
xen-devel-4.9.1-5.fc27.x86_64
zlib-devel-1.2.11-4.fc27.x86_64

Environment variables:
TARGET_LIST=
PACKAGES=ccache gettext git tar PyYAML sparse flex bison python3 bzip2 hostname     gcc gcc-c++ llvm clang make perl which bc findutils glib2-devel     libaio-devel pixman-devel zlib-devel libfdt-devel libasan libubsan     bluez-libs-devel brlapi-devel bzip2-devel     device-mapper-multipath-devel glusterfs-api-devel gnutls-devel     gtk3-devel libattr-devel libcap-devel libcap-ng-devel libcurl-devel     libjpeg-devel libpng-devel librbd-devel libssh2-devel libusbx-devel     libxml2-devel lzo-devel ncurses-devel nettle-devel nss-devel     numactl-devel SDL2-devel snappy-devel spice-server-devel     systemtap-sdt-devel usbredir-devel virglrenderer-devel vte3-devel     xen-devel     mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL mingw32-pkg-config     mingw32-gtk2 mingw32-gtk3 mingw32-gnutls mingw32-nettle mingw32-libtasn1     mingw32-libjpeg-turbo mingw32-libpng mingw32-curl mingw32-libssh2     mingw32-bzip2     mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL mingw64-pkg-config     mingw64-gtk2 mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1     mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2     mingw64-bzip2
J=8
V=
HOSTNAME=1d2e9274b3bc
DEBUG=
SHOW_ENV=1
PWD=/
HOME=/root
CCACHE_DIR=/var/tmp/ccache
DISTTAG=f27container
QEMU_CONFIGURE_OPTS=--python=/usr/bin/python3
FGC=f27
TEST_DIR=/tmp/qemu-test
SHLVL=1
FEATURES=mingw clang pyyaml asan dtc
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAKEFLAGS= -j8
EXTRA_CONFIGURE_OPTS=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=1.2 --with-gtkabi=2.0
Install prefix    /tmp/qemu-test/install
BIOS directory    /tmp/qemu-test/install
firmware path     /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install
library directory /tmp/qemu-test/install/lib
module directory  /tmp/qemu-test/install/lib
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory  /tmp/qemu-test/install
local state directory   queried at runtime
Windows SDK       no
Source path       /tmp/qemu-test/src
GIT binary        git
GIT submodules    
C compiler        x86_64-w64-mingw32-gcc
Host C compiler   cc
C++ compiler      x86_64-w64-mingw32-g++
Objective-C compiler clang
ARFLAGS           rv
CFLAGS            -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS       -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/pixman-1  -I$(SRC_PATH)/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include  -m64 -mcx16 -mthreads -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv  -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include  -I/usr/x86_64-w64-mingw32/sys-root/mingw/include   -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 
LDFLAGS           -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -g 
make              make
install           install
python            /usr/bin/python3 -B
smbd              /usr/sbin/smbd
module support    no
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu aarch64-softmmu
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
SDL support       yes (1.2.15)
GTK support       yes (2.24.31)
GTK GL support    no
VTE support       no 
TLS priority      NORMAL
GNUTLS support    yes
GNUTLS rnd        yes
libgcrypt         no
libgcrypt kdf     no
nettle            yes (3.3)
nettle kdf        yes
libtasn1          yes
curses support    no
virgl support     no
curl support      yes
mingw32 support   yes
Audio drivers     dsound
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS support    no
Multipath support no
VNC support       yes
VNC SASL support  no
VNC JPEG support  yes
VNC PNG support   yes
xen support       no
brlapi support    no
bluez  support    no
Documentation     no
PIE               no
vde support       no
netmap support    no
Linux AIO support no
ATTR/XATTR support no
Install blobs     yes
KVM support       no
HAX support       yes
HVF support       no
WHPX support      no
TCG support       yes
TCG debug enabled no
TCG interpreter   no
malloc trim support no
RDMA support      no
fdt support       yes
membarrier        no
preadv support    no
fdatasync         no
madvise           no
posix_madvise     no
posix_memalign    no
libcap-ng support no
vhost-net support no
vhost-crypto support no
vhost-scsi support no
vhost-vsock support no
vhost-user support no
Trace backends    simple
Trace output file trace-<pid>
spice support     no 
rbd support       no
xfsctl support    no
smartcard support no
libusb            no
usb net redir     no
OpenGL support    no
OpenGL dmabufs    no
libiscsi support  no
libnfs support    no
build guest agent yes
QGA VSS support   no
QGA w32 disk info yes
QGA MSI support   no
seccomp support   no
coroutine backend win32
coroutine pool    yes
debug stack usage no
crypto afalg      no
GlusterFS support no
gcov              gcov
gcov enabled      no
TPM support       yes
libssh2 support   yes
TPM passthrough   no
TPM emulator      no
QOM debugging     yes
Live block migration yes
lzo support       no
snappy support    no
bzip2 support     yes
NUMA host support no
libxml2           no
tcmalloc support  no
jemalloc support  no
avx2 optimization yes
replication support yes
VxHS block device no
capstone          no
docker            no

WARNING: Use of GTK 2.0 is deprecated and will be removed in
WARNING: future releases. Please switch to using GTK 3.0

WARNING: Use of SDL 1.2 is deprecated and will be removed in
WARNING: future releases. Please switch to using SDL 2.0
  GEN     x86_64-softmmu/config-devices.mak.tmp
mkdir -p dtc/libfdt
  GEN     aarch64-softmmu/config-devices.mak.tmp
  GEN     config-host.h
mkdir -p dtc/tests
  GEN     qemu-options.def
  GEN     qapi-gen
  GEN     trace/generated-tcg-tracers.h
  GEN     trace/generated-helpers-wrappers.h
  GEN     trace/generated-helpers.h
  GEN     aarch64-softmmu/config-devices.mak
  GEN     trace/generated-helpers.c
  GEN     x86_64-softmmu/config-devices.mak
  GEN     module_block.h
  GEN     ui/input-keymap-atset1-to-qcode.c
  GEN     ui/input-keymap-linux-to-qcode.c
  GEN     ui/input-keymap-qcode-to-atset1.c
  GEN     ui/input-keymap-qcode-to-atset2.c
  GEN     ui/input-keymap-qcode-to-atset3.c
  GEN     ui/input-keymap-qcode-to-linux.c
  GEN     ui/input-keymap-qcode-to-qnum.c
  GEN     ui/input-keymap-qcode-to-sun.c
  GEN     ui/input-keymap-usb-to-qcode.c
  GEN     ui/input-keymap-qnum-to-qcode.c
  GEN     ui/input-keymap-x11-to-qcode.c
  GEN     ui/input-keymap-win32-to-qcode.c
  GEN     ui/input-keymap-xorgevdev-to-qcode.c
  GEN     ui/input-keymap-xorgkbd-to-qcode.c
  GEN     ui/input-keymap-xorgxquartz-to-qcode.c
  GEN     ui/input-keymap-xorgxwin-to-qcode.c
  GEN     tests/test-qapi-gen
  GEN     trace-root.h
  GEN     util/trace.h
  GEN     crypto/trace.h
  GEN     io/trace.h
  GEN     migration/trace.h
  GEN     block/trace.h
  GEN     chardev/trace.h
  GEN     hw/block/trace.h
  GEN     hw/block/dataplane/trace.h
  GEN     hw/char/trace.h
  GEN     hw/intc/trace.h
  GEN     hw/net/trace.h
  GEN     hw/rdma/trace.h
  GEN     hw/rdma/vmw/trace.h
  GEN     hw/virtio/trace.h
  GEN     hw/audio/trace.h
  GEN     hw/misc/trace.h
  GEN     hw/misc/macio/trace.h
  GEN     hw/usb/trace.h
  GEN     hw/scsi/trace.h
  GEN     hw/nvram/trace.h
  GEN     hw/display/trace.h
  GEN     hw/input/trace.h
  GEN     hw/timer/trace.h
  GEN     hw/dma/trace.h
  GEN     hw/sparc/trace.h
  GEN     hw/sparc64/trace.h
  GEN     hw/sd/trace.h
  GEN     hw/isa/trace.h
  GEN     hw/mem/trace.h
  GEN     hw/i386/trace.h
  GEN     hw/i386/xen/trace.h
  GEN     hw/9pfs/trace.h
  GEN     hw/ppc/trace.h
  GEN     hw/pci/trace.h
  GEN     hw/pci-host/trace.h
  GEN     hw/s390x/trace.h
  GEN     hw/vfio/trace.h
  GEN     hw/acpi/trace.h
  GEN     hw/arm/trace.h
  GEN     hw/alpha/trace.h
  GEN     hw/hppa/trace.h
  GEN     hw/xen/trace.h
  GEN     hw/ide/trace.h
  GEN     hw/tpm/trace.h
  GEN     ui/trace.h
  GEN     audio/trace.h
  GEN     net/trace.h
  GEN     target/arm/trace.h
  GEN     target/i386/trace.h
  GEN     target/mips/trace.h
  GEN     target/sparc/trace.h
  GEN     target/s390x/trace.h
  GEN     target/ppc/trace.h
  GEN     qom/trace.h
  GEN     linux-user/trace.h
  GEN     qapi/trace.h
  GEN     accel/tcg/trace.h
  GEN     accel/kvm/trace.h
  GEN     nbd/trace.h
  GEN     scsi/trace.h
  GEN     trace-root.c
  GEN     util/trace.c
  GEN     crypto/trace.c
  GEN     io/trace.c
  GEN     migration/trace.c
  GEN     block/trace.c
  GEN     chardev/trace.c
  GEN     hw/block/trace.c
  GEN     hw/block/dataplane/trace.c
  GEN     hw/char/trace.c
  GEN     hw/intc/trace.c
  GEN     hw/net/trace.c
  GEN     hw/rdma/trace.c
  GEN     hw/rdma/vmw/trace.c
  GEN     hw/virtio/trace.c
  GEN     hw/audio/trace.c
  GEN     hw/misc/trace.c
  GEN     hw/misc/macio/trace.c
  GEN     hw/usb/trace.c
  GEN     hw/scsi/trace.c
  GEN     hw/nvram/trace.c
  GEN     hw/display/trace.c
  GEN     hw/input/trace.c
  GEN     hw/timer/trace.c
  GEN     hw/dma/trace.c
  GEN     hw/sparc/trace.c
  GEN     hw/sparc64/trace.c
  GEN     hw/sd/trace.c
  GEN     hw/isa/trace.c
  GEN     hw/mem/trace.c
  GEN     hw/i386/trace.c
  GEN     hw/i386/xen/trace.c
  GEN     hw/9pfs/trace.c
  GEN     hw/ppc/trace.c
  GEN     hw/pci/trace.c
  GEN     hw/pci-host/trace.c
  GEN     hw/s390x/trace.c
  GEN     hw/vfio/trace.c
  GEN     hw/acpi/trace.c
  GEN     hw/arm/trace.c
  GEN     hw/alpha/trace.c
  GEN     hw/hppa/trace.c
  GEN     hw/xen/trace.c
  GEN     hw/ide/trace.c
  GEN     hw/tpm/trace.c
  GEN     ui/trace.c
  GEN     audio/trace.c
  GEN     net/trace.c
  GEN     target/arm/trace.c
  GEN     target/i386/trace.c
  GEN     target/mips/trace.c
  GEN     target/sparc/trace.c
  GEN     target/s390x/trace.c
  GEN     target/ppc/trace.c
  GEN     qom/trace.c
  GEN     linux-user/trace.c
  GEN     qapi/trace.c
  GEN     accel/tcg/trace.c
  GEN     accel/kvm/trace.c
  GEN     nbd/trace.c
  GEN     scsi/trace.c
  GEN     config-all-devices.mak
	 DEP /tmp/qemu-test/src/dtc/tests/dumptrees.c
	 DEP /tmp/qemu-test/src/dtc/tests/trees.S
	 DEP /tmp/qemu-test/src/dtc/tests/value-labels.c
	 DEP /tmp/qemu-test/src/dtc/tests/testutils.c
	 DEP /tmp/qemu-test/src/dtc/tests/asm_tree_dump.c
	 DEP /tmp/qemu-test/src/dtc/tests/truncated_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/check_path.c
	 DEP /tmp/qemu-test/src/dtc/tests/overlay_bad_fixup.c
	 DEP /tmp/qemu-test/src/dtc/tests/overlay.c
	 DEP /tmp/qemu-test/src/dtc/tests/property_iterate.c
	 DEP /tmp/qemu-test/src/dtc/tests/subnode_iterate.c
	 DEP /tmp/qemu-test/src/dtc/tests/integer-expressions.c
	 DEP /tmp/qemu-test/src/dtc/tests/utilfdt_test.c
	 DEP /tmp/qemu-test/src/dtc/tests/path_offset_aliases.c
	 DEP /tmp/qemu-test/src/dtc/tests/add_subnode_with_nops.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_unordered.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtb_reverse.c
	 DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_ordered.c
	 DEP /tmp/qemu-test/src/dtc/tests/extra-terminating-null.c
	 DEP /tmp/qemu-test/src/dtc/tests/incbin.c
	 DEP /tmp/qemu-test/src/dtc/tests/boot-cpuid.c
	 DEP /tmp/qemu-test/src/dtc/tests/phandle_format.c
	 DEP /tmp/qemu-test/src/dtc/tests/path-references.c
	 DEP /tmp/qemu-test/src/dtc/tests/references.c
	 DEP /tmp/qemu-test/src/dtc/tests/string_escapes.c
	 DEP /tmp/qemu-test/src/dtc/tests/propname_escapes.c
	 DEP /tmp/qemu-test/src/dtc/tests/appendprop2.c
	 DEP /tmp/qemu-test/src/dtc/tests/appendprop1.c
	 DEP /tmp/qemu-test/src/dtc/tests/del_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/del_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/setprop.c
	 DEP /tmp/qemu-test/src/dtc/tests/set_name.c
	 DEP /tmp/qemu-test/src/dtc/tests/rw_tree1.c
	 DEP /tmp/qemu-test/src/dtc/tests/open_pack.c
	 DEP /tmp/qemu-test/src/dtc/tests/nopulate.c
	 DEP /tmp/qemu-test/src/dtc/tests/mangle-layout.c
	 DEP /tmp/qemu-test/src/dtc/tests/move_and_save.c
	 DEP /tmp/qemu-test/src/dtc/tests/sw_tree1.c
	 DEP /tmp/qemu-test/src/dtc/tests/nop_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/nop_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/setprop_inplace.c
	 DEP /tmp/qemu-test/src/dtc/tests/stringlist.c
	 DEP /tmp/qemu-test/src/dtc/tests/addr_size_cells.c
	 DEP /tmp/qemu-test/src/dtc/tests/notfound.c
	 DEP /tmp/qemu-test/src/dtc/tests/sized_cells.c
	 DEP /tmp/qemu-test/src/dtc/tests/char_literal.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_alias.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_compatible.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_check_compatible.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_phandle.c
	 DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_prop_value.c
	 DEP /tmp/qemu-test/src/dtc/tests/parent_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_path.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_phandle.c
	 DEP /tmp/qemu-test/src/dtc/tests/supernode_atdepth_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/getprop.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_name.c
	 DEP /tmp/qemu-test/src/dtc/tests/path_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/subnode_offset.c
	 DEP /tmp/qemu-test/src/dtc/tests/find_property.c
	 DEP /tmp/qemu-test/src/dtc/tests/root_node.c
	 DEP /tmp/qemu-test/src/dtc/tests/get_mem_rsv.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_overlay.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_addresses.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_empty_tree.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_strerror.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_rw.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_sw.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_wip.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt_ro.c
	 DEP /tmp/qemu-test/src/dtc/libfdt/fdt.c
	 DEP /tmp/qemu-test/src/dtc/util.c
	 DEP /tmp/qemu-test/src/dtc/fdtoverlay.c
	 DEP /tmp/qemu-test/src/dtc/fdtput.c
	 DEP /tmp/qemu-test/src/dtc/fdtget.c
	 DEP /tmp/qemu-test/src/dtc/fdtdump.c
	 LEX convert-dtsv0-lexer.lex.c
	 DEP /tmp/qemu-test/src/dtc/srcpos.c
	 BISON dtc-parser.tab.c
	 LEX dtc-lexer.lex.c
	 DEP /tmp/qemu-test/src/dtc/treesource.c
	 DEP /tmp/qemu-test/src/dtc/fstree.c
	 DEP /tmp/qemu-test/src/dtc/flattree.c
	 DEP /tmp/qemu-test/src/dtc/livetree.c
	 DEP /tmp/qemu-test/src/dtc/dtc.c
	 DEP /tmp/qemu-test/src/dtc/data.c
	 DEP /tmp/qemu-test/src/dtc/checks.c
	 DEP convert-dtsv0-lexer.lex.c
	 DEP dtc-lexer.lex.c
	 DEP dtc-parser.tab.c
	CHK version_gen.h
	UPD version_gen.h
	 DEP /tmp/qemu-test/src/dtc/util.c
	 CC libfdt/fdt.o
	 CC libfdt/fdt_wip.o
	 CC libfdt/fdt_ro.o
	 CC libfdt/fdt_sw.o
	 CC libfdt/fdt_rw.o
	 CC libfdt/fdt_strerror.o
	 CC libfdt/fdt_empty_tree.o
	 CC libfdt/fdt_addresses.o
	 CC libfdt/fdt_overlay.o
	 AR libfdt/libfdt.a
x86_64-w64-mingw32-ar: creating libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
a - libfdt/fdt_addresses.o
a - libfdt/fdt_overlay.o
  RC      version.o
mkdir -p dtc/libfdt
mkdir -p dtc/tests
  GEN     qga/qapi-generated/qapi-gen
  CC      qapi/qapi-builtin-types.o
  CC      qapi/qapi-types-block-core.o
  CC      qapi/qapi-types.o
  CC      qapi/qapi-types-block.o
  CC      qapi/qapi-types-char.o
  CC      qapi/qapi-types-common.o
  CC      qapi/qapi-types-crypto.o
  CC      qapi/qapi-types-introspect.o
  CC      qapi/qapi-types-migration.o
  CC      qapi/qapi-types-misc.o
  CC      qapi/qapi-types-net.o
  CC      qapi/qapi-types-rocker.o
  CC      qapi/qapi-types-run-state.o
  CC      qapi/qapi-types-sockets.o
  CC      qapi/qapi-types-tpm.o
  CC      qapi/qapi-types-trace.o
  CC      qapi/qapi-types-transaction.o
  CC      qapi/qapi-types-ui.o
  CC      qapi/qapi-builtin-visit.o
  CC      qapi/qapi-visit.o
  CC      qapi/qapi-visit-block-core.o
  CC      qapi/qapi-visit-block.o
  CC      qapi/qapi-visit-char.o
  CC      qapi/qapi-visit-common.o
  CC      qapi/qapi-visit-crypto.o
  CC      qapi/qapi-visit-introspect.o
  CC      qapi/qapi-visit-migration.o
  CC      qapi/qapi-visit-misc.o
  CC      qapi/qapi-visit-rocker.o
  CC      qapi/qapi-visit-net.o
  CC      qapi/qapi-visit-run-state.o
  CC      qapi/qapi-visit-sockets.o
  CC      qapi/qapi-visit-tpm.o
  CC      qapi/qapi-visit-trace.o
  CC      qapi/qapi-visit-transaction.o
  CC      qapi/qapi-visit-ui.o
  CC      qapi/qapi-events.o
  CC      qapi/qapi-events-block-core.o
  CC      qapi/qapi-events-block.o
  CC      qapi/qapi-events-char.o
  CC      qapi/qapi-events-common.o
  CC      qapi/qapi-events-crypto.o
  CC      qapi/qapi-events-introspect.o
  CC      qapi/qapi-events-migration.o
  CC      qapi/qapi-events-misc.o
  CC      qapi/qapi-events-net.o
  CC      qapi/qapi-events-rocker.o
  CC      qapi/qapi-events-run-state.o
  CC      qapi/qapi-events-sockets.o
  CC      qapi/qapi-events-tpm.o
  CC      qapi/qapi-events-trace.o
  CC      qapi/qapi-events-transaction.o
  CC      qapi/qapi-events-ui.o
  CC      qapi/qapi-introspect.o
  CC      qapi/qapi-visit-core.o
  CC      qapi/qapi-dealloc-visitor.o
  CC      qapi/qobject-input-visitor.o
  CC      qapi/qobject-output-visitor.o
  CC      qapi/qmp-registry.o
  CC      qapi/qmp-dispatch.o
  CC      qapi/string-input-visitor.o
  CC      qapi/string-output-visitor.o
  CC      qapi/opts-visitor.o
  CC      qapi/qapi-clone-visitor.o
  CC      qapi/qmp-event.o
  CC      qapi/qapi-util.o
  CC      qobject/qnull.o
  CC      qobject/qnum.o
  CC      qobject/qstring.o
  CC      qobject/qdict.o
  CC      qobject/qlist.o
  CC      qobject/qbool.o
  CC      qobject/qlit.o
  CC      qobject/qjson.o
  CC      qobject/qobject.o
  CC      qobject/json-lexer.o
  CC      qobject/json-streamer.o
  CC      qobject/json-parser.o
  CC      trace/simple.o
  CC      trace/control.o
  CC      trace/qmp.o
  CC      util/osdep.o
  CC      util/cutils.o
  CC      util/unicode.o
  CC      util/qemu-timer-common.o
  CC      util/bufferiszero.o
  CC      util/lockcnt.o
  CC      util/aiocb.o
  CC      util/async.o
  CC      util/aio-wait.o
  CC      util/thread-pool.o
  CC      util/qemu-timer.o
  CC      util/main-loop.o
  CC      util/iohandler.o
  CC      util/aio-win32.o
  CC      util/event_notifier-win32.o
  CC      util/oslib-win32.o
  CC      util/qemu-thread-win32.o
  CC      util/envlist.o
  CC      util/path.o
  CC      util/module.o
  CC      util/host-utils.o
  CC      util/bitmap.o
  CC      util/bitops.o
  CC      util/hbitmap.o
  CC      util/fifo8.o
  CC      util/acl.o
  CC      util/cacheinfo.o
  CC      util/error.o
  CC      util/qemu-error.o
  CC      util/id.o
  CC      util/iov.o
  CC      util/qemu-config.o
  CC      util/qemu-sockets.o
  CC      util/uri.o
  CC      util/notify.o
  CC      util/qemu-option.o
  CC      util/qemu-progress.o
  CC      util/keyval.o
  CC      util/hexdump.o
  CC      util/crc32c.o
  CC      util/uuid.o
  CC      util/throttle.o
  CC      util/getauxval.o
  CC      util/readline.o
  CC      util/rcu.o
  CC      util/qemu-coroutine.o
  CC      util/qemu-coroutine-lock.o
  CC      util/qemu-coroutine-io.o
  CC      util/qemu-coroutine-sleep.o
  CC      util/coroutine-win32.o
  CC      util/buffer.o
  CC      util/timed-average.o
  CC      util/base64.o
  CC      util/log.o
  CC      util/pagesize.o
  CC      util/qdist.o
  CC      util/qht.o
  CC      util/range.o
  CC      util/stats64.o
  CC      util/systemd.o
  CC      trace-root.o
  CC      util/trace.o
  CC      crypto/trace.o
  CC      io/trace.o
  CC      migration/trace.o
  CC      block/trace.o
  CC      chardev/trace.o
  CC      hw/block/trace.o
  CC      hw/block/dataplane/trace.o
  CC      hw/char/trace.o
  CC      hw/intc/trace.o
  CC      hw/net/trace.o
  CC      hw/rdma/trace.o
  CC      hw/rdma/vmw/trace.o
  CC      hw/virtio/trace.o
  CC      hw/audio/trace.o
  CC      hw/misc/trace.o
  CC      hw/misc/macio/trace.o
  CC      hw/usb/trace.o
  CC      hw/scsi/trace.o
  CC      hw/nvram/trace.o
  CC      hw/display/trace.o
  CC      hw/input/trace.o
  CC      hw/timer/trace.o
  CC      hw/dma/trace.o
  CC      hw/sparc/trace.o
  CC      hw/sparc64/trace.o
  CC      hw/sd/trace.o
  CC      hw/isa/trace.o
  CC      hw/mem/trace.o
  CC      hw/i386/trace.o
  CC      hw/i386/xen/trace.o
  CC      hw/9pfs/trace.o
  CC      hw/ppc/trace.o
  CC      hw/pci/trace.o
  CC      hw/pci-host/trace.o
  CC      hw/s390x/trace.o
  CC      hw/vfio/trace.o
  CC      hw/acpi/trace.o
  CC      hw/arm/trace.o
  CC      hw/alpha/trace.o
  CC      hw/hppa/trace.o
  CC      hw/xen/trace.o
  CC      hw/ide/trace.o
  CC      hw/tpm/trace.o
  CC      ui/trace.o
  CC      audio/trace.o
  CC      net/trace.o
  CC      target/arm/trace.o
  CC      target/i386/trace.o
  CC      target/mips/trace.o
  CC      target/sparc/trace.o
  CC      target/s390x/trace.o
  CC      target/ppc/trace.o
  CC      qom/trace.o
  CC      linux-user/trace.o
  CC      qapi/trace.o
  CC      accel/tcg/trace.o
  CC      accel/kvm/trace.o
  CC      nbd/trace.o
  CC      scsi/trace.o
  CC      crypto/pbkdf-stub.o
  CC      stubs/arch-query-cpu-def.o
  CC      stubs/arch-query-cpu-model-expansion.o
  CC      stubs/arch-query-cpu-model-comparison.o
  CC      stubs/arch-query-cpu-model-baseline.o
  CC      stubs/bdrv-next-monitor-owned.o
  CC      stubs/blk-commit-all.o
  CC      stubs/blockdev-close-all-bdrv-states.o
  CC      stubs/clock-warp.o
  CC      stubs/cpu-get-clock.o
  CC      stubs/cpu-get-icount.o
  CC      stubs/dump.o
  CC      stubs/error-printf.o
  CC      stubs/fdset.o
  CC      stubs/gdbstub.o
  CC      stubs/get-vm-name.o
  CC      stubs/iothread.o
  CC      stubs/iothread-lock.o
  CC      stubs/is-daemonized.o
  CC      stubs/machine-init-done.o
  CC      stubs/migr-blocker.o
  CC      stubs/change-state-handler.o
  CC      stubs/monitor.o
  CC      stubs/notify-event.o
  CC      stubs/qtest.o
  CC      stubs/replay.o
  CC      stubs/runstate-check.o
  CC      stubs/set-fd-handler.o
  CC      stubs/slirp.o
  CC      stubs/sysbus.o
  CC      stubs/tpm.o
  CC      stubs/trace-control.o
  CC      stubs/uuid.o
  CC      stubs/vm-stop.o
  CC      stubs/vmstate.o
  CC      stubs/fd-register.o
  CC      stubs/qmp_pc_dimm.o
  CC      stubs/target-monitor-defs.o
  CC      stubs/target-get-monitor-def.o
  CC      stubs/pc_madt_cpu_entry.o
  CC      stubs/vmgenid.o
  CC      stubs/xen-common.o
  CC      stubs/xen-hvm.o
  CC      stubs/pci-host-piix.o
  CC      stubs/ram-block.o
  GEN     qemu-img-cmds.h
  CC      block.o
  CC      blockjob.o
  CC      qemu-io-cmds.o
  CC      replication.o
  CC      block/raw-format.o
  CC      block/qcow.o
  CC      block/vdi.o
  CC      block/vmdk.o
  CC      block/cloop.o
  CC      block/bochs.o
  CC      block/vpc.o
  CC      block/vvfat.o
  CC      block/dmg.o
  CC      block/qcow2.o
  CC      block/qcow2-refcount.o
  CC      block/qcow2-cluster.o
  CC      block/qcow2-snapshot.o
  CC      block/qcow2-cache.o
  CC      block/qcow2-bitmap.o
  CC      block/qed.o
  CC      block/qed-l2-cache.o
  CC      block/qed-table.o
  CC      block/qed-cluster.o
  CC      block/qed-check.o
  CC      block/vhdx.o
  CC      block/vhdx-endian.o
  CC      block/vhdx-log.o
  CC      block/quorum.o
  CC      block/parallels.o
  CC      block/blkdebug.o
  CC      block/blkverify.o
  CC      block/blkreplay.o
  CC      block/block-backend.o
  CC      block/snapshot.o
  CC      block/qapi.o
  CC      block/win32-aio.o
  CC      block/file-win32.o
  CC      block/null.o
  CC      block/mirror.o
  CC      block/commit.o
  CC      block/io.o
  CC      block/create.o
  CC      block/throttle-groups.o
  CC      block/nbd.o
  CC      block/nbd-client.o
  CC      block/sheepdog.o
  CC      block/accounting.o
  CC      block/dirty-bitmap.o
  CC      block/write-threshold.o
  CC      block/backup.o
  CC      block/replication.o
  CC      block/throttle.o
  CC      block/crypto.o
  CC      nbd/server.o
  CC      nbd/client.o
  CC      nbd/common.o
  CC      scsi/utils.o
  CC      block/curl.o
  CC      block/ssh.o
  CC      block/dmg-bz2.o
  CC      crypto/init.o
  CC      crypto/hash.o
  CC      crypto/hash-nettle.o
  CC      crypto/hmac.o
  CC      crypto/hmac-nettle.o
  CC      crypto/aes.o
  CC      crypto/desrfb.o
  CC      crypto/cipher.o
  CC      crypto/tlscreds.o
  CC      crypto/tlscredsanon.o
  CC      crypto/tlscredsx509.o
  CC      crypto/tlssession.o
  CC      crypto/secret.o
  CC      crypto/random-gnutls.o
  CC      crypto/pbkdf.o
  CC      crypto/pbkdf-nettle.o
  CC      crypto/ivgen.o
  CC      crypto/ivgen-essiv.o
  CC      crypto/ivgen-plain.o
  CC      crypto/ivgen-plain64.o
  CC      crypto/afsplit.o
  CC      crypto/xts.o
  CC      crypto/block.o
  CC      crypto/block-qcow.o
  CC      crypto/block-luks.o
  CC      io/channel.o
  CC      io/channel-buffer.o
  CC      io/channel-command.o
  CC      io/channel-file.o
  CC      io/channel-socket.o
  CC      io/channel-tls.o
  CC      io/channel-watch.o
  CC      io/channel-websock.o
  CC      io/channel-util.o
  CC      io/dns-resolver.o
  CC      io/net-listener.o
  CC      io/task.o
  CC      qom/object.o
  CC      qom/container.o
  CC      qom/qom-qobject.o
  CC      qom/object_interfaces.o
  CC      qemu-io.o
  CC      blockdev.o
  CC      blockdev-nbd.o
  CC      bootdevice.o
  CC      iothread.o
  CC      qdev-monitor.o
  CC      device-hotplug.o
  CC      os-win32.o
  CC      bt-host.o
  CC      bt-vhci.o
  CC      dma-helpers.o
  CC      vl.o
  CC      tpm.o
  CC      device_tree.o
  CC      qapi/qapi-commands.o
  CC      qapi/qapi-commands-block-core.o
  CC      qapi/qapi-commands-block.o
  CC      qapi/qapi-commands-char.o
  CC      qapi/qapi-commands-common.o
  CC      qapi/qapi-commands-crypto.o
  CC      qapi/qapi-commands-introspect.o
  CC      qapi/qapi-commands-migration.o
  CC      qapi/qapi-commands-misc.o
  CC      qapi/qapi-commands-net.o
  CC      qapi/qapi-commands-rocker.o
  CC      qapi/qapi-commands-run-state.o
  CC      qapi/qapi-commands-sockets.o
  CC      qapi/qapi-commands-tpm.o
  CC      qapi/qapi-commands-trace.o
  CC      qapi/qapi-commands-transaction.o
  CC      qapi/qapi-commands-ui.o
  CC      qmp.o
  CC      hmp.o
  CC      cpus-common.o
  CC      audio/audio.o
  CC      audio/noaudio.o
  CC      audio/wavaudio.o
  CC      audio/mixeng.o
  CC      audio/audio_win_int.o
  CC      audio/dsoundaudio.o
  CC      audio/wavcapture.o
  CC      backends/rng.o
  CC      backends/rng-egd.o
  CC      backends/tpm.o
  CC      backends/hostmem-ram.o
  CC      backends/hostmem.o
  CC      backends/cryptodev.o
  CC      backends/cryptodev-builtin.o
  CC      backends/cryptodev-vhost.o
  CC      block/stream.o
  CC      chardev/msmouse.o
  CC      chardev/wctablet.o
  CC      chardev/testdev.o
  CC      disas/arm.o
  CXX     disas/arm-a64.o
  CC      disas/i386.o
  CXX     disas/libvixl/vixl/utils.o
  CXX     disas/libvixl/vixl/compiler-intrinsics.o
  CXX     disas/libvixl/vixl/a64/instructions-a64.o
  CXX     disas/libvixl/vixl/a64/decoder-a64.o
  CXX     disas/libvixl/vixl/a64/disasm-a64.o
  CC      hw/acpi/core.o
  CC      hw/acpi/piix4.o
  CC      hw/acpi/pcihp.o
  CC      hw/acpi/ich9.o
  CC      hw/acpi/tco.o
  CC      hw/acpi/cpu_hotplug.o
  CC      hw/acpi/memory_hotplug.o
  CC      hw/acpi/cpu.o
  CC      hw/acpi/nvdimm.o
  CC      hw/acpi/vmgenid.o
  CC      hw/acpi/acpi_interface.o
  CC      hw/acpi/bios-linker-loader.o
  CC      hw/acpi/aml-build.o
  CC      hw/acpi/ipmi.o
  CC      hw/acpi/acpi-stub.o
  CC      hw/acpi/ipmi-stub.o
  CC      hw/audio/sb16.o
  CC      hw/audio/es1370.o
  CC      hw/audio/ac97.o
  CC      hw/audio/fmopl.o
  CC      hw/audio/adlib.o
  CC      hw/audio/gus.o
  CC      hw/audio/gusemu_hal.o
  CC      hw/audio/gusemu_mixer.o
  CC      hw/audio/cs4231a.o
  CC      hw/audio/intel-hda.o
  CC      hw/audio/hda-codec.o
  CC      hw/audio/pcspk.o
  CC      hw/audio/wm8750.o
  CC      hw/audio/pl041.o
  CC      hw/audio/lm4549.o
  CC      hw/audio/marvell_88w8618.o
  CC      hw/audio/soundhw.o
  CC      hw/block/block.o
  CC      hw/block/cdrom.o
  CC      hw/block/hd-geometry.o
  CC      hw/block/fdc.o
  CC      hw/block/m25p80.o
  CC      hw/block/nand.o
  CC      hw/block/pflash_cfi01.o
  CC      hw/block/pflash_cfi02.o
  CC      hw/block/ecc.o
  CC      hw/block/onenand.o
  CC      hw/block/nvme.o
  CC      hw/bt/core.o
  CC      hw/bt/l2cap.o
  CC      hw/bt/sdp.o
  CC      hw/bt/hci.o
  CC      hw/bt/hid.o
  CC      hw/bt/hci-csr.o
  CC      hw/char/ipoctal232.o
  CC      hw/char/parallel.o
  CC      hw/char/parallel-isa.o
  CC      hw/char/pl011.o
  CC      hw/char/serial.o
  CC      hw/char/serial-isa.o
  CC      hw/char/serial-pci.o
  CC      hw/char/virtio-console.o
  CC      hw/char/cadence_uart.o
  CC      hw/char/cmsdk-apb-uart.o
  CC      hw/char/debugcon.o
  CC      hw/char/imx_serial.o
  CC      hw/core/qdev.o
  CC      hw/core/qdev-properties.o
  CC      hw/core/bus.o
  CC      hw/core/reset.o
  CC      hw/core/qdev-fw.o
  CC      hw/core/fw-path-provider.o
  CC      hw/core/irq.o
  CC      hw/core/hotplug.o
  CC      hw/core/nmi.o
  CC      hw/core/stream.o
  CC      hw/core/ptimer.o
  CC      hw/core/sysbus.o
  CC      hw/core/machine.o
  CC      hw/core/loader.o
  CC      hw/core/qdev-properties-system.o
  CC      hw/core/register.o
  CC      hw/core/or-irq.o
  CC      hw/core/split-irq.o
  CC      hw/core/platform-bus.o
  CC      hw/cpu/core.o
  CC      hw/display/ads7846.o
  CC      hw/display/cirrus_vga.o
  CC      hw/display/pl110.o
  CC      hw/display/sii9022.o
  CC      hw/display/ssd0303.o
  CC      hw/display/ssd0323.o
  CC      hw/display/vga-pci.o
  CC      hw/display/vga-isa.o
  CC      hw/display/vmware_vga.o
  CC      hw/display/blizzard.o
  CC      hw/display/exynos4210_fimd.o
  CC      hw/display/framebuffer.o
  CC      hw/display/tc6393xb.o
  CC      hw/dma/pl080.o
  CC      hw/dma/pl330.o
  CC      hw/dma/i8257.o
  CC      hw/dma/xilinx_axidma.o
  CC      hw/dma/xlnx-zynq-devcfg.o
  CC      hw/gpio/max7310.o
  CC      hw/gpio/pl061.o
  CC      hw/gpio/zaurus.o
  CC      hw/gpio/gpio_key.o
  CC      hw/i2c/core.o
  CC      hw/i2c/smbus.o
  CC      hw/i2c/smbus_eeprom.o
  CC      hw/i2c/i2c-ddc.o
  CC      hw/i2c/versatile_i2c.o
  CC      hw/i2c/smbus_ich9.o
  CC      hw/i2c/pm_smbus.o
  CC      hw/i2c/bitbang_i2c.o
  CC      hw/i2c/exynos4210_i2c.o
  CC      hw/i2c/imx_i2c.o
  CC      hw/i2c/aspeed_i2c.o
  CC      hw/ide/core.o
  CC      hw/ide/atapi.o
  CC      hw/ide/qdev.o
  CC      hw/ide/pci.o
  CC      hw/ide/isa.o
  CC      hw/ide/piix.o
  CC      hw/ide/microdrive.o
  CC      hw/ide/ahci.o
  CC      hw/ide/ich.o
  CC      hw/ide/ahci-allwinner.o
  CC      hw/input/hid.o
  CC      hw/input/lm832x.o
  CC      hw/input/pckbd.o
  CC      hw/input/pl050.o
  CC      hw/input/ps2.o
  CC      hw/input/stellaris_input.o
  CC      hw/input/tsc2005.o
  CC      hw/input/virtio-input.o
  CC      hw/input/virtio-input-hid.o
  CC      hw/intc/i8259_common.o
  CC      hw/intc/i8259.o
  CC      hw/intc/pl190.o
  CC      hw/intc/xlnx-pmu-iomod-intc.o
  CC      hw/intc/xlnx-zynqmp-ipi.o
  CC      hw/intc/imx_avic.o
  CC      hw/intc/imx_gpcv2.o
  CC      hw/intc/realview_gic.o
  CC      hw/intc/ioapic_common.o
  CC      hw/intc/arm_gic_common.o
  CC      hw/intc/arm_gic.o
  CC      hw/intc/arm_gicv2m.o
  CC      hw/intc/arm_gicv3_common.o
  CC      hw/intc/arm_gicv3.o
  CC      hw/intc/arm_gicv3_dist.o
  CC      hw/intc/arm_gicv3_redist.o
  CC      hw/intc/arm_gicv3_its_common.o
  CC      hw/intc/intc.o
  CC      hw/ipack/ipack.o
  CC      hw/ipack/tpci200.o
  CC      hw/ipmi/ipmi.o
  CC      hw/ipmi/ipmi_bmc_sim.o
  CC      hw/ipmi/ipmi_bmc_extern.o
  CC      hw/ipmi/isa_ipmi_kcs.o
  CC      hw/ipmi/isa_ipmi_bt.o
  CC      hw/isa/isa-bus.o
  CC      hw/isa/isa-superio.o
  CC      hw/isa/smc37c669-superio.o
  CC      hw/isa/apm.o
  CC      hw/mem/pc-dimm.o
  CC      hw/mem/nvdimm.o
  CC      hw/misc/applesmc.o
  CC      hw/misc/max111x.o
  CC      hw/misc/tmp105.o
  CC      hw/misc/tmp421.o
  CC      hw/misc/debugexit.o
  CC      hw/misc/sga.o
  CC      hw/misc/pc-testdev.o
  CC      hw/misc/pci-testdev.o
  CC      hw/misc/edu.o
  CC      hw/misc/unimp.o
  CC      hw/misc/vmcoreinfo.o
  CC      hw/misc/arm_l2x0.o
  CC      hw/misc/arm_integrator_debug.o
  CC      hw/misc/a9scu.o
  CC      hw/misc/arm11scu.o
  CC      hw/net/ne2000.o
  CC      hw/net/eepro100.o
  CC      hw/net/pcnet-pci.o
  CC      hw/net/pcnet.o
  CC      hw/net/e1000.o
  CC      hw/net/e1000x_common.o
  CC      hw/net/net_tx_pkt.o
  CC      hw/net/net_rx_pkt.o
  CC      hw/net/e1000e.o
  CC      hw/net/e1000e_core.o
  CC      hw/net/rtl8139.o
  CC      hw/net/vmxnet3.o
  CC      hw/net/smc91c111.o
  CC      hw/net/lan9118.o
  CC      hw/net/ne2000-isa.o
  CC      hw/net/xgmac.o
  CC      hw/net/xilinx_axienet.o
  CC      hw/net/allwinner_emac.o
  CC      hw/net/imx_fec.o
  CC      hw/net/cadence_gem.o
  CC      hw/net/stellaris_enet.o
  CC      hw/net/ftgmac100.o
  CC      hw/net/rocker/rocker.o
  CC      hw/net/rocker/rocker_fp.o
  CC      hw/net/rocker/rocker_desc.o
  CC      hw/net/rocker/rocker_world.o
  CC      hw/net/rocker/rocker_of_dpa.o
  CC      hw/net/can/can_sja1000.o
  CC      hw/net/can/can_kvaser_pci.o
  CC      hw/net/can/can_pcm3680_pci.o
  CC      hw/net/can/can_mioe3680_pci.o
  CC      hw/nvram/eeprom93xx.o
  CC      hw/nvram/eeprom_at24c.o
  CC      hw/nvram/fw_cfg.o
  CC      hw/nvram/chrp_nvram.o
  CC      hw/pci-bridge/pci_bridge_dev.o
  CC      hw/pci-bridge/pcie_root_port.o
  CC      hw/pci-bridge/gen_pcie_root_port.o
  CC      hw/pci-bridge/pcie_pci_bridge.o
  CC      hw/pci-bridge/pci_expander_bridge.o
  CC      hw/pci-bridge/xio3130_upstream.o
  CC      hw/pci-bridge/xio3130_downstream.o
  CC      hw/pci-bridge/ioh3420.o
  CC      hw/pci-bridge/i82801b11.o
  CC      hw/pci-host/pam.o
  CC      hw/pci-host/versatile.o
  CC      hw/pci-host/piix.o
  CC      hw/pci-host/q35.o
  CC      hw/pci-host/gpex.o
  CC      hw/pci-host/designware.o
  CC      hw/pci/pci.o
  CC      hw/pci/pci_bridge.o
  CC      hw/pci/msix.o
  CC      hw/pci/msi.o
  CC      hw/pci/shpc.o
  CC      hw/pci/slotid_cap.o
  CC      hw/pci/pci_host.o
  CC      hw/pci/pcie_host.o
  CC      hw/pci/pcie.o
  CC      hw/pci/pcie_aer.o
  CC      hw/pci/pcie_port.o
  CC      hw/pci/pci-stub.o
  CC      hw/pcmcia/pcmcia.o
  CC      hw/scsi/scsi-disk.o
  CC      hw/scsi/scsi-generic.o
  CC      hw/scsi/scsi-bus.o
  CC      hw/scsi/lsi53c895a.o
  CC      hw/scsi/mptsas.o
  CC      hw/scsi/mptconfig.o
  CC      hw/scsi/mptendian.o
  CC      hw/scsi/megasas.o
  CC      hw/scsi/vmw_pvscsi.o
  CC      hw/scsi/esp.o
  CC      hw/scsi/esp-pci.o
  CC      hw/sd/pl181.o
  CC      hw/sd/ssi-sd.o
  CC      hw/sd/sd.o
  CC      hw/sd/core.o
  CC      hw/sd/sdmmc-internal.o
  CC      hw/sd/sdhci.o
  CC      hw/smbios/smbios.o
  CC      hw/smbios/smbios_type_38.o
  CC      hw/smbios/smbios-stub.o
  CC      hw/smbios/smbios_type_38-stub.o
  CC      hw/ssi/pl022.o
  CC      hw/ssi/ssi.o
  CC      hw/ssi/xilinx_spips.o
  CC      hw/ssi/aspeed_smc.o
  CC      hw/ssi/stm32f2xx_spi.o
  CC      hw/ssi/mss-spi.o
  CC      hw/timer/arm_timer.o
  CC      hw/timer/arm_mptimer.o
  CC      hw/timer/armv7m_systick.o
  CC      hw/timer/a9gtimer.o
  CC      hw/timer/cadence_ttc.o
  CC      hw/timer/ds1338.o
  CC      hw/timer/hpet.o
  CC      hw/timer/i8254_common.o
  CC      hw/timer/i8254.o
  CC      hw/timer/pl031.o
  CC      hw/timer/twl92230.o
  CC      hw/timer/imx_epit.o
  CC      hw/timer/imx_gpt.o
  CC      hw/timer/xlnx-zynqmp-rtc.o
  CC      hw/timer/stm32f2xx_timer.o
  CC      hw/timer/aspeed_timer.o
  CC      hw/timer/cmsdk-apb-timer.o
  CC      hw/timer/mss-timer.o
  CC      hw/tpm/tpm_util.o
  CC      hw/tpm/tpm_tis.o
  CC      hw/tpm/tpm_crb.o
  CC      hw/usb/core.o
  CC      hw/usb/combined-packet.o
  CC      hw/usb/bus.o
  CC      hw/usb/libhw.o
  CC      hw/usb/desc.o
  CC      hw/usb/desc-msos.o
  CC      hw/usb/hcd-uhci.o
  CC      hw/usb/hcd-ohci.o
  CC      hw/usb/hcd-ehci.o
  CC      hw/usb/hcd-ehci-pci.o
  CC      hw/usb/hcd-ehci-sysbus.o
  CC      hw/usb/hcd-xhci.o
  CC      hw/usb/hcd-xhci-nec.o
  CC      hw/usb/hcd-musb.o
  CC      hw/usb/dev-hub.o
  CC      hw/usb/dev-hid.o
  CC      hw/usb/dev-wacom.o
  CC      hw/usb/dev-storage.o
  CC      hw/usb/dev-uas.o
  CC      hw/usb/dev-audio.o
  CC      hw/usb/dev-serial.o
  CC      hw/usb/dev-network.o
  CC      hw/usb/dev-bluetooth.o
  CC      hw/usb/dev-smartcard-reader.o
  CC      hw/usb/host-stub.o
  CC      hw/virtio/virtio-rng.o
  CC      hw/virtio/virtio-pci.o
  CC      hw/virtio/virtio-bus.o
  CC      hw/virtio/virtio-mmio.o
  CC      hw/virtio/vhost-stub.o
  CC      hw/watchdog/watchdog.o
  CC      hw/watchdog/wdt_i6300esb.o
  CC      hw/watchdog/wdt_ib700.o
  CC      hw/watchdog/wdt_aspeed.o
  CC      migration/migration.o
  CC      migration/socket.o
  CC      migration/fd.o
  CC      migration/exec.o
  CC      migration/tls.o
  CC      migration/channel.o
  CC      migration/savevm.o
  CC      migration/colo-comm.o
  CC      migration/colo.o
  CC      migration/colo-failover.o
  CC      migration/vmstate.o
  CC      migration/vmstate-types.o
  CC      migration/page_cache.o
  CC      migration/qemu-file.o
  CC      migration/global_state.o
  CC      migration/qemu-file-channel.o
  CC      migration/xbzrle.o
  CC      migration/postcopy-ram.o
  CC      migration/qjson.o
  CC      migration/block-dirty-bitmap.o
  CC      migration/block.o
  CC      net/net.o
  CC      net/queue.o
  CC      net/checksum.o
  CC      net/util.o
  CC      net/hub.o
  CC      net/socket.o
  CC      net/dump.o
  CC      net/eth.o
  CC      net/slirp.o
  CC      net/filter.o
  CC      net/filter-buffer.o
  CC      net/filter-mirror.o
  CC      net/colo-compare.o
  CC      net/colo.o
  CC      net/filter-rewriter.o
  CC      net/filter-replay.o
  CC      net/tap-win32.o
  CC      net/can/can_core.o
  CC      net/can/can_host.o
  CC      qom/cpu.o
  CC      replay/replay.o
  CC      replay/replay-internal.o
  CC      replay/replay-events.o
  CC      replay/replay-time.o
  CC      replay/replay-input.o
  CC      replay/replay-char.o
  CC      replay/replay-snapshot.o
  CC      replay/replay-net.o
  CC      replay/replay-audio.o
  CC      slirp/cksum.o
  CC      slirp/if.o
  CC      slirp/ip_icmp.o
  CC      slirp/ip6_icmp.o
  CC      slirp/ip6_input.o
  CC      slirp/ip6_output.o
  CC      slirp/ip_input.o
  CC      slirp/ip_output.o
  CC      slirp/dnssearch.o
  CC      slirp/dhcpv6.o
  CC      slirp/slirp.o
  CC      slirp/mbuf.o
  CC      slirp/misc.o
  CC      slirp/sbuf.o
  CC      slirp/socket.o
  CC      slirp/tcp_input.o
  CC      slirp/tcp_output.o
  CC      slirp/tcp_subr.o
  CC      slirp/tcp_timer.o
  CC      slirp/udp.o
  CC      slirp/udp6.o
  CC      slirp/bootp.o
  CC      slirp/tftp.o
  CC      slirp/arp_table.o
  CC      slirp/ndp_table.o
  CC      slirp/ncsi.o
  CC      ui/keymaps.o
  CC      ui/console.o
  CC      ui/cursor.o
  CC      ui/qemu-pixman.o
  CC      ui/input.o
  CC      ui/input-keymap.o
  CC      ui/input-legacy.o
  CC      ui/vnc.o
  CC      ui/vnc-enc-zlib.o
  CC      ui/vnc-enc-hextile.o
  CC      ui/vnc-enc-tight.o
  CC      ui/vnc-palette.o
  CC      ui/vnc-enc-zrle.o
  CC      ui/vnc-auth-vencrypt.o
  CC      ui/vnc-ws.o
  CC      ui/vnc-jobs.o
  CC      ui/sdl.o
  CC      ui/sdl_zoom.o
  CC      ui/gtk.o
  CC      chardev/char.o
  CC      chardev/char-console.o
  CC      chardev/char-fe.o
  CC      chardev/char-file.o
  CC      chardev/char-io.o
  CC      chardev/char-mux.o
  CC      chardev/char-null.o
  CC      chardev/char-pipe.o
  CC      chardev/char-ringbuf.o
  CC      chardev/char-serial.o
  CC      chardev/char-socket.o
  CC      chardev/char-stdio.o
  CC      chardev/char-udp.o
  CC      chardev/char-win.o
  CC      chardev/char-win-stdio.o
  CC      qga/commands.o
  AS      optionrom/multiboot.o
  AS      optionrom/linuxboot.o
  CC      optionrom/linuxboot_dma.o
  AS      optionrom/kvmvapic.o
  BUILD   optionrom/multiboot.img
  BUILD   optionrom/linuxboot.img
  BUILD   optionrom/linuxboot_dma.img
  BUILD   optionrom/kvmvapic.img
  BUILD   optionrom/multiboot.raw
  BUILD   optionrom/linuxboot.raw
  BUILD   optionrom/linuxboot_dma.raw
  BUILD   optionrom/kvmvapic.raw
  SIGN    optionrom/multiboot.bin
  CC      qga/guest-agent-command-state.o
  SIGN    optionrom/linuxboot.bin
  CC      qga/main.o
  SIGN    optionrom/linuxboot_dma.bin
  SIGN    optionrom/kvmvapic.bin
  CC      qga/commands-win32.o
  CC      qga/channel-win32.o
  CC      qga/service-win32.o
  CC      qga/vss-win32.o
  CC      qga/qapi-generated/qga-qapi-types.o
  CC      qga/qapi-generated/qga-qapi-visit.o
  CC      qga/qapi-generated/qga-qapi-commands.o
  AR      libqemuutil.a
  CC      qemu-img.o
  LINK    qemu-io.exe
  GEN     aarch64-softmmu/hmp-commands.h
  GEN     aarch64-softmmu/hmp-commands-info.h
  GEN     aarch64-softmmu/config-target.h
  CC      aarch64-softmmu/tcg/tcg.o
  CC      aarch64-softmmu/exec.o
  GEN     x86_64-softmmu/hmp-commands.h
  GEN     x86_64-softmmu/hmp-commands-info.h
  GEN     x86_64-softmmu/config-target.h
  CC      aarch64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/exec.o
  CC      x86_64-softmmu/tcg/tcg-op.o
  CC      x86_64-softmmu/tcg/tcg.o
  CC      x86_64-softmmu/tcg/tcg-op-vec.o
  CC      x86_64-softmmu/tcg/tcg-op-gvec.o
  CC      aarch64-softmmu/tcg/tcg-op-vec.o
  CC      x86_64-softmmu/tcg/tcg-common.o
  CC      aarch64-softmmu/tcg/tcg-op-gvec.o
  CC      x86_64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/fpu/softfloat.o
  CC      x86_64-softmmu/disas.o
  GEN     x86_64-softmmu/gdbstub-xml.c
  LINK    qemu-img.exe
  CC      x86_64-softmmu/arch_init.o
  CC      aarch64-softmmu/tcg/tcg-common.o
  CC      x86_64-softmmu/cpus.o
  CC      x86_64-softmmu/monitor.o
  CC      x86_64-softmmu/gdbstub.o
  CC      aarch64-softmmu/tcg/optimize.o
  CC      x86_64-softmmu/balloon.o
  CC      aarch64-softmmu/fpu/softfloat.o
  CC      x86_64-softmmu/ioport.o
  CC      aarch64-softmmu/disas.o
  CC      x86_64-softmmu/numa.o
  LINK    qemu-ga.exe
  GEN     aarch64-softmmu/gdbstub-xml.c
  CC      aarch64-softmmu/arch_init.o
  CC      aarch64-softmmu/cpus.o
  CC      x86_64-softmmu/qtest.o
  CC      aarch64-softmmu/monitor.o
  CC      x86_64-softmmu/memory.o
  CC      aarch64-softmmu/gdbstub.o
  CC      aarch64-softmmu/balloon.o
/tmp/qemu-test/src/fpu/softfloat.c: In function 'addsub_floats':
/tmp/qemu-test/src/fpu/softfloat.c:727:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'mul_floats':
/tmp/qemu-test/src/fpu/softfloat.c:844:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'div_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1172:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1384:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_uint_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1481:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int':
/tmp/qemu-test/src/fpu/softfloat.c:1284:24: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 a.frac += inc;
                        ^~
/tmp/qemu-test/src/fpu/softfloat.c:1249:16: error: 'one' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (one) {
                ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_canonical':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'minmax_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'b_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             bool a_less = a_exp < b_exp;
                  ^~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'a_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
cc1: all warnings being treated as errors
make[1]: *** [/tmp/qemu-test/src/rules.mak:66: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/ioport.o
  CC      aarch64-softmmu/numa.o
  CC      aarch64-softmmu/qtest.o
  CC      aarch64-softmmu/memory.o
  CC      aarch64-softmmu/memory_mapping.o
  CC      aarch64-softmmu/dump.o
  CC      aarch64-softmmu/migration/ram.o
make: *** [Makefile:478: subdir-x86_64-softmmu] Error 2
make: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/accel/accel.o
  CC      aarch64-softmmu/accel/stubs/hax-stub.o
  CC      aarch64-softmmu/accel/stubs/hvf-stub.o
  CC      aarch64-softmmu/accel/stubs/whpx-stub.o
  CC      aarch64-softmmu/accel/stubs/kvm-stub.o
  CC      aarch64-softmmu/accel/tcg/tcg-all.o
/tmp/qemu-test/src/fpu/softfloat.c: In function 'addsub_floats':
/tmp/qemu-test/src/fpu/softfloat.c:727:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'mul_floats':
/tmp/qemu-test/src/fpu/softfloat.c:844:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'div_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1172:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1384:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_uint_and_pack':
/tmp/qemu-test/src/fpu/softfloat.c:1481:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_to_int':
/tmp/qemu-test/src/fpu/softfloat.c:1284:24: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 a.frac += inc;
                        ^~
/tmp/qemu-test/src/fpu/softfloat.c:1249:16: error: 'one' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             if (one) {
                ^
/tmp/qemu-test/src/fpu/softfloat.c: In function 'minmax_floats':
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'b_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             bool a_less = a_exp < b_exp;
                  ^~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:1745:18: error: 'a_exp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
/tmp/qemu-test/src/fpu/softfloat.c: In function 'round_canonical':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_add':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sub':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_mul':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_muladd':
/tmp/qemu-test/src/fpu/softfloat.c:431:20: error: 'overflow_norm' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 if (overflow_norm) {
                    ^
/tmp/qemu-test/src/fpu/softfloat.c:385:10: note: 'overflow_norm' was declared here
     bool overflow_norm;
          ^~~~~~~~~~~~~
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float16_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float32_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
/tmp/qemu-test/src/fpu/softfloat.c: In function 'float64_sqrt':
/tmp/qemu-test/src/fpu/softfloat.c:421:22: error: 'inc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                 frac += inc;
                      ^~
/tmp/qemu-test/src/fpu/softfloat.c:383:20: note: 'inc' was declared here
     uint64_t frac, inc;
                    ^~~
cc1: all warnings being treated as errors
make[1]: *** [/tmp/qemu-test/src/rules.mak:66: fpu/softfloat.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:478: subdir-aarch64-softmmu] Error 2
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 456, in <module>
    sys.exit(main())
  File "./tests/docker/docker.py", line 453, in main
    return args.cmdobj.run(args, argv)
  File "./tests/docker/docker.py", line 261, in run
    return Docker().run(argv, args.keep, quiet=args.quiet)
  File "./tests/docker/docker.py", line 229, in run
    quiet=quiet)
  File "./tests/docker/docker.py", line 147, in _do_check
    return subprocess.check_call(self._command + cmd, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'run', '--label', 'com.qemu.instance.uuid=dff201fe43e111e8984252540069c830', '-u', '0', '--security-opt', 'seccomp=unconfined', '--rm', '--net=none', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=8', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/root/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-qv4p4631/src/docker-src.2018-04-19-10.56.25.17953:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2
make[1]: *** [tests/docker/Makefile.include:131: docker-run] Error 1
make[1]: Leaving directory '/var/tmp/patchew-tester-tmp-qv4p4631/src'
make: *** [tests/docker/Makefile.include:165: docker-run-test-mingw@fedora] Error 2

real	6m5.400s
user	0m5.096s
sys	0m3.730s
=== OUTPUT END ===

Test command exited with code: 2


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS Alex Bennée
@ 2018-04-19 17:05   ` Philippe Mathieu-Daudé
  2018-04-19 17:49     ` Alex Bennée
  0 siblings, 1 reply; 93+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-04-19 17:05 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange,
	richard.henderson, balrogg, aurelien, agraf
  Cc: qemu-devel, Yongbok Kim

On 04/19/2018 10:58 AM, Alex Bennée wrote:
> This doesn't add any additional tests but enables building the
> multiarch tests for MIPS using docker cross compilers. We don't have a
> cross compiler for mips64 big endian though.

Oh we have one, using CFLAGS+=-EB

we don't have cross libraries although.

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 tests/tcg/mips/Makefile.include
> 
> diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include
> new file mode 100644
> index 0000000000..a9beceb623
> --- /dev/null
> +++ b/tests/tcg/mips/Makefile.include
> @@ -0,0 +1,17 @@
> +#
> +# Makefile.include for all MIPs targets
> +#
> +# As Debian doesn't support mip64 in big endian mode the only way to
> +# build BE is to pass a working cross compiler to ./configure
> +#
> +
> +ifeq ($(TARGET_NAME),mips64el)
> +DOCKER_IMAGE=debian-mips64el-cross
> +DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
> +else ifeq ($(TARGET_NAME),mipsel)
> +DOCKER_IMAGE=debian-mipsel-cross
> +DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
> +else ifeq ($(TARGET_NAME),mips)
> +DOCKER_IMAGE=debian-mips-cross
> +DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
> +endif
> 

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-19 17:05   ` Philippe Mathieu-Daudé
@ 2018-04-19 17:49     ` Alex Bennée
  2018-04-19 17:58       ` Peter Maydell
  0 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-19 17:49 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: peter.maydell, cota, famz, berrange, richard.henderson, balrogg,
	aurelien, agraf, qemu-devel, Yongbok Kim


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 04/19/2018 10:58 AM, Alex Bennée wrote:
>> This doesn't add any additional tests but enables building the
>> multiarch tests for MIPS using docker cross compilers. We don't have a
>> cross compiler for mips64 big endian though.
>
> Oh we have one, using CFLAGS+=-EB
>
> we don't have cross libraries although.

Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
the libraries that let us down. If, as you say, newlib gets this right I
suspect we should use that to build the compilers not supported out of
the box by Debian.

>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>  tests/tcg/mips/Makefile.include | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>  create mode 100644 tests/tcg/mips/Makefile.include
>>
>> diff --git a/tests/tcg/mips/Makefile.include b/tests/tcg/mips/Makefile.include
>> new file mode 100644
>> index 0000000000..a9beceb623
>> --- /dev/null
>> +++ b/tests/tcg/mips/Makefile.include
>> @@ -0,0 +1,17 @@
>> +#
>> +# Makefile.include for all MIPs targets
>> +#
>> +# As Debian doesn't support mip64 in big endian mode the only way to
>> +# build BE is to pass a working cross compiler to ./configure
>> +#
>> +
>> +ifeq ($(TARGET_NAME),mips64el)
>> +DOCKER_IMAGE=debian-mips64el-cross
>> +DOCKER_CROSS_COMPILER=mips64el-linux-gnuabi64-gcc
>> +else ifeq ($(TARGET_NAME),mipsel)
>> +DOCKER_IMAGE=debian-mipsel-cross
>> +DOCKER_CROSS_COMPILER=mipsel-linux-gnu-gcc
>> +else ifeq ($(TARGET_NAME),mips)
>> +DOCKER_IMAGE=debian-mips-cross
>> +DOCKER_CROSS_COMPILER=mips-linux-gnu-gcc
>> +endif
>>


--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-19 17:49     ` Alex Bennée
@ 2018-04-19 17:58       ` Peter Maydell
  2018-04-20  2:57         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 93+ messages in thread
From: Peter Maydell @ 2018-04-19 17:58 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Philippe Mathieu-Daudé,
	Emilio G. Cota, Fam Zheng, Daniel P. Berrange, Richard Henderson,
	andrzej zaborowski, Aurelien Jarno, Alexander Graf,
	QEMU Developers, Yongbok Kim

On 19 April 2018 at 18:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>
> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>
>> On 04/19/2018 10:58 AM, Alex Bennée wrote:
>>> This doesn't add any additional tests but enables building the
>>> multiarch tests for MIPS using docker cross compilers. We don't have a
>>> cross compiler for mips64 big endian though.
>>
>> Oh we have one, using CFLAGS+=-EB
>>
>> we don't have cross libraries although.
>
> Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
> the libraries that let us down. If, as you say, newlib gets this right I
> suspect we should use that to build the compilers not supported out of
> the box by Debian.

I don't think we really want to get into the business of
building our own cross compilers if we can avoid it...it's harder
than it looks and we would be essentially reinventing the wheel.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
@ 2018-04-19 20:20   ` Richard Henderson
  2018-04-19 20:41   ` Richard Henderson
  2018-04-19 21:41   ` Eric Blake
  2 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 20:20 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> @@ -6805,6 +6823,7 @@ case "$target_name" in
>      bflt="yes"
>      mttcg="yes"
>      gdb_xml_files="arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
> +    target_compiler=$cross_cc_arm
>    ;;
>    aarch64|aarch64_be)
>      TARGET_ARCH=aarch64
> @@ -6812,6 +6831,7 @@ case "$target_name" in
>      bflt="yes"
>      mttcg="yes"
>      gdb_xml_files="aarch64-core.xml aarch64-fpu.xml arm-core.xml arm-vfp.xml arm-vfp3.xml arm-neon.xml"
> +    target_compiler=$cross_cc_aarch64
>    ;;
>    cris)
>    ;;

Is there any reason not to fill in the reset of the cases within the switch at
the same time?


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
  2018-04-19 20:20   ` Richard Henderson
@ 2018-04-19 20:41   ` Richard Henderson
  2018-04-19 20:47     ` Richard Henderson
  2018-04-19 21:41   ` Eric Blake
  2 siblings, 1 reply; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 20:41 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> +  --cross-cc-*) cc_arch=${opt#--cross-cc-}
> +                eval "cross_cc_${cc_arch}=\$optarg"

This doesn't work as intended.

Given e.g. --cross-cc-aarch64=aarch64-linux-gcc

+ cc_arch=aarch64=aarch64-linux-gcc
+ eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg'
++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc

Which sets the variable "cross_cc_aarch64"
to "aarch64-linux-gcc=aarch64-linux-gcc".
Which of course won't exist to execute.


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 20:41   ` Richard Henderson
@ 2018-04-19 20:47     ` Richard Henderson
  2018-04-19 21:36       ` Eric Blake
  0 siblings, 1 reply; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 20:47 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 10:41 AM, Richard Henderson wrote:
> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>> +  --cross-cc-*) cc_arch=${opt#--cross-cc-}
>> +                eval "cross_cc_${cc_arch}=\$optarg"
> 
> This doesn't work as intended.
> 
> Given e.g. --cross-cc-aarch64=aarch64-linux-gcc
> 
> + cc_arch=aarch64=aarch64-linux-gcc
> + eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg'
> ++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc
> 
> Which sets the variable "cross_cc_aarch64"
> to "aarch64-linux-gcc=aarch64-linux-gcc".
> Which of course won't exist to execute.

-  --cross-cc-*) cc_arch=${opt#--cross-cc-}
+  --cross-cc-*) cc_arch=$(expr "$opt" : '--cross-cc-\([^=]*\)')

seems to do the trick.  Obviously a similar change will be needed for
--cross-cc-flags-*.


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability Alex Bennée
@ 2018-04-19 20:49   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 20:49 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> This tests for a working docker installation without sudo and sets up
> config-host.mak accordingly. This will be useful from cross compiling
> things in the future.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386 Alex Bennée
@ 2018-04-19 20:59   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 20:59 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> -cc_i386=i386-pc-linux-gnu-gcc
>  libs_qga=""
>  debug_info="yes"
>  stack_protector=""
> @@ -457,6 +456,8 @@ docker="no"
>  cross_cc_aarch64="aarch64-linux-gnu-gcc"
>  cross_cc_arm="arm-linux-gnueabihf-gcc"
>  cross_cc_powerpc="powerpc-linux-gnu-gcc"
> +cross_cc_i386="i386-pc-linux-gnu-gcc"
> +cross_cc_cflags_i386=""
...
>  
>  enabled_cross_compilers=""
>  
> @@ -687,12 +688,10 @@ case "$cpu" in
>    i386|i486|i586|i686|i86pc|BePC)
>      cpu="i386"
>      supported_cpu="yes"
> -    cross_cc_i386=gcc
>    ;;
>    x86_64|amd64)
>      cpu="x86_64"
>      supported_cpu="yes"
> -    cross_cc_x86_64=gcc
>    ;;
>    armv*b|armv*l|arm)
>      cpu="arm"
> @@ -1435,7 +1434,6 @@ case "$cpu" in
>      i386)
>             CPU_CFLAGS="-m32"
>             LDFLAGS="-m32 $LDFLAGS"
> -           cc_i386='$(CC) -m32'

Why is the i386 case not handled like...

>             ;;
>      x86_64)
>             # ??? Only extremely old AMD cpus do not have cmpxchg16b.
> @@ -1443,12 +1441,14 @@ case "$cpu" in
>             # runtime and generate the fallback to serial emulation.
>             CPU_CFLAGS="-m64 -mcx16"
>             LDFLAGS="-m64 $LDFLAGS"
> -           cc_i386='$(CC) -m32'
> +           cross_cc_x86_64=$cc
> +           cross_cc_cflags_x86_64=$CPU_CFLAGS

... the x86_64 case?

Also, does cross_cc_cflags_foo really have value over including the flags
directly in the cross_cc_foo variable?


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler Alex Bennée
@ 2018-04-19 21:04   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:04 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
>      i386)
>             CPU_CFLAGS="-m32"
>             LDFLAGS="-m32 $LDFLAGS"
> +           cross_cc_i386=$cc
> +           cross_cc_cflags_i386=$CPU_CFLAGS
>             ;;
>      x86_64)
>             # ??? Only extremely old AMD cpus do not have cmpxchg16b.
> @@ -1454,7 +1468,7 @@ case "$cpu" in
>             CPU_CFLAGS="-mx32"
>             LDFLAGS="-mx32 $LDFLAGS"
>             cross_cc_i386=$cc
> -           cross_cc_cflags_i386="-m32"
> +           cross_cc_cflags_i386=$CPU_CFLAGS
>             ;;

Partially redundant with patch 4?  Anyway, this is what I was expecting to see
there.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST Alex Bennée
@ 2018-04-19 21:05   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:05 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> From: Fam Zheng <famz@redhat.com>
> 
> To be more accurate on its purpose and make code that looks for a certain
> target out of this variable more readable.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  Makefile               | 20 ++++++++++----------
>  configure              |  2 +-
>  scripts/create_config  |  2 +-
>  tests/Makefile.include |  2 +-
>  4 files changed, 13 insertions(+), 13 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT Alex Bennée
@ 2018-04-19 21:08   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:08 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> Define this in one place to make it easy to re-use.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/docker/Makefile.include | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test Alex Bennée
@ 2018-04-19 21:20   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:20 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> From: Fam Zheng <famz@redhat.com>
> 
> To keep the compiler happy, and to fit in our buildsys flags:
> 
> - Make local functions "static"
> - #ifdef out unused functions
> - drop cutils/osdep dependencies
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> [AJB: drop cutils/osdep dependencies]
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/tcg/multiarch/linux-test.c | 68 ++++++++++----------------------
>  1 file changed, 21 insertions(+), 47 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir Alex Bennée
@ 2018-04-19 21:20   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:20 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> We will want to build these for all supported guest architectures so
> lets move them all into one place. We also drop test_path at this
> point because it needs qemu utils and glib bits which is hard to
> support for cross compiling.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> ---
> v2
>   - move VPATH and TESTs setup into multiarch/Makefile.target
>   - remove moved bits from tests/tcg/Makefile
> ---

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests Alex Bennée
@ 2018-04-19 21:22   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:22 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> Un-comment the remaining tests. I removed the itimer value tests
> because I'm fairly sure a re-arming timer will always have a different
> value in it when you grab it.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/multiarch/linux-test.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386 Alex Bennée
@ 2018-04-19 21:25   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:25 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> From: Fam Zheng <famz@redhat.com>
> 
> We have -Werror=missing-prototype, add a dummy prototype to avoid that
> warning.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/tcg/i386/hello-i386.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386 Alex Bennée
@ 2018-04-19 21:26   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:26 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> The test-i386 test case is a little special as it includes assembler
> files. Add the additional compile magic to assemble these bits and
> link them to the final binary.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/tcg/i386/test-i386.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes Alex Bennée
@ 2018-04-19 21:27   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:27 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> The compiler complains about the old __mode__ style attributes.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/i386/test-i386.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format Alex Bennée
@ 2018-04-19 21:28   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:28 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/tcg/i386/test-i386.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir Alex Bennée
@ 2018-04-19 21:29   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:29 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> These only need to be built for ARM guests.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> v2
>   - do VPATH manipulation in tests/tcg/arm/Makefile.target
>   - merge with fix hello-arm test
> ---

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test Alex Bennée
@ 2018-04-19 21:32   ` Richard Henderson
  2018-04-20  8:18     ` Alex Bennée
  0 siblings, 1 reply; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:32 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> +test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
> +test-arm-iwmmxt: test-arm-iwmmxt.S

This appears to be insufficient.
If I begin with armv7l-linux-gnueabihf-gcc, then I get

  CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
cc1: error: iWMMXt and NEON are incompatible



r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 20:47     ` Richard Henderson
@ 2018-04-19 21:36       ` Eric Blake
  0 siblings, 0 replies; 93+ messages in thread
From: Eric Blake @ 2018-04-19 21:36 UTC (permalink / raw)
  To: Richard Henderson, Alex Bennée, peter.maydell, cota, famz,
	berrange, f4bug, balrogg, aurelien, agraf
  Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

On 04/19/2018 03:47 PM, Richard Henderson wrote:
> On 04/19/2018 10:41 AM, Richard Henderson wrote:
>> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>>> +  --cross-cc-*) cc_arch=${opt#--cross-cc-}
>>> +                eval "cross_cc_${cc_arch}=\$optarg"
>>
>> This doesn't work as intended.
>>
>> Given e.g. --cross-cc-aarch64=aarch64-linux-gcc
>>
>> + cc_arch=aarch64=aarch64-linux-gcc
>> + eval 'cross_cc_aarch64=aarch64-linux-gcc=$optarg'
>> ++ cross_cc_aarch64=aarch64-linux-gcc=aarch64-linux-gcc
>>
>> Which sets the variable "cross_cc_aarch64"
>> to "aarch64-linux-gcc=aarch64-linux-gcc".
>> Which of course won't exist to execute.
> 
> -  --cross-cc-*) cc_arch=${opt#--cross-cc-}
> +  --cross-cc-*) cc_arch=$(expr "$opt" : '--cross-cc-\([^=]*\)')

Forking an expr subshell may not be needed; how about:

--cross-cc-*) cc_arch=${opt#--cross-cc-}; cc_arch=${cc_arch%%=*}

to strip both the --cross-cc- prefix, and any suffix starting at the
first =.

> 
> seems to do the trick.  Obviously a similar change will be needed for
> --cross-cc-flags-*.
> 
> 
> r~
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
  2018-04-19 20:20   ` Richard Henderson
  2018-04-19 20:41   ` Richard Henderson
@ 2018-04-19 21:41   ` Eric Blake
  2 siblings, 0 replies; 93+ messages in thread
From: Eric Blake @ 2018-04-19 21:41 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	richard.henderson, balrogg, aurelien, agraf
  Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

On 04/19/2018 08:58 AM, Alex Bennée wrote:
> This allows us to specify cross compilers for our guests. This is
> useful for building test images/programs. Currently we re-run the
> compile test for each target. I couldn't think of a way to cache the
> value for a given arch without getting messier configure code.
> 
> The cross compiler for the guest is visible to each target as
> CROSS_CC_GUEST in config-target.mak.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 

> @@ -483,6 +490,11 @@ for opt do
>    ;;
>    --disable-debug-info) debug_info="no"
>    ;;
> +  --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option"

Not quite right; it looks like you intended to have a trailing - instead
of 0; and if you are trying to filter out bad characters, then you need
* on both sides of the [!...] list:

--cross-cc-*[!a-zA-Z0-9_-]*=*)

otherwise you are only filtering out bad characters immediately before
the first =.  There's also the question of whether I can spell both
'--cross-cc-FOO=BAR' as one argument and '--cross-cc-FOO BAR' as two
arguments; this is filtering out only the one-argument case.

> +  ;;
> +  --cross-cc-*) cc_arch=${opt#--cross-cc-}
> +                eval "cross_cc_${cc_arch}=\$optarg"
> +  ;;


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers Alex Bennée
@ 2018-04-19 21:41   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:41 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> From: "Emilio G. Cota" <cota@braap.org>
> 
> To ease the cross-compilation of softfloat.o.
> 
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  fpu/softfloat.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB Alex Bennée
@ 2018-04-19 21:41   ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 21:41 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> From: "Emilio G. Cota" <cota@braap.org>
> 
> To ease the cross-compilation of tests that do not use glib.
> 
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  include/qemu/osdep.h | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)
  2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!) Alex Bennée
@ 2018-04-19 22:02   ` Richard Henderson
  2018-04-20  6:43     ` Alex Bennée
  0 siblings, 1 reply; 93+ messages in thread
From: Richard Henderson @ 2018-04-19 22:02 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:59 AM, Alex Bennée wrote:
> +ifneq (,$(findstring 64,$(TARGET_NAME)))

You're only considering aarch64, x86_64, ppc64 and the like.
This fails for alpha, s390x and the like.


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (44 preceding siblings ...)
  2018-04-19 15:02 ` no-reply
@ 2018-04-20  0:12 ` Richard Henderson
  2018-04-20  2:32   ` Philippe Mathieu-Daudé
  2018-04-20  6:42   ` Alex Bennée
  2018-04-20  2:10 ` Fam Zheng
                   ` (2 subsequent siblings)
  48 siblings, 2 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-20  0:12 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> I did start playing with crosstool-ng and Linaro's own ABE scripts but
> realised this could end up a massive time sync. What would be really
> helpful is if the respective maintainers could encode their EXACT
> STEPS for building their cross compilers into some docker recipes.

Building a cross-compiler with an existing libc binary is easy.
Building a cross-compiler without a libc is harder, and involves
a bit of two-stepping to get things right.

For someone who has never used docker, what's a recipe look like?
Just a shell script that gets run within a container?
Is there an opportunity to wget or local copy an existing libc
tarball/package to put us into the easy case?

> Finally the end of the series has me adding Emilio's fp-test to the
> per-target builds. Unfortunately although some osdep.h and softfloat.c
> fiddling allows us to build in most cases I still can't build for
> example an i386 fp-test on an x86_64 host using the cross compiler as
> it triggers incompatibilities with config-host.h - in this case Int128
> support. Currently I just hackily disable fp-test for non-64 bit
> platforms.

It seems I can't even build fp-test for x86_64.

  CROSS-BUILD x86_64 guest-tests with cc
In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
/home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
config-host.h: No such file or directory
 #include "config-host.h"
          ^~~~~~~~~~~~~~~
compilation terminated.


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler Alex Bennée
@ 2018-04-20  2:06   ` Fam Zheng
  2018-04-20  2:43   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 93+ messages in thread
From: Fam Zheng @ 2018-04-20  2:06 UTC (permalink / raw)
  To: Alex Bennée
  Cc: peter.maydell, cota, berrange, f4bug, richard.henderson, balrogg,
	aurelien, agraf, qemu-devel

On Thu, 04/19 14:58, Alex Bennée wrote:
> When calling our cross-compilation images we want to call something
> other than the default cc.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> 

Reviewed-by: Fam Zheng <famz@redhat.com>

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure Alex Bennée
@ 2018-04-20  2:08   ` Fam Zheng
  0 siblings, 0 replies; 93+ messages in thread
From: Fam Zheng @ 2018-04-20  2:08 UTC (permalink / raw)
  To: Alex Bennée
  Cc: peter.maydell, cota, berrange, f4bug, richard.henderson, balrogg,
	aurelien, agraf, qemu-devel

On Thu, 04/19 14:58, Alex Bennée wrote:
> From: Peter Maydell <peter.maydell@linaro.org>
> 
> This is a helper function for the configure script. It replies yes,
> sudo or no to inform the user if non-interactive docker support is
> available. We trap the Exception to fail gracefully.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/docker.py | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 1246ba9578..f8267586eb 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -390,6 +390,24 @@ class ImagesCommand(SubCommand):
>      def run(self, args, argv):
>          return Docker().command("images", argv, args.quiet)
>  
> +
> +class ProbeCommand(SubCommand):
> +    """Probe if we can run docker automatically"""
> +    name = "probe"
> +
> +    def run(self, args, argv):
> +        try:
> +            docker = Docker()
> +            if docker._command[0] == "docker":
> +                print "yes"
> +            elif docker._command[0] == "sudo":
> +                print "sudo"
> +        except Exception:
> +            print "no"

Non-zero exit code is better in 'no' case, but I guess it's not required by
configure. Either way:

Reviewed-by: Fam Zheng <famz@redhat.com>


> +
> +        return
> +
> +
>  def main():
>      parser = argparse.ArgumentParser(description="A Docker helper",
>              usage="%s <subcommand> ..." % os.path.basename(sys.argv[0]))
> -- 
> 2.17.0
> 

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (45 preceding siblings ...)
  2018-04-20  0:12 ` Richard Henderson
@ 2018-04-20  2:10 ` Fam Zheng
  2018-04-20  3:41 ` Max Filippov
  2018-04-22 20:22 ` Richard Henderson
  48 siblings, 0 replies; 93+ messages in thread
From: Fam Zheng @ 2018-04-20  2:10 UTC (permalink / raw)
  To: Alex Bennée
  Cc: peter.maydell, cota, berrange, f4bug, richard.henderson, balrogg,
	aurelien, agraf, qemu-devel

On Thu, 04/19 14:58, Alex Bennée wrote:
> Hi,
> 
> This is the second revision of my attempt to revive the tests/tcg
> directory. You can find the first iteration here:
> 
>   https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01361.html

Thanks for taking over! I cannot review all the patches, but for the Docker
part:

Acked-by: Fam Zheng <famz@redhat.com>

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-20  0:12 ` Richard Henderson
@ 2018-04-20  2:32   ` Philippe Mathieu-Daudé
  2018-04-20  6:42   ` Alex Bennée
  1 sibling, 0 replies; 93+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-04-20  2:32 UTC (permalink / raw)
  To: Richard Henderson, Alex Bennée, peter.maydell, cota, famz,
	berrange, balrogg, aurelien, agraf
  Cc: qemu-devel

> It seems I can't even build fp-test for x86_64.
> 
>   CROSS-BUILD x86_64 guest-tests with cc
> In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
> /home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
> config-host.h: No such file or directory
>  #include "config-host.h"
>           ^~~~~~~~~~~~~~~
> compilation terminated.

Cross builds when target==host arch are often broken because the less
tested. Probably because it is easier to directly use the host, yet
fully configured.

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler
  2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler Alex Bennée
  2018-04-20  2:06   ` Fam Zheng
@ 2018-04-20  2:43   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 93+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-04-20  2:43 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange,
	richard.henderson, balrogg, aurelien, agraf
  Cc: qemu-devel

On 04/19/2018 10:58 AM, Alex Bennée wrote:
> When calling our cross-compilation images we want to call something
> other than the default cc.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> 
> ---
> v2
>   - use arg.cc default to simplify logic
> ---
>  tests/docker/docker.py | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index bcc3ee2dee..59bce9f19a 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -415,6 +415,8 @@ class CcCommand(SubCommand):
>      def args(self, parser):
>          parser.add_argument("--image", "-i", required=True,
>                              help="The docker image in which to run cc")
> +        parser.add_argument("--cc", default="cc",
> +                            help="The compiler executable to call")
>          parser.add_argument("--source-path", "-s", nargs="*", dest="paths",
>                              help="""Extra paths to (ro) mount into container for
>                              reading sources""")
> @@ -428,7 +430,7 @@ class CcCommand(SubCommand):
>          if args.paths:
>              for p in args.paths:
>                  cmd += ["-v", "%s:%s:ro,z" % (p, p)]
> -        cmd += [args.image, "cc"]
> +        cmd += [args.image, args.cc]
>          cmd += argv
>          return Docker().command("run", cmd, args.quiet)
>  
> 

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-19 17:58       ` Peter Maydell
@ 2018-04-20  2:57         ` Philippe Mathieu-Daudé
  2018-04-20  3:08           ` Fam Zheng
                             ` (3 more replies)
  0 siblings, 4 replies; 93+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-04-20  2:57 UTC (permalink / raw)
  To: Peter Maydell, Alex Bennée
  Cc: Emilio G. Cota, Fam Zheng, Daniel P. Berrange, Richard Henderson,
	andrzej zaborowski, Aurelien Jarno, Alexander Graf,
	QEMU Developers, Yongbok Kim

On 04/19/2018 02:58 PM, Peter Maydell wrote:
> On 19 April 2018 at 18:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>>> On 04/19/2018 10:58 AM, Alex Bennée wrote:
>>>> This doesn't add any additional tests but enables building the
>>>> multiarch tests for MIPS using docker cross compilers. We don't have a
>>>> cross compiler for mips64 big endian though.
>>>
>>> Oh we have one, using CFLAGS+=-EB
>>>
>>> we don't have cross libraries although.
>>
>> Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
>> the libraries that let us down. If, as you say, newlib gets this right I
>> suspect we should use that to build the compilers not supported out of
>> the box by Debian.
> 
> I don't think we really want to get into the business of
> building our own cross compilers if we can avoid it...it's harder
> than it looks and we would be essentially reinventing the wheel.

I totally agree.

I'v been looking at existing maintained images we can use to
cross-build, so we only have to pull (download) and image and use it,
not wasting cpu time building it.

However some images might be huge, full of things we don't need. But I
prefer that rather than having to maintain cross toolchains.

An example I like to use is the coreboot-sdk, designed to build
i386/amd64 binaries, it fulfills our needs. But takes 2GB...

$ docker pull coreboot/coreboot-sdk:1.47
1.47: Pulling from coreboot/coreboot-sdk
3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
d23c9a72f1e5: Waiting

Another candidate is crossbuild, ~1GB
$ docker pull multiarch/crossbuild

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-20  2:57         ` Philippe Mathieu-Daudé
@ 2018-04-20  3:08           ` Fam Zheng
  2018-04-20  8:29           ` Alex Bennée
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 93+ messages in thread
From: Fam Zheng @ 2018-04-20  3:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Alex Bennée, Emilio G. Cota,
	Daniel P. Berrange, Richard Henderson, andrzej zaborowski,
	Aurelien Jarno, Alexander Graf, QEMU Developers, Yongbok Kim

On Thu, 04/19 23:57, Philippe Mathieu-Daudé wrote:
> On 04/19/2018 02:58 PM, Peter Maydell wrote:
> > On 19 April 2018 at 18:49, Alex Bennée <alex.bennee@linaro.org> wrote:
> >> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> >>> On 04/19/2018 10:58 AM, Alex Bennée wrote:
> >>>> This doesn't add any additional tests but enables building the
> >>>> multiarch tests for MIPS using docker cross compilers. We don't have a
> >>>> cross compiler for mips64 big endian though.
> >>>
> >>> Oh we have one, using CFLAGS+=-EB
> >>>
> >>> we don't have cross libraries although.
> >>
> >> Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
> >> the libraries that let us down. If, as you say, newlib gets this right I
> >> suspect we should use that to build the compilers not supported out of
> >> the box by Debian.
> > 
> > I don't think we really want to get into the business of
> > building our own cross compilers if we can avoid it...it's harder
> > than it looks and we would be essentially reinventing the wheel.
> 
> I totally agree.
> 
> I'v been looking at existing maintained images we can use to
> cross-build, so we only have to pull (download) and image and use it,
> not wasting cpu time building it.
> 
> However some images might be huge, full of things we don't need. But I
> prefer that rather than having to maintain cross toolchains.
> 
> An example I like to use is the coreboot-sdk, designed to build
> i386/amd64 binaries, it fulfills our needs. But takes 2GB...
> 
> $ docker pull coreboot/coreboot-sdk:1.47
> 1.47: Pulling from coreboot/coreboot-sdk
> 3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
> d23c9a72f1e5: Waiting
> 
> Another candidate is crossbuild, ~1GB
> $ docker pull multiarch/crossbuild

Makes sense to me. It is not insanely big. It might take some time to download
depending on the network but it's more likely a one-off thing compared to
building one from a handcraft dockerfile we make, which probably will involve
even more downloading time and disk usage.

Fam

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (46 preceding siblings ...)
  2018-04-20  2:10 ` Fam Zheng
@ 2018-04-20  3:41 ` Max Filippov
  2018-04-22 20:22 ` Richard Henderson
  48 siblings, 0 replies; 93+ messages in thread
From: Max Filippov @ 2018-04-20  3:41 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Peter Maydell, Emilio G . Cota, Fam Zheng,
	Daniel P. Berrangé, Philippe Mathieu-Daudé,
	Richard Henderson, Andrzej Zaborowski, Aurelien Jarno,
	Alexander Graf, qemu-devel

On Thu, Apr 19, 2018 at 6:58 AM, Alex Bennée <alex.bennee@linaro.org> wrote:
> We still have quite a bit of test code that is not built. These are:
[...]
>   * tests/tcg/xtensa
>   Needs a cross-compiler

FWIW static bare-metal cross-compiler w/o libc for xtensa core
used in test/tcg/xtensa is available here:

https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-xtensa-dc232b-elf.tar.gz

-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-20  0:12 ` Richard Henderson
  2018-04-20  2:32   ` Philippe Mathieu-Daudé
@ 2018-04-20  6:42   ` Alex Bennée
  2018-04-20 19:05     ` Emilio G. Cota
  2018-04-20 22:02     ` Richard Henderson
  1 sibling, 2 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-20  6:42 UTC (permalink / raw)
  To: Richard Henderson
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>> I did start playing with crosstool-ng and Linaro's own ABE scripts but
>> realised this could end up a massive time sync. What would be really
>> helpful is if the respective maintainers could encode their EXACT
>> STEPS for building their cross compilers into some docker recipes.
>
> Building a cross-compiler with an existing libc binary is easy.
> Building a cross-compiler without a libc is harder, and involves
> a bit of two-stepping to get things right.
>
> For someone who has never used docker, what's a recipe look like?
> Just a shell script that gets run within a container?
> Is there an opportunity to wget or local copy an existing libc
> tarball/package to put us into the easy case?

Yes, it's just a bunch of steps run from a known starting state. Our
debian-bootstrap.docker is probably the most complex as there is a seed
step before you enter the container to run the setup steps.

If you already have a built script for your compilers converting it to
docker is fairly trivial.

>
>> Finally the end of the series has me adding Emilio's fp-test to the
>> per-target builds. Unfortunately although some osdep.h and softfloat.c
>> fiddling allows us to build in most cases I still can't build for
>> example an i386 fp-test on an x86_64 host using the cross compiler as
>> it triggers incompatibilities with config-host.h - in this case Int128
>> support. Currently I just hackily disable fp-test for non-64 bit
>> platforms.
>
> It seems I can't even build fp-test for x86_64.
>
>   CROSS-BUILD x86_64 guest-tests with cc
> In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
> /home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
> config-host.h: No such file or directory
>  #include "config-host.h"
>           ^~~~~~~~~~~~~~~
> compilation terminated.

Weird as that works for me. Has configure been run? Are you in a
external build dir?

>
>
> r~


--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)
  2018-04-19 22:02   ` Richard Henderson
@ 2018-04-20  6:43     ` Alex Bennée
  0 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-20  6:43 UTC (permalink / raw)
  To: Richard Henderson
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> On 04/19/2018 03:59 AM, Alex Bennée wrote:
>> +ifneq (,$(findstring 64,$(TARGET_NAME)))
>
> You're only considering aarch64, x86_64, ppc64 and the like.
> This fails for alpha, s390x and the like.

Yes, it's a temporary hack that needs a better solution.

--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test
  2018-04-19 21:32   ` Richard Henderson
@ 2018-04-20  8:18     ` Alex Bennée
  2018-04-20 21:16       ` Richard Henderson
  0 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-20  8:18 UTC (permalink / raw)
  To: Richard Henderson
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>> +test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
>> +test-arm-iwmmxt: test-arm-iwmmxt.S
>
> This appears to be insufficient.
> If I begin with armv7l-linux-gnueabihf-gcc, then I get
>
>   CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
> cc1: error: iWMMXt and NEON are incompatible

Was this with the docker fall-back?

It worked with my local:

07:37:25 [alex@zen:~/l/q/qemu.git] softmmu/demacro-cputlb-rfc + arm-linux-gnueabihf-gcc --version
arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


>
>
>
> r~


--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-20  2:57         ` Philippe Mathieu-Daudé
  2018-04-20  3:08           ` Fam Zheng
@ 2018-04-20  8:29           ` Alex Bennée
  2018-04-20  9:29           ` Alex Bennée
  2018-04-20 11:00           ` Peter Maydell
  3 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-20  8:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Emilio G. Cota, Fam Zheng, Daniel P. Berrange,
	Richard Henderson, andrzej zaborowski, Aurelien Jarno,
	Alexander Graf, QEMU Developers, Yongbok Kim


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 04/19/2018 02:58 PM, Peter Maydell wrote:
>> On 19 April 2018 at 18:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>>> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>>>> On 04/19/2018 10:58 AM, Alex Bennée wrote:
>>>>> This doesn't add any additional tests but enables building the
>>>>> multiarch tests for MIPS using docker cross compilers. We don't have a
>>>>> cross compiler for mips64 big endian though.
>>>>
>>>> Oh we have one, using CFLAGS+=-EB
>>>>
>>>> we don't have cross libraries although.
>>>
>>> Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
>>> the libraries that let us down. If, as you say, newlib gets this right I
>>> suspect we should use that to build the compilers not supported out of
>>> the box by Debian.
>>
>> I don't think we really want to get into the business of
>> building our own cross compilers if we can avoid it...it's harder
>> than it looks and we would be essentially reinventing the wheel.
>
> I totally agree.
>
> I'v been looking at existing maintained images we can use to
> cross-build, so we only have to pull (download) and image and use it,
> not wasting cpu time building it.
>
> However some images might be huge, full of things we don't need. But I
> prefer that rather than having to maintain cross toolchains.
>
> An example I like to use is the coreboot-sdk, designed to build
> i386/amd64 binaries, it fulfills our needs. But takes 2GB...
>
> $ docker pull coreboot/coreboot-sdk:1.47
> 1.47: Pulling from coreboot/coreboot-sdk
> 3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
> d23c9a72f1e5: Waiting
>
> Another candidate is crossbuild, ~1GB
> $ docker pull multiarch/crossbuild

I agree to a point. Our current images are all based off "official"
docker hub images. I'm probably giving the state of officialness too
much credit but I'm at least reasonably certain the Debian images can be
re-created ourselves if we wanted to and have publicly available
recipes.

As a bonus, being Debian based, we meet our GPL compliance because
everything on the image can have its source pulled with apt.

I'm unsure about how the coreboot image was built or indeed if it is an
official image. From my point of view it is just a bunch of binaries in
a set of docker layers.

So personally I would put "build our own compiler from source inside
docker" slightly above "unpack a random binary tarball into docker".
That said with some of our funkier supported guests we may end up having
to do just that :-/

--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-20  2:57         ` Philippe Mathieu-Daudé
  2018-04-20  3:08           ` Fam Zheng
  2018-04-20  8:29           ` Alex Bennée
@ 2018-04-20  9:29           ` Alex Bennée
  2018-04-20 11:00           ` Peter Maydell
  3 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-20  9:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Emilio G. Cota, Fam Zheng, Daniel P. Berrange,
	Richard Henderson, andrzej zaborowski, Aurelien Jarno,
	Alexander Graf, QEMU Developers, Yongbok Kim


Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 04/19/2018 02:58 PM, Peter Maydell wrote:
>> On 19 April 2018 at 18:49, Alex Bennée <alex.bennee@linaro.org> wrote:
>>> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>>>> On 04/19/2018 10:58 AM, Alex Bennée wrote:
>>>>> This doesn't add any additional tests but enables building the
>>>>> multiarch tests for MIPS using docker cross compilers. We don't have a
>>>>> cross compiler for mips64 big endian though.
>>>>
>>>> Oh we have one, using CFLAGS+=-EB
>>>>
>>>> we don't have cross libraries although.
>>>
>>> Yeah I thought the same with the ARM compilers (-mbig-endian) but it's
>>> the libraries that let us down. If, as you say, newlib gets this right I
>>> suspect we should use that to build the compilers not supported out of
>>> the box by Debian.
>>
>> I don't think we really want to get into the business of
>> building our own cross compilers if we can avoid it...it's harder
>> than it looks and we would be essentially reinventing the wheel.
>
> I totally agree.
>
> I'v been looking at existing maintained images we can use to
> cross-build, so we only have to pull (download) and image and use it,
> not wasting cpu time building it.
>
> However some images might be huge, full of things we don't need. But I
> prefer that rather than having to maintain cross toolchains.
>
> An example I like to use is the coreboot-sdk, designed to build
> i386/amd64 binaries, it fulfills our needs. But takes 2GB...
>
> $ docker pull coreboot/coreboot-sdk:1.47
> 1.47: Pulling from coreboot/coreboot-sdk
> 3d6aedfc3e47: Downloading [>              ]  538.2kB/1.201GB
> d23c9a72f1e5: Waiting

Found the dockerfile:

https://github.com/MattDevo/coreboot/blob/master/util/docker/coreboot-sdk/Dockerfile

>
> Another candidate is crossbuild, ~1GB
> $ docker pull multiarch/crossbuild

This looks like it is just a multiarch debian setup much like our own.

--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-20  2:57         ` Philippe Mathieu-Daudé
                             ` (2 preceding siblings ...)
  2018-04-20  9:29           ` Alex Bennée
@ 2018-04-20 11:00           ` Peter Maydell
  2018-04-20 11:57             ` Alex Bennée
  3 siblings, 1 reply; 93+ messages in thread
From: Peter Maydell @ 2018-04-20 11:00 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Alex Bennée, Emilio G. Cota, Fam Zheng, Daniel P. Berrange,
	Richard Henderson, andrzej zaborowski, Aurelien Jarno,
	Alexander Graf, QEMU Developers, Yongbok Kim

On 20 April 2018 at 03:57, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 04/19/2018 02:58 PM, Peter Maydell wrote:
>> I don't think we really want to get into the business of
>> building our own cross compilers if we can avoid it...it's harder
>> than it looks and we would be essentially reinventing the wheel.
>
> I totally agree.
>
> I'v been looking at existing maintained images we can use to
> cross-build, so we only have to pull (download) and image and use it,
> not wasting cpu time building it.

Projects that are in the "maintain cross toolchains" business:
 * buildroot
 * https://github.com/richfelker/musl-cross-make

But really my feeling is that we should for the moment stick
to getting a reliable test setup for the architectures that
Debian does provide cross toolchains for. That will give us:
 * much more coverage than we have at the moment
 * coverage for the guests that people actually care about

We can always come back and think about filling in the gaps later.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS
  2018-04-20 11:00           ` Peter Maydell
@ 2018-04-20 11:57             ` Alex Bennée
  0 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-20 11:57 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Philippe Mathieu-Daudé,
	Emilio G. Cota, Fam Zheng, Daniel P. Berrange, Richard Henderson,
	andrzej zaborowski, Aurelien Jarno, Alexander Graf,
	QEMU Developers, Yongbok Kim


Peter Maydell <peter.maydell@linaro.org> writes:

> On 20 April 2018 at 03:57, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> On 04/19/2018 02:58 PM, Peter Maydell wrote:
>>> I don't think we really want to get into the business of
>>> building our own cross compilers if we can avoid it...it's harder
>>> than it looks and we would be essentially reinventing the wheel.
>>
>> I totally agree.
>>
>> I'v been looking at existing maintained images we can use to
>> cross-build, so we only have to pull (download) and image and use it,
>> not wasting cpu time building it.
>
> Projects that are in the "maintain cross toolchains" business:
>  * buildroot
>  * https://github.com/richfelker/musl-cross-make

I'll have a look at those. My previous attempts were using:

  https://wiki.linaro.org/ABE
  https://crosstool-ng.github.io/

I certainly don't want to be in the business of inventing yet another
set of scripts to build cross compilers!

>
> But really my feeling is that we should for the moment stick
> to getting a reliable test setup for the architectures that
> Debian does provide cross toolchains for. That will give us:
>  * much more coverage than we have at the moment
>  * coverage for the guests that people actually care about
>
> We can always come back and think about filling in the gaps later.

Don't worry - not having every single architecture done isn't going to
stop the eventual submission. However it would be nice to have at least
one non-Debian cross-compiler setup as an example and to validate the
compiler-in-docker approach.

>
> thanks
> -- PMM


--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-20  6:42   ` Alex Bennée
@ 2018-04-20 19:05     ` Emilio G. Cota
  2018-04-20 22:02     ` Richard Henderson
  1 sibling, 0 replies; 93+ messages in thread
From: Emilio G. Cota @ 2018-04-20 19:05 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Richard Henderson, peter.maydell, famz, berrange, f4bug, balrogg,
	aurelien, agraf, qemu-devel

On Fri, Apr 20, 2018 at 07:42:14 +0100, Alex Bennée wrote:
> 
> Richard Henderson <richard.henderson@linaro.org> writes:
(snip)
> >> Finally the end of the series has me adding Emilio's fp-test to the
> >> per-target builds. Unfortunately although some osdep.h and softfloat.c
> >> fiddling allows us to build in most cases I still can't build for
> >> example an i386 fp-test on an x86_64 host using the cross compiler as
> >> it triggers incompatibilities with config-host.h - in this case Int128
> >> support. Currently I just hackily disable fp-test for non-64 bit
> >> platforms.
> >
> > It seems I can't even build fp-test for x86_64.
> >
> >   CROSS-BUILD x86_64 guest-tests with cc
> > In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
> > /home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
> > config-host.h: No such file or directory
> >  #include "config-host.h"
> >           ^~~~~~~~~~~~~~~
> > compilation terminated.
> 
> Weird as that works for me. Has configure been run? Are you in a
> external build dir?

config-host.h is generated when running "make" (to build whatever
targets were configured), so the recipe in tests/fp expects that
to have happened. I think this is commonly expected when building
tests/, but if I'm mistaken we could fix it by adding a rule
for config-host.h as a prerequisite.

		E.

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test
  2018-04-20  8:18     ` Alex Bennée
@ 2018-04-20 21:16       ` Richard Henderson
  0 siblings, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-20 21:16 UTC (permalink / raw)
  To: Alex Bennée
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel

On 04/19/2018 10:18 PM, Alex Bennée wrote:
> 
> Richard Henderson <richard.henderson@linaro.org> writes:
> 
>> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>>> +test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs
>>> +test-arm-iwmmxt: test-arm-iwmmxt.S
>>
>> This appears to be insufficient.
>> If I begin with armv7l-linux-gnueabihf-gcc, then I get
>>
>>   CROSS-BUILD arm guest-tests with armv7l-linux-gnueabihf-gcc
>> cc1: error: iWMMXt and NEON are incompatible
> 
> Was this with the docker fall-back?

No, apparently my docker install is "sudo", and so is unused.

> It worked with my local:
> 
> 07:37:25 [alex@zen:~/l/q/qemu.git] softmmu/demacro-cputlb-rfc + arm-linux-gnueabihf-gcc --version
> arm-linux-gnueabihf-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

My arm cross is self-built, with configure options mirroring a native fedora
arm gcc:

Target: armv7l-linux-gnueabihf
Configured with: ../comb/configure --with-sysroot
--prefix=/home/rth/work/gcc/run-cross --enable-languages=c,c++,lto
--target=armv7l-linux-gnueabihf --with-system-zlib --enable-__cxa_atexit
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-initfini-array --with-cpu=cortex-a15
--with-float=hard --with-fpu=neon-vfpv4 --with-abi=aapcs-linux
Thread model: posix
gcc version 7.0.0 20161220 (experimental) [master revision
f7619de:63fb493:269ead384b0fdd3dd4f7030be44e54e5a19c4e8c] (GCC)


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-20  6:42   ` Alex Bennée
  2018-04-20 19:05     ` Emilio G. Cota
@ 2018-04-20 22:02     ` Richard Henderson
  1 sibling, 0 replies; 93+ messages in thread
From: Richard Henderson @ 2018-04-20 22:02 UTC (permalink / raw)
  To: Alex Bennée
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel

On 04/19/2018 08:42 PM, Alex Bennée wrote:
>> It seems I can't even build fp-test for x86_64.
>>
>>   CROSS-BUILD x86_64 guest-tests with cc
>> In file included from /home/rth/work/qemu/qemu/tests/fp/fp-test.c:14:0:
>> /home/rth/work/qemu/qemu/include/qemu/osdep.h:30:10: fatal error:
>> config-host.h: No such file or directory
>>  #include "config-host.h"
>>           ^~~~~~~~~~~~~~~
>> compilation terminated.
> 
> Weird as that works for me. Has configure been run? Are you in a
> external build dir?

Yes to both -- configure and build completed in an external build dir.


r~

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
                   ` (47 preceding siblings ...)
  2018-04-20  3:41 ` Max Filippov
@ 2018-04-22 20:22 ` Richard Henderson
  2018-04-23 12:53   ` Alex Bennée
  48 siblings, 1 reply; 93+ messages in thread
From: Richard Henderson @ 2018-04-22 20:22 UTC (permalink / raw)
  To: Alex Bennée, peter.maydell, cota, famz, berrange, f4bug,
	balrogg, aurelien, agraf
  Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

On 04/19/2018 03:58 AM, Alex Bennée wrote:
> What would be really
> helpful is if the respective maintainers could encode their EXACT
> STEPS for building their cross compilers into some docker recipes.

I've just re-built my alphaev67 cross-environment and recorded everything.

Since the script begins with rebuilding glibc, it assumes you *already* have a
cross-compiler.  If you don't have that, then you start in the middle of the
script with the GCC build.  But in that case you must have the sysroot.tar.gz
that the first half just created.

Starting without that seed tarball is hard, as previously mentioned.  For
better supported platforms than alpha you can typically pull the same files
from e.g. debian packages or a gentoo stage3 tarball.

While I've used git gcc/binutils/glibc, because I had them handy, of course
everything would work equally well using release tarballs for each project.

Let me know if you have any questions re cross-tools.


r~

[-- Attachment #2: cross.sh --]
[-- Type: application/x-shellscript, Size: 1213 bytes --]

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-22 20:22 ` Richard Henderson
@ 2018-04-23 12:53   ` Alex Bennée
  2018-04-23 14:26     ` Alex Bennée
  0 siblings, 1 reply; 93+ messages in thread
From: Alex Bennée @ 2018-04-23 12:53 UTC (permalink / raw)
  To: Richard Henderson
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>> What would be really
>> helpful is if the respective maintainers could encode their EXACT
>> STEPS for building their cross compilers into some docker recipes.
>
> I've just re-built my alphaev67 cross-environment and recorded everything.
>
> Since the script begins with rebuilding glibc, it assumes you *already* have a
> cross-compiler.  If you don't have that, then you start in the middle of the
> script with the GCC build.  But in that case you must have the sysroot.tar.gz
> that the first half just created.

Could you send me the sysroot.tar.gz?

>
> Starting without that seed tarball is hard, as previously mentioned.  For
> better supported platforms than alpha you can typically pull the same files
> from e.g. debian packages or a gentoo stage3 tarball.

Hmm I was hoping I could use --without-sysroot to build a gcc just for
building glibc and then re-build gcc once glibc was boot-strapped. But
that doesn't seem to work...

Maybe for alpha we just have to accept there is a blob of sysroot to get
the build going? Of course we should probably host that blob on qemu's
servers somewhere...

> While I've used git gcc/binutils/glibc, because I had them handy, of course
> everything would work equally well using release tarballs for each project.
>
> Let me know if you have any questions re cross-tools.
>
>
> r~


--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

* Re: [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg
  2018-04-23 12:53   ` Alex Bennée
@ 2018-04-23 14:26     ` Alex Bennée
  0 siblings, 0 replies; 93+ messages in thread
From: Alex Bennée @ 2018-04-23 14:26 UTC (permalink / raw)
  To: Richard Henderson
  Cc: peter.maydell, cota, famz, berrange, f4bug, balrogg, aurelien,
	agraf, qemu-devel


Alex Bennée <alex.bennee@linaro.org> writes:

> Richard Henderson <richard.henderson@linaro.org> writes:
>
>> On 04/19/2018 03:58 AM, Alex Bennée wrote:
>>> What would be really
>>> helpful is if the respective maintainers could encode their EXACT
>>> STEPS for building their cross compilers into some docker recipes.
>>
>> I've just re-built my alphaev67 cross-environment and recorded everything.
<snip>
>> Starting without that seed tarball is hard, as previously mentioned.  For
>> better supported platforms than alpha you can typically pull the same files
>> from e.g. debian packages or a gentoo stage3 tarball.
>
> Hmm I was hoping I could use --without-sysroot to build a gcc just for
> building glibc and then re-build gcc once glibc was boot-strapped. But
> that doesn't seem to work...
>
> Maybe for alpha we just have to accept there is a blob of sysroot to get
> the build going? Of course we should probably host that blob on qemu's
> servers somewhere...

New plan - Debian Sid has gcc-alpha-linux-gnu on account of the
unofficial Debian Alpha port.

--
Alex Bennée

^ permalink raw reply	[flat|nested] 93+ messages in thread

end of thread, other threads:[~2018-04-23 14:26 UTC | newest]

Thread overview: 93+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-19 13:58 [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure Alex Bennée
2018-04-20  2:08   ` Fam Zheng
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability Alex Bennée
2018-04-19 20:49   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO Alex Bennée
2018-04-19 20:20   ` Richard Henderson
2018-04-19 20:41   ` Richard Henderson
2018-04-19 20:47     ` Richard Henderson
2018-04-19 21:36       ` Eric Blake
2018-04-19 21:41   ` Eric Blake
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386 Alex Bennée
2018-04-19 20:59   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo= Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler Alex Bennée
2018-04-19 21:04   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST Alex Bennée
2018-04-19 21:05   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler Alex Bennée
2018-04-20  2:06   ` Fam Zheng
2018-04-20  2:43   ` Philippe Mathieu-Daudé
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT Alex Bennée
2018-04-19 21:08   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir Alex Bennée
2018-04-19 21:20   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test Alex Bennée
2018-04-19 21:20   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests Alex Bennée
2018-04-19 21:22   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 15/43] tests/tcg: move i386 specific tests into subdir Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386 Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386 Alex Bennée
2018-04-19 21:25   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386 Alex Bennée
2018-04-19 21:26   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 20/43] tests/tcg/i386: fix test-i386-fprem Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes Alex Bennée
2018-04-19 21:27   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format Alex Bennée
2018-04-19 21:28   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir Alex Bennée
2018-04-19 21:29   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test Alex Bennée
2018-04-19 21:32   ` Richard Henderson
2018-04-20  8:18     ` Alex Bennée
2018-04-20 21:16       ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64 Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS Alex Bennée
2018-04-19 17:05   ` Philippe Mathieu-Daudé
2018-04-19 17:49     ` Alex Bennée
2018-04-19 17:58       ` Peter Maydell
2018-04-20  2:57         ` Philippe Mathieu-Daudé
2018-04-20  3:08           ` Fam Zheng
2018-04-20  8:29           ` Alex Bennée
2018-04-20  9:29           ` Alex Bennée
2018-04-20 11:00           ` Peter Maydell
2018-04-20 11:57             ` Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 32/43] tests/tcg/mips: include common mips hello-mips Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64 Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB Alex Bennée
2018-04-19 21:41   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers Alex Bennée
2018-04-19 21:41   ` Richard Henderson
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite Alex Bennée
2018-04-19 13:58 ` [Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set Alex Bennée
2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!) Alex Bennée
2018-04-19 22:02   ` Richard Henderson
2018-04-20  6:43     ` Alex Bennée
2018-04-19 13:59 ` [Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP) Alex Bennée
2018-04-19 14:52 ` [Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg no-reply
2018-04-19 15:02 ` no-reply
2018-04-20  0:12 ` Richard Henderson
2018-04-20  2:32   ` Philippe Mathieu-Daudé
2018-04-20  6:42   ` Alex Bennée
2018-04-20 19:05     ` Emilio G. Cota
2018-04-20 22:02     ` Richard Henderson
2018-04-20  2:10 ` Fam Zheng
2018-04-20  3:41 ` Max Filippov
2018-04-22 20:22 ` Richard Henderson
2018-04-23 12:53   ` Alex Bennée
2018-04-23 14:26     ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.