提交 adb3321b 编写于 作者: P Peter Maydell

Merge remote-tracking branch...

Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-fpu-fixes-250319-1' into staging

Mix of testing & fpu fixes

  - more splitting of Travis matric to avoid timeouts
  - Fused Multiply-Add fixes for MIPS and hardfloat
  - cleanups to docker travis emulation

# gpg: Signature made Mon 25 Mar 2019 10:44:44 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-testing-and-fpu-fixes-250319-1:
  docker: trivial changes to `make docker` help
  docker: Fix travis script unable to find source dir
  docker: Fix travis.py parser and misc change
  hardfloat: fix float32/64 fused multiply-add
  target/mips: Fix minor bug in FPU
  .travis.yml: reduce number of targets built while disabling things
  .travis.yml: --disable-user for --without-default-devices
  .travis.yml: split some more system builds
  configure: add --target-list-exclude
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
......@@ -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
......
......@@ -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]
......
......@@ -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;
......
......@@ -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;
}
}
......
......@@ -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)'
......
......@@ -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
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册