]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-311019-1' into...
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 31 Oct 2019 10:07:54 +0000 (10:07 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 31 Oct 2019 10:07:54 +0000 (10:07 +0000)
Fixes to get CI green again

  - fix m68k acceptance tests (Cleber)
  - stop build breakage (Daniel)

# gpg: Signature made Thu 31 Oct 2019 10:00:53 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-next-311019-1:
  Acceptance test: update kernel for m68k/q800 test
  Acceptance test: cancel test if m68k kernel packages goes missing
  tests: fix conditional for disabling XTS test

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
fpu/softfloat.c

index 0638c9f4e0304309c235489acdb2c69fd33cb482..301ce3b537b6c0eee5dbbc358587b66a3a341d2a 100644 (file)
@@ -1920,13 +1920,30 @@ float16 float32_to_float16(float32 a, bool ieee, float_status *s)
     return float16a_round_pack_canonical(pr, s, fmt16);
 }
 
-float64 float32_to_float64(float32 a, float_status *s)
+static float64 QEMU_SOFTFLOAT_ATTR
+soft_float32_to_float64(float32 a, float_status *s)
 {
     FloatParts p = float32_unpack_canonical(a, s);
     FloatParts pr = float_to_float(p, &float64_params, s);
     return float64_round_pack_canonical(pr, s);
 }
 
+float64 float32_to_float64(float32 a, float_status *s)
+{
+    if (likely(float32_is_normal(a))) {
+        /* Widening conversion can never produce inexact results.  */
+        union_float32 uf;
+        union_float64 ud;
+        uf.s = a;
+        ud.h = uf.h;
+        return ud.s;
+    } else if (float32_is_zero(a)) {
+        return float64_set_sign(float64_zero, float32_is_neg(a));
+    } else {
+        return soft_float32_to_float64(a, s);
+    }
+}
+
 float16 float64_to_float16(float64 a, bool ieee, float_status *s)
 {
     const FloatFmt *fmt16 = ieee ? &float16_params : &float16_params_ahp;