diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2018-05-15 15:07:34 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2018-05-15 15:07:34 +0100 |
| commit | 0275e6b66c0947f83ad0d8dd687eadbcbf0c5ec5 (patch) | |
| tree | c68f377430d1a11d50bf05d62c494c7cc0ff47a7 /fpu/softfloat.c | |
| parent | ad1b4ec39caa5b3f17cbd8160283a03a3dcfe2ae (diff) | |
| parent | ae7651804748c6b479d5ae09aeac4edb9c44f76e (diff) | |
| download | focaccia-qemu-0275e6b66c0947f83ad0d8dd687eadbcbf0c5ec5.tar.gz focaccia-qemu-0275e6b66c0947f83ad0d8dd687eadbcbf0c5ec5.zip | |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180515' into staging
target-arm queue: * Fix coverity nit in int_to_float code * Don't set Invalid for float-to-int(MAXINT) * Fix fp_status_f16 tininess before rounding * Add various missing insns from the v8.2-FP16 extension * Fix sqrt_f16 exception raising * sdcard: Correct CRC16 offset in sd_function_switch() * tcg: Optionally log FPU state in TCG -d cpu logging # gpg: Signature made Tue 15 May 2018 15:06:09 BST # gpg: using RSA key 3C2525ED14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20180515: tcg: Optionally log FPU state in TCG -d cpu logging sdcard: Correct CRC16 offset in sd_function_switch() target/arm: Fix sqrt_f16 exception raising target/arm: Implement FMOV (immediate) for fp16 target/arm: Implement FCSEL for fp16 target/arm: Implement FCMP for fp16 target/arm: Implement FP data-processing (3 source) for fp16 target/arm: Implement FP data-processing (2 source) for fp16 target/arm: Introduce and use read_fp_hreg target/arm: Implement FCVT (scalar, fixed-point) for fp16 target/arm: Implement FCVT (scalar, integer) for fp16 target/arm: Early exit after unallocated_encoding in disas_fp_int_conv target/arm: Implement FMOV (general) for fp16 target/arm: Fix fp_status_f16 tininess before rounding fpu/softfloat: Don't set Invalid for float-to-int(MAXINT) fpu/softfloat: int_to_float ensure r fully initialised Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'fpu/softfloat.c')
| -rw-r--r-- | fpu/softfloat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 8401b37bd4..bc0f52fa54 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -1368,14 +1368,14 @@ static int64_t round_to_int_and_pack(FloatParts in, int rmode, r = UINT64_MAX; } if (p.sign) { - if (r < -(uint64_t) min) { + if (r <= -(uint64_t) min) { return -r; } else { s->float_exception_flags = orig_flags | float_flag_invalid; return min; } } else { - if (r < max) { + if (r <= max) { return r; } else { s->float_exception_flags = orig_flags | float_flag_invalid; @@ -1525,7 +1525,7 @@ FLOAT_TO_UINT(64, 64) static FloatParts int_to_float(int64_t a, float_status *status) { - FloatParts r; + FloatParts r = {}; if (a == 0) { r.cls = float_class_zero; r.sign = false; |