summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-05-14 19:38:41 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-05-14 19:38:41 +0100
commitc691c8761616cff9c58caf345bfa7ae450e00088 (patch)
tree3c8441b96aeb1f4d589d1a2360695cb0301344b8
parentfbd3a489df9953e2a5d017c922f3c103b2426952 (diff)
parent5a73e7f313da0e4657bcac61b533ced71b0d0224 (diff)
downloadfocaccia-qemu-c691c8761616cff9c58caf345bfa7ae450e00088.tar.gz
focaccia-qemu-c691c8761616cff9c58caf345bfa7ae450e00088.zip
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.13-pull-request' into staging
# gpg: Signature made Mon 14 May 2018 19:02:18 BST
# gpg:                using RSA key F30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/m68k-for-2.13-pull-request:
  m68k: fix floatx80_mod() (Coverity CID1390568)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/m68k/softfloat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/m68k/softfloat.c b/target/m68k/softfloat.c
index e41b07d042..d093997219 100644
--- a/target/m68k/softfloat.c
+++ b/target/m68k/softfloat.c
@@ -103,6 +103,7 @@ floatx80 floatx80_mod(floatx80 a, floatx80 b, float_status *status)
         mul64To128(bSig, qTemp, &term0, &term1);
         sub128(aSig0, aSig1, term0, term1, &aSig0, &aSig1);
         shortShift128Left(aSig0, aSig1, 62, &aSig0, &aSig1);
+        expDiff -= 62;
     }
     expDiff += 64;
     if (0 < expDiff) {