summaryrefslogtreecommitdiff
path: root/fpu
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-04-26 00:15:53 +0200
committerBlue Swirl <blauwirbel@gmail.com>2012-04-28 09:12:24 +0000
commitc9696547d4b2d4da9e27d87a56f246d0c6551b96 (patch)
tree4fbe2364c3be1a993bdf251237bec639825f714c /fpu
parentc4c50b9edd61140af5112b196b75057ab5d98b4e (diff)
downloadqemu-c9696547d4b2d4da9e27d87a56f246d0c6551b96.tar.gz
softfloat: Fix mixups of int and int16
normalizeFloat{32,64}Subnormal() expect the exponent as int16, not int. This went unnoticed since int16 and uint16 were both typedef'ed to int. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'fpu')
-rw-r--r--fpu/softfloat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 9e1b5f9cab..a1c658eef7 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -2131,7 +2131,7 @@ float32 float32_rem( float32 a, float32 b STATUS_PARAM )
float32 float32_muladd(float32 a, float32 b, float32 c, int flags STATUS_PARAM)
{
flag aSign, bSign, cSign, zSign;
- int aExp, bExp, cExp, pExp, zExp, expDiff;
+ int16 aExp, bExp, cExp, pExp, zExp, expDiff;
uint32_t aSig, bSig, cSig;
flag pInf, pZero, pSign;
uint64_t pSig64, cSig64, zSig64;
@@ -3685,7 +3685,7 @@ float64 float64_rem( float64 a, float64 b STATUS_PARAM )
float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM)
{
flag aSign, bSign, cSign, zSign;
- int aExp, bExp, cExp, pExp, zExp, expDiff;
+ int16 aExp, bExp, cExp, pExp, zExp, expDiff;
uint64_t aSig, bSig, cSig;
flag pInf, pZero, pSign;
uint64_t pSig0, pSig1, cSig0, cSig1, zSig0, zSig1;