qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7537c2: softfloat: silence sNaN for conversio


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7537c2: softfloat: silence sNaN for conversions to/from fl...
Date: Fri, 15 May 2020 14:45:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7537c2b4a363237534c96d089a02b0712b49d890
      
https://github.com/qemu/qemu/commit/7537c2b4a363237534c96d089a02b0712b49d890
  Author: Joseph Myers <address@hidden>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M fpu/softfloat.c
    A tests/tcg/i386/test-i386-snan-convert.c

  Log Message:
  -----------
  softfloat: silence sNaN for conversions to/from floatx80

Conversions between IEEE floating-point formats should convert
signaling NaNs to quiet NaNs.  Most of those in QEMU's softfloat code
do so, but those for floatx80 fail to.  Fix those conversions to
silence signaling NaNs as well.

Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 41602807766e253ccb6fb761f3ff12767f786e2c
      
https://github.com/qemu/qemu/commit/41602807766e253ccb6fb761f3ff12767f786e2c
  Author: Joseph Myers <address@hidden>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M fpu/softfloat.c
    A tests/tcg/i386/test-i386-pseudo-denormal.c

  Log Message:
  -----------
  softfloat: fix floatx80 pseudo-denormal addition / subtraction

The softfloat function addFloatx80Sigs, used for addition of values
with the same sign and subtraction of values with opposite sign, fails
to handle the case where the two values both have biased exponent zero
and there is a carry resulting from adding the significands, which can
occur if one or both values are pseudo-denormals (biased exponent
zero, explicit integer bit 1).  Add a check for that case, so making
the results match those seen on x86 hardware for pseudo-denormals.

Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: be53fa785ab766d2722628403edee75b3e6ab599
      
https://github.com/qemu/qemu/commit/be53fa785ab766d2722628403edee75b3e6ab599
  Author: Joseph Myers <address@hidden>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M fpu/softfloat.c
    M tests/tcg/i386/test-i386-pseudo-denormal.c

  Log Message:
  -----------
  softfloat: fix floatx80 pseudo-denormal comparisons

The softfloat floatx80 comparisons fail to allow for pseudo-denormals,
which should compare equal to corresponding values with biased
exponent 1 rather than 0.  Add an adjustment for that case when
comparing numbers with the same sign.

Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: 9ecaf5ccec13ff2e8fe1e72f6e0f3367d2169c1c
      
https://github.com/qemu/qemu/commit/9ecaf5ccec13ff2e8fe1e72f6e0f3367d2169c1c
  Author: Joseph Myers <address@hidden>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M fpu/softfloat.c
    M tests/tcg/i386/test-i386-pseudo-denormal.c

  Log Message:
  -----------
  softfloat: fix floatx80 pseudo-denormal round to integer

The softfloat function floatx80_round_to_int incorrectly handles the
case of a pseudo-denormal where only the high bit of the significand
is set, ignoring that bit (treating the number as an exact zero)
rather than treating the number as an alternative representation of
+/- 2^-16382 (which may round to +/- 1 depending on the rounding mode)
as hardware does.  Fix this check (simplifying the code in the
process).

Signed-off-by: Joseph Myers <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>


  Commit: debe78ce14bf8f8940c2bdf3ef387505e9e035a9
      
https://github.com/qemu/qemu/commit/debe78ce14bf8f8940c2bdf3ef387505e9e035a9
  Author: Peter Maydell <address@hidden>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M fpu/softfloat.c
    A tests/tcg/i386/test-i386-pseudo-denormal.c
    A tests/tcg/i386/test-i386-snan-convert.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/rth/tags/pull-fpu-20200515' into staging

floatx80 x87 pseudo-denormal fixes

# gpg: Signature made Fri 15 May 2020 19:10:27 BST
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Richard Henderson <address@hidden>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-fpu-20200515:
  softfloat: fix floatx80 pseudo-denormal round to integer
  softfloat: fix floatx80 pseudo-denormal comparisons
  softfloat: fix floatx80 pseudo-denormal addition / subtraction
  softfloat: silence sNaN for conversions to/from floatx80

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/66706192de11...debe78ce14bf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]