diff --git a/.travis.yml b/.travis.yml index 980fc5c1ebd7599b3c04893ed20f63cf37a0bba5..2e06aee9d05041775e7414b4b084084692d4bc79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,8 @@ env: - BUILD_DIR="." - BASE_CONFIG="--disable-docs --disable-tools" - TEST_CMD="make check -j3 V=1" - + # This is broadly a list of "mainline" softmmu targets which have support across the major distros + - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" git: # we want to do this ourselves @@ -81,8 +82,13 @@ matrix: - CONFIG="--disable-system" + # we split the system builds as it takes a while to build them all + - env: + - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}" + + - env: - - CONFIG="--disable-user" + - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" # Just build tools and run minimal unit and softfloat checks @@ -101,12 +107,12 @@ matrix: - env: - - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-user --disable-replication" + - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}" # Module builds are mostly of interest to major distros - env: - - CONFIG="--enable-modules --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}" # Alternate coroutines implementations are only really of interest to KVM users @@ -141,20 +147,25 @@ matrix: - env: - - CONFIG="--disable-user" + - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}" + compiler: clang + + + - env: + - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" compiler: clang # gprof/gcov are GCC features - env: - - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}" after_success: - ${SRC_DIR}/scripts/travis/coverage-summary.sh # We manually include builds which we disable "make check" for - env: - - CONFIG="--without-default-devices" + - CONFIG="--without-default-devices --disable-user" - TEST_CMD="" @@ -182,7 +193,7 @@ matrix: # MacOSX builds - env: - - CONFIG="--target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu" + - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}" os: osx osx_image: xcode9.4 compiler: clang diff --git a/configure b/configure index c5032425e6d31a4dd8029428f27cd49e5804368f..1c563a70276aaa143c9f8e2d61642a0b02db571d 100755 --- a/configure +++ b/configure @@ -327,6 +327,7 @@ git="git" # Don't accept a target_list environment variable. unset target_list +unset target_list_exclude # Default value for a variable defining feature "foo". # * foo="no" feature will only be used if --enable-foo arg is given @@ -990,6 +991,14 @@ for opt do --cpu=*) ;; --target-list=*) target_list="$optarg" + if test "$target_list_exclude"; then + error_exit "Can't mix --target-list with --target-list-exclude" + fi + ;; + --target-list-exclude=*) target_list_exclude="$optarg" + if test "$target_list"; then + error_exit "Can't mix --target-list-exclude with --target-list" + fi ;; --enable-trace-backends=*) trace_backends="$optarg" ;; @@ -1601,9 +1610,26 @@ if [ "$bsd_user" = "yes" ]; then mak_wilds="${mak_wilds} $source_path/default-configs/*-bsd-user.mak" fi -for config in $mak_wilds; do - default_target_list="${default_target_list} $(basename "$config" .mak)" -done +if test -z "$target_list_exclude"; then + for config in $mak_wilds; do + default_target_list="${default_target_list} $(basename "$config" .mak)" + done +else + exclude_list=$(echo "$target_list_exclude" | sed -e 's/,/ /g') + for config in $mak_wilds; do + target="$(basename "$config" .mak)" + exclude="no" + for excl in $exclude_list; do + if test "$excl" = "$target"; then + exclude="yes" + break; + fi + done + if test "$exclude" = "no"; then + default_target_list="${default_target_list} $target" + fi + done +fi # Enumerate public trace backends for --help output trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' "$source_path"/scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/')) @@ -1622,6 +1648,7 @@ Standard options: --target-list=LIST set target list (default: build everything) $(echo Available targets: $default_target_list | \ fold -s -w 53 | sed -e 's/^/ /') + --target-list-exclude=LIST exclude a set of targets from the default target-list Advanced options (experts only): --source-path=PATH path of source code [$source_path] diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 16c0bcb6fada8ca8ecc1a914a231279241985993..7b8895726c5b99d92b5f1a47d0b9834cbb9805f6 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -495,15 +495,15 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls, return 1; } #elif defined(TARGET_MIPS) - /* For MIPS, the (inf,zero,qnan) case sets InvalidOp and returns - * the default NaN - */ - if (infzero) { - float_raise(float_flag_invalid, status); - return 3; - } - if (snan_bit_is_one(status)) { + /* + * For MIPS systems that conform to IEEE754-1985, the (inf,zero,nan) + * case sets InvalidOp and returns the default NaN + */ + if (infzero) { + float_raise(float_flag_invalid, status); + return 3; + } /* Prefer sNaN over qNaN, in the a, b, c order. */ if (is_snan(a_cls)) { return 0; @@ -519,6 +519,14 @@ static int pickNaNMulAdd(FloatClass a_cls, FloatClass b_cls, FloatClass c_cls, return 2; } } else { + /* + * For MIPS systems that conform to IEEE754-2008, the (inf,zero,nan) + * case sets InvalidOp and returns the input value 'c' + */ + if (infzero) { + float_raise(float_flag_invalid, status); + return 2; + } /* Prefer sNaN over qNaN, in the c, a, b order. */ if (is_snan(c_cls)) { return 2; diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 4610738ab15e1c02d25ffa8c398e44eb9a10544d..2ba36ec3703361d2bbcf76cbbc06dd22219df4b0 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1596,6 +1596,9 @@ float32_muladd(float32 xa, float32 xb, float32 xc, int flags, float_status *s) } ur.h = up.h + uc.h; } else { + union_float32 ua_orig = ua; + union_float32 uc_orig = uc; + if (flags & float_muladd_negate_product) { ua.h = -ua.h; } @@ -1608,6 +1611,8 @@ float32_muladd(float32 xa, float32 xb, float32 xc, int flags, float_status *s) if (unlikely(f32_is_inf(ur))) { s->float_exception_flags |= float_flag_overflow; } else if (unlikely(fabsf(ur.h) <= FLT_MIN)) { + ua = ua_orig; + uc = uc_orig; goto soft; } } @@ -1662,6 +1667,9 @@ float64_muladd(float64 xa, float64 xb, float64 xc, int flags, float_status *s) } ur.h = up.h + uc.h; } else { + union_float64 ua_orig = ua; + union_float64 uc_orig = uc; + if (flags & float_muladd_negate_product) { ua.h = -ua.h; } @@ -1674,6 +1682,8 @@ float64_muladd(float64 xa, float64 xb, float64 xc, int flags, float_status *s) if (unlikely(f64_is_inf(ur))) { s->float_exception_flags |= float_flag_overflow; } else if (unlikely(fabs(ur.h) <= FLT_MIN)) { + ua = ua_orig; + uc = uc_orig; goto soft; } } diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 60314d293af46d0191cea1ebfb1bb9c0a4a1dd15..c0e1bf57a37a3c0c0164a5b0d34f5c459d2f207c 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -151,15 +151,15 @@ docker: @echo @echo ' docker: Print this help.' @echo ' docker-all-tests: Run all image/test combinations.' - @echo ' docker-TEST: Run TEST on all image combinations.' + @echo ' docker-TEST: Run "TEST" on all image combinations.' @echo ' docker-clean: Kill and remove residual docker testing containers.' @echo ' docker-TEST@IMAGE: Run "TEST" in container "IMAGE".' @echo ' Note: "TEST" is one of the listed test name,' @echo ' or a script name under $$QEMU_SRC/tests/docker/;' - @echo ' "IMAGE" is one of the listed container name."' + @echo ' "IMAGE" is one of the listed container name.' @echo ' docker-image: Build all images.' @echo ' docker-image-IMAGE: Build image "IMAGE".' - @echo ' docker-run: For manually running a "TEST" with "IMAGE"' + @echo ' docker-run: For manually running a "TEST" with "IMAGE".' @echo @echo 'Available container images:' @echo ' $(DOCKER_IMAGES)' diff --git a/tests/docker/travis b/tests/docker/travis index d345393ced8318e10db225b9a29f94caa813f915..47c03677d64c4a0748e415602c79aae5987a30ff 100755 --- a/tests/docker/travis +++ b/tests/docker/travis @@ -18,4 +18,5 @@ cmdfile=/tmp/travis_cmd_list.sh $QEMU_SRC/tests/docker/travis.py $QEMU_SRC/.travis.yml > $cmdfile chmod +x $cmdfile cd "$QEMU_SRC" +unset BUILD_DIR SRC_DIR $cmdfile diff --git a/tests/docker/travis.py b/tests/docker/travis.py index ea1ef169e6ea7326998fa925c176044445a6beb8..e1433012bddfb789973c5b8b2e68aa66c0123e9c 100755 --- a/tests/docker/travis.py +++ b/tests/docker/travis.py @@ -17,18 +17,17 @@ import itertools def load_yaml(fname): - return yaml.load(open(fname, "r").read()) + return yaml.safe_load(open(fname, "r").read()) def conf_iter(conf): + # If "compiler" is omitted from the included env then Travis picks the + # first entry of the global compiler list. + default_compiler = conf["compiler"][0] def env_to_list(env): return env if isinstance(env, list) else [env] for entry in conf["matrix"]["include"]: yield {"env": env_to_list(entry["env"]), - "compiler": entry["compiler"]} - for entry in itertools.product(conf["compiler"], - conf["env"]["matrix"]): - yield {"env": env_to_list(entry[1]), - "compiler": entry[0]} + "compiler": entry.get("compiler", default_compiler)} def main(): if len(sys.argv) < 2: