From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39117 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTiyq-0006WO-TN for qemu-devel@nongnu.org; Fri, 17 Dec 2010 17:40:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTiyl-0000za-Rm for qemu-devel@nongnu.org; Fri, 17 Dec 2010 17:40:52 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:49140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTiyk-0000zO-Ro for qemu-devel@nongnu.org; Fri, 17 Dec 2010 17:40:47 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 17 Dec 2010 23:39:16 +0100 Message-Id: <1292625556-24825-1-git-send-email-andreas.faerber@web.de> In-Reply-To: <1292607107-17491-1-git-send-email-andreas.faerber@web.de> References: <1292607107-17491-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: andreas.faerber@web.de Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2] softfloat: Fix function signature mismatches by using POSIX integer types List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Michael Lotz Don't reinvent C99 types like uint8_t by typedef'ing uint8 etc. On BeOS and Haiku, system headers {be,os}/support/SupportDefs.h do define [u]int{8,16,32,64}, but they define [u]int32 as long, so assumptions that int32 and int can be used interchangeably must be avoided. Inspired by mmlr's original port to Haiku. Fix stray occurrences of softfloat-internal types outside fpu/. v2: * Rebased. Fix two new instances of int16 and uint16. Cc: Michael Lotz Cc: Peter Maydell Signed-off-by: Andreas F=C3=A4rber --- fpu/softfloat-macros.h | 44 +++--- fpu/softfloat-specialize.h | 2 +- fpu/softfloat.c | 368 ++++++++++++++++++++++----------------= ------ fpu/softfloat.h | 63 +++----- hw/apic.c | 2 +- hw/wdt_ib700.c | 2 +- target-i386/cpu.h | 8 +- 7 files changed, 238 insertions(+), 251 deletions(-) diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h index 7838228..d635779 100644 --- a/fpu/softfloat-macros.h +++ b/fpu/softfloat-macros.h @@ -39,7 +39,7 @@ these four paragraphs for those parts of this code that= are retained. | The result is stored in the location pointed to by `zPtr'. *-----------------------------------------------------------------------= -----*/ =20 -INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr ) +INLINE void shift32RightJamming( bits32 a, int16_t count, bits32 *zPtr ) { bits32 z; =20 @@ -65,7 +65,7 @@ INLINE void shift32RightJamming( bits32 a, int16 count,= bits32 *zPtr ) | The result is stored in the location pointed to by `zPtr'. *-----------------------------------------------------------------------= -----*/ =20 -INLINE void shift64RightJamming( bits64 a, int16 count, bits64 *zPtr ) +INLINE void shift64RightJamming( bits64 a, int16_t count, bits64 *zPtr ) { bits64 z; =20 @@ -101,10 +101,10 @@ INLINE void shift64RightJamming( bits64 a, int16 co= unt, bits64 *zPtr ) =20 INLINE void shift64ExtraRightJamming( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) + bits64 a0, bits64 a1, int16_t count, bits64 *z0Ptr, bits64 *z1Ptr ) { bits64 z0, z1; - int8 negCount =3D ( - count ) & 63; + int8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -138,10 +138,10 @@ INLINE void =20 INLINE void shift128Right( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) + bits64 a0, bits64 a1, int16_t count, bits64 *z0Ptr, bits64 *z1Ptr ) { bits64 z0, z1; - int8 negCount =3D ( - count ) & 63; + int8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -173,10 +173,10 @@ INLINE void =20 INLINE void shift128RightJamming( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) + bits64 a0, bits64 a1, int16_t count, bits64 *z0Ptr, bits64 *z1Ptr ) { bits64 z0, z1; - int8 negCount =3D ( - count ) & 63; + int8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -227,14 +227,14 @@ INLINE void bits64 a0, bits64 a1, bits64 a2, - int16 count, + int16_t count, bits64 *z0Ptr, bits64 *z1Ptr, bits64 *z2Ptr ) { bits64 z0, z1, z2; - int8 negCount =3D ( - count ) & 63; + int8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z2 =3D a2; @@ -282,7 +282,7 @@ INLINE void =20 INLINE void shortShift128Left( - bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) + bits64 a0, bits64 a1, int16_t count, bits64 *z0Ptr, bits64 *z1Ptr ) { =20 *z1Ptr =3D a1<>27 ) & 15; @@ -609,9 +609,9 @@ static bits32 estimateSqrt32( int16 aExp, bits32 a ) | `a'. If `a' is zero, 32 is returned. *-----------------------------------------------------------------------= -----*/ =20 -static int8 countLeadingZeros32( bits32 a ) +static int8_t countLeadingZeros32( bits32 a ) { - static const int8 countLeadingZerosHigh[] =3D { + static const int8_t countLeadingZerosHigh[] =3D { 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -629,7 +629,7 @@ static int8 countLeadingZeros32( bits32 a ) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - int8 shiftCount; + int8_t shiftCount; =20 shiftCount =3D 0; if ( a < 0x10000 ) { @@ -650,9 +650,9 @@ static int8 countLeadingZeros32( bits32 a ) | `a'. If `a' is zero, 64 is returned. *-----------------------------------------------------------------------= -----*/ =20 -static int8 countLeadingZeros64( bits64 a ) +static int8_t countLeadingZeros64( bits64 a ) { - int8 shiftCount; + int8_t shiftCount; =20 shiftCount =3D 0; if ( a < ( (bits64) 1 )<<32 ) { diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 0746878..0c36388 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -43,7 +43,7 @@ these four paragraphs for those parts of this code that= are retained. | should be simply `float_exception_flags |=3D flags;'. *-----------------------------------------------------------------------= -----*/ =20 -void float_raise( int8 flags STATUS_PARAM ) +void float_raise( int8_t flags STATUS_PARAM ) { STATUS(float_exception_flags) |=3D flags; } diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 6f5b05d..20f1bc8 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -79,12 +79,12 @@ void set_floatx80_rounding_precision(int val STATUS_P= ARAM) | positive or negative integer is returned. *-----------------------------------------------------------------------= -----*/ =20 -static int32 roundAndPackInt32( flag zSign, bits64 absZ STATUS_PARAM) +static int32_t roundAndPackInt32( flag zSign, bits64 absZ STATUS_PARAM) { - int8 roundingMode; + int8_t roundingMode; flag roundNearestEven; - int8 roundIncrement, roundBits; - int32 z; + int8_t roundIncrement, roundBits; + int32_t z; =20 roundingMode =3D STATUS(float_rounding_mode); roundNearestEven =3D ( roundingMode =3D=3D float_round_nearest_even = ); @@ -129,11 +129,11 @@ static int32 roundAndPackInt32( flag zSign, bits64 = absZ STATUS_PARAM) | returned. *-----------------------------------------------------------------------= -----*/ =20 -static int64 roundAndPackInt64( flag zSign, bits64 absZ0, bits64 absZ1 S= TATUS_PARAM) +static int64_t roundAndPackInt64( flag zSign, bits64 absZ0, bits64 absZ1= STATUS_PARAM) { - int8 roundingMode; + int8_t roundingMode; flag roundNearestEven, increment; - int64 z; + int64_t z; =20 roundingMode =3D STATUS(float_rounding_mode); roundNearestEven =3D ( roundingMode =3D=3D float_round_nearest_even = ); @@ -185,7 +185,7 @@ INLINE bits32 extractFloat32Frac( float32 a ) | Returns the exponent bits of the single-precision floating-point value= `a'. *-----------------------------------------------------------------------= -----*/ =20 -INLINE int16 extractFloat32Exp( float32 a ) +INLINE int16_t extractFloat32Exp( float32 a ) { =20 return ( float32_val(a)>>23 ) & 0xFF; @@ -211,9 +211,9 @@ INLINE flag extractFloat32Sign( float32 a ) *-----------------------------------------------------------------------= -----*/ =20 static void - normalizeFloat32Subnormal( bits32 aSig, int16 *zExpPtr, bits32 *zSigPtr= ) + normalizeFloat32Subnormal( bits32 aSig, int16_t *zExpPtr, bits32 *zSigP= tr ) { - int8 shiftCount; + int8_t shiftCount; =20 shiftCount =3D countLeadingZeros32( aSig ) - 8; *zSigPtr =3D aSig<>52 ) & 0x7FF; @@ -375,9 +375,9 @@ INLINE flag extractFloat64Sign( float64 a ) *-----------------------------------------------------------------------= -----*/ =20 static void - normalizeFloat64Subnormal( bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr= ) + normalizeFloat64Subnormal( bits64 aSig, int16_t *zExpPtr, bits64 *zSigP= tr ) { - int8 shiftCount; + int8_t shiftCount; =20 shiftCount =3D countLeadingZeros64( aSig ) - 11; *zSigPtr =3D aSig<>48 ) & 0x7FFF; @@ -847,12 +847,12 @@ static void normalizeFloat128Subnormal( bits64 aSig0, bits64 aSig1, - int32 *zExpPtr, + int32_t *zExpPtr, bits64 *zSig0Ptr, bits64 *zSig1Ptr ) { - int8 shiftCount; + int8_t shiftCount; =20 if ( aSig0 =3D=3D 0 ) { shiftCount =3D countLeadingZeros64( aSig1 ) - 15; @@ -888,7 +888,7 @@ static void *-----------------------------------------------------------------------= -----*/ =20 INLINE float128 - packFloat128( flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 ) + packFloat128( flag zSign, int32_t zExp, bits64 zSig0, bits64 zSig1 ) { float128 z; =20 @@ -921,9 +921,9 @@ INLINE float128 =20 static float128 roundAndPackFloat128( - flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1, bits64 zSig2 ST= ATUS_PARAM) + flag zSign, int32_t zExp, bits64 zSig0, bits64 zSig1, bits64 zSig2 = STATUS_PARAM) { - int8 roundingMode; + int8_t roundingMode; flag roundNearestEven, increment, isTiny; =20 roundingMode =3D STATUS(float_rounding_mode); @@ -1022,9 +1022,9 @@ static float128 =20 static float128 normalizeRoundAndPackFloat128( - flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 STATUS_PARAM) + flag zSign, int32_t zExp, bits64 zSig0, bits64 zSig1 STATUS_PARAM) { - int8 shiftCount; + int8_t shiftCount; bits64 zSig2; =20 if ( zSig0 =3D=3D 0 ) { @@ -1054,7 +1054,7 @@ static float128 | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float32 int32_to_float32( int32 a STATUS_PARAM ) +float32 int32_to_float32( int32_t a STATUS_PARAM ) { flag zSign; =20 @@ -1071,11 +1071,11 @@ float32 int32_to_float32( int32 a STATUS_PARAM ) | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float64 int32_to_float64( int32 a STATUS_PARAM ) +float64 int32_to_float64( int32_t a STATUS_PARAM ) { flag zSign; - uint32 absA; - int8 shiftCount; + uint32_t absA; + int8_t shiftCount; bits64 zSig; =20 if ( a =3D=3D 0 ) return float64_zero; @@ -1096,11 +1096,11 @@ float64 int32_to_float64( int32 a STATUS_PARAM ) | Arithmetic. *-----------------------------------------------------------------------= -----*/ =20 -floatx80 int32_to_floatx80( int32 a STATUS_PARAM ) +floatx80 int32_to_floatx80( int32_t a STATUS_PARAM ) { flag zSign; - uint32 absA; - int8 shiftCount; + uint32_t absA; + int8_t shiftCount; bits64 zSig; =20 if ( a =3D=3D 0 ) return packFloatx80( 0, 0, 0 ); @@ -1122,11 +1122,11 @@ floatx80 int32_to_floatx80( int32 a STATUS_PARAM = ) | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float128 int32_to_float128( int32 a STATUS_PARAM ) +float128 int32_to_float128( int32_t a STATUS_PARAM ) { flag zSign; - uint32 absA; - int8 shiftCount; + uint32_t absA; + int8_t shiftCount; bits64 zSig0; =20 if ( a =3D=3D 0 ) return packFloat128( 0, 0, 0, 0 ); @@ -1146,11 +1146,11 @@ float128 int32_to_float128( int32 a STATUS_PARAM = ) | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float32 int64_to_float32( int64 a STATUS_PARAM ) +float32 int64_to_float32( int64_t a STATUS_PARAM ) { flag zSign; - uint64 absA; - int8 shiftCount; + uint64_t absA; + int8_t shiftCount; =20 if ( a =3D=3D 0 ) return float32_zero; zSign =3D ( a < 0 ); @@ -1172,9 +1172,9 @@ float32 int64_to_float32( int64 a STATUS_PARAM ) =20 } =20 -float32 uint64_to_float32( uint64 a STATUS_PARAM ) +float32 uint64_to_float32( uint64_t a STATUS_PARAM ) { - int8 shiftCount; + int8_t shiftCount; =20 if ( a =3D=3D 0 ) return float32_zero; shiftCount =3D countLeadingZeros64( a ) - 40; @@ -1199,7 +1199,7 @@ float32 uint64_to_float32( uint64 a STATUS_PARAM ) | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float64 int64_to_float64( int64 a STATUS_PARAM ) +float64 int64_to_float64( int64_t a STATUS_PARAM ) { flag zSign; =20 @@ -1212,7 +1212,7 @@ float64 int64_to_float64( int64 a STATUS_PARAM ) =20 } =20 -float64 uint64_to_float64( uint64 a STATUS_PARAM ) +float64 uint64_to_float64( uint64_t a STATUS_PARAM ) { if ( a =3D=3D 0 ) return float64_zero; return normalizeRoundAndPackFloat64( 0, 0x43C, a STATUS_VAR ); @@ -1228,11 +1228,11 @@ float64 uint64_to_float64( uint64 a STATUS_PARAM = ) | Arithmetic. *-----------------------------------------------------------------------= -----*/ =20 -floatx80 int64_to_floatx80( int64 a STATUS_PARAM ) +floatx80 int64_to_floatx80( int64_t a STATUS_PARAM ) { flag zSign; - uint64 absA; - int8 shiftCount; + uint64_t absA; + int8_t shiftCount; =20 if ( a =3D=3D 0 ) return packFloatx80( 0, 0, 0 ); zSign =3D ( a < 0 ); @@ -1252,12 +1252,12 @@ floatx80 int64_to_floatx80( int64 a STATUS_PARAM = ) | according to the IEC/IEEE Standard for Binary Floating-Point Arithmeti= c. *-----------------------------------------------------------------------= -----*/ =20 -float128 int64_to_float128( int64 a STATUS_PARAM ) +float128 int64_to_float128( int64_t a STATUS_PARAM ) { flag zSign; - uint64 absA; - int8 shiftCount; - int32 zExp; + uint64_t absA; + int8_t shiftCount; + int32_t zExp; bits64 zSig0, zSig1; =20 if ( a =3D=3D 0 ) return packFloat128( 0, 0, 0, 0 ); @@ -1291,10 +1291,10 @@ float128 int64_to_float128( int64 a STATUS_PARAM = ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float32_to_int32( float32 a STATUS_PARAM ) +int32_t float32_to_int32( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits32 aSig; bits64 aSig64; =20 @@ -1321,12 +1321,12 @@ int32 float32_to_int32( float32 a STATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float32_to_int32_round_to_zero( float32 a STATUS_PARAM ) +int32_t float32_to_int32_round_to_zero( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits32 aSig; - int32 z; + int32_t z; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -1363,12 +1363,12 @@ int32 float32_to_int32_round_to_zero( float32 a S= TATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int16 float32_to_int16_round_to_zero( float32 a STATUS_PARAM ) +int16_t float32_to_int16_round_to_zero( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits32 aSig; - int32 z; + int32_t z; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -1412,10 +1412,10 @@ int16 float32_to_int16_round_to_zero( float32 a S= TATUS_PARAM ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float32_to_int64( float32 a STATUS_PARAM ) +int64_t float32_to_int64( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits32 aSig; bits64 aSig64, aSigExtra; =20 @@ -1448,13 +1448,13 @@ int64 float32_to_int64( float32 a STATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float32_to_int64_round_to_zero( float32 a STATUS_PARAM ) +int64_t float32_to_int64_round_to_zero( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits32 aSig; bits64 aSig64; - int64 z; + int64_t z; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -1494,7 +1494,7 @@ int64 float32_to_int64_round_to_zero( float32 a STA= TUS_PARAM ) float64 float32_to_float64( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; =20 aSig =3D extractFloat32Frac( a ); @@ -1525,7 +1525,7 @@ float64 float32_to_float64( float32 a STATUS_PARAM = ) floatx80 float32_to_floatx80( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; =20 aSig =3D extractFloat32Frac( a ); @@ -1558,7 +1558,7 @@ floatx80 float32_to_floatx80( float32 a STATUS_PARA= M ) float128 float32_to_float128( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; =20 aSig =3D extractFloat32Frac( a ); @@ -1589,9 +1589,9 @@ float128 float32_to_float128( float32 a STATUS_PARA= M ) float32 float32_round_to_int( float32 a STATUS_PARAM) { flag aSign; - int16 aExp; + int16_t aExp; bits32 lastBitMask, roundBitsMask; - int8 roundingMode; + int8_t roundingMode; bits32 z; =20 aExp =3D extractFloat32Exp( a ); @@ -1648,9 +1648,9 @@ float32 float32_round_to_int( float32 a STATUS_PARA= M) =20 static float32 addFloat32Sigs( float32 a, float32 b, flag zSign STATUS_P= ARAM) { - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits32 aSig, bSig, zSig; - int16 expDiff; + int16_t expDiff; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -1722,9 +1722,9 @@ static float32 addFloat32Sigs( float32 a, float32 b= , flag zSign STATUS_PARAM) =20 static float32 subFloat32Sigs( float32 a, float32 b, flag zSign STATUS_P= ARAM) { - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits32 aSig, bSig, zSig; - int16 expDiff; + int16_t expDiff; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -1838,7 +1838,7 @@ float32 float32_sub( float32 a, float32 b STATUS_PA= RAM ) float32 float32_mul( float32 a, float32 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits32 aSig, bSig; bits64 zSig64; bits32 zSig; @@ -1898,7 +1898,7 @@ float32 float32_mul( float32 a, float32 b STATUS_PA= RAM ) float32 float32_div( float32 a, float32 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits32 aSig, bSig, zSig; =20 aSig =3D extractFloat32Frac( a ); @@ -1960,7 +1960,7 @@ float32 float32_div( float32 a, float32 b STATUS_PA= RAM ) float32 float32_rem( float32 a, float32 b STATUS_PARAM ) { flag aSign, zSign; - int16 aExp, bExp, expDiff; + int16_t aExp, bExp, expDiff; bits32 aSig, bSig; bits32 q; bits64 aSig64, bSig64, q64; @@ -2059,7 +2059,7 @@ float32 float32_rem( float32 a, float32 b STATUS_PA= RAM ) float32 float32_sqrt( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp, zExp; + int16_t aExp, zExp; bits32 aSig, zSig; bits64 rem, term; =20 @@ -2144,7 +2144,7 @@ static const float64 float32_exp2_coefficients[15] = =3D float32 float32_exp2( float32 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; float64 r, x, xn; int i; @@ -2191,7 +2191,7 @@ float32 float32_exp2( float32 a STATUS_PARAM ) float32 float32_log2( float32 a STATUS_PARAM ) { flag aSign, zSign; - int16 aExp; + int16_t aExp; bits32 aSig, zSig, i; =20 aSig =3D extractFloat32Frac( a ); @@ -2396,10 +2396,10 @@ int float32_lt_quiet( float32 a, float32 b STATUS= _PARAM ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float64_to_int32( float64 a STATUS_PARAM ) +int32_t float64_to_int32( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits64 aSig; =20 aSig =3D extractFloat64Frac( a ); @@ -2423,12 +2423,12 @@ int32 float64_to_int32( float64 a STATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float64_to_int32_round_to_zero( float64 a STATUS_PARAM ) +int32_t float64_to_int32_round_to_zero( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits64 aSig, savedASig; - int32 z; + int32_t z; =20 aSig =3D extractFloat64Frac( a ); aExp =3D extractFloat64Exp( a ); @@ -2469,12 +2469,12 @@ int32 float64_to_int32_round_to_zero( float64 a S= TATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int16 float64_to_int16_round_to_zero( float64 a STATUS_PARAM ) +int16_t float64_to_int16_round_to_zero( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits64 aSig, savedASig; - int32 z; + int32_t z; =20 aSig =3D extractFloat64Frac( a ); aExp =3D extractFloat64Exp( a ); @@ -2520,10 +2520,10 @@ int16 float64_to_int16_round_to_zero( float64 a S= TATUS_PARAM ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float64_to_int64( float64 a STATUS_PARAM ) +int64_t float64_to_int64( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits64 aSig, aSigExtra; =20 aSig =3D extractFloat64Frac( a ); @@ -2562,12 +2562,12 @@ int64 float64_to_int64( float64 a STATUS_PARAM ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float64_to_int64_round_to_zero( float64 a STATUS_PARAM ) +int64_t float64_to_int64_round_to_zero( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, shiftCount; + int16_t aExp, shiftCount; bits64 aSig; - int64 z; + int64_t z; =20 aSig =3D extractFloat64Frac( a ); aExp =3D extractFloat64Exp( a ); @@ -2614,7 +2614,7 @@ int64 float64_to_int64_round_to_zero( float64 a STA= TUS_PARAM ) float32 float64_to_float32( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig; bits32 zSig; =20 @@ -2646,7 +2646,7 @@ float32 float64_to_float32( float64 a STATUS_PARAM = ) | than the desired result exponent whenever `zSig' is a complete, normal= ized | significand. *-----------------------------------------------------------------------= -----*/ -static bits16 packFloat16(flag zSign, int16 zExp, bits16 zSig) +static bits16 packFloat16(flag zSign, int16_t zExp, bits16 zSig) { return (((bits32)zSign) << 15) + (((bits32)zExp) << 10) + zSig; } @@ -2657,7 +2657,7 @@ static bits16 packFloat16(flag zSign, int16 zExp, b= its16 zSig) float32 float16_to_float32( bits16 a, flag ieee STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; =20 aSign =3D a >> 15; @@ -2673,7 +2673,7 @@ float32 float16_to_float32( bits16 a, flag ieee STA= TUS_PARAM ) return packFloat32(aSign, 0xff, aSig << 13); } if (aExp =3D=3D 0) { - int8 shiftCount; + int8_t shiftCount; =20 if (aSig =3D=3D 0) { return packFloat32(aSign, 0, 0); @@ -2689,11 +2689,11 @@ float32 float16_to_float32( bits16 a, flag ieee S= TATUS_PARAM ) bits16 float32_to_float16( float32 a, flag ieee STATUS_PARAM) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; bits32 mask; bits32 increment; - int8 roundingMode; + int8_t roundingMode; =20 aSig =3D extractFloat32Frac( a ); aExp =3D extractFloat32Exp( a ); @@ -2785,7 +2785,7 @@ bits16 float32_to_float16( float32 a, flag ieee STA= TUS_PARAM) floatx80 float64_to_floatx80( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig; =20 aSig =3D extractFloat64Frac( a ); @@ -2819,7 +2819,7 @@ floatx80 float64_to_floatx80( float64 a STATUS_PARA= M ) float128 float64_to_float128( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig, zSig0, zSig1; =20 aSig =3D extractFloat64Frac( a ); @@ -2851,9 +2851,9 @@ float128 float64_to_float128( float64 a STATUS_PARA= M ) float64 float64_round_to_int( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 lastBitMask, roundBitsMask; - int8 roundingMode; + int8_t roundingMode; bits64 z; =20 aExp =3D extractFloat64Exp( a ); @@ -2923,9 +2923,9 @@ float64 float64_trunc_to_int( float64 a STATUS_PARA= M) =20 static float64 addFloat64Sigs( float64 a, float64 b, flag zSign STATUS_P= ARAM ) { - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits64 aSig, bSig, zSig; - int16 expDiff; + int16_t expDiff; =20 aSig =3D extractFloat64Frac( a ); aExp =3D extractFloat64Exp( a ); @@ -2997,9 +2997,9 @@ static float64 addFloat64Sigs( float64 a, float64 b= , flag zSign STATUS_PARAM ) =20 static float64 subFloat64Sigs( float64 a, float64 b, flag zSign STATUS_P= ARAM ) { - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits64 aSig, bSig, zSig; - int16 expDiff; + int16_t expDiff; =20 aSig =3D extractFloat64Frac( a ); aExp =3D extractFloat64Exp( a ); @@ -3113,7 +3113,7 @@ float64 float64_sub( float64 a, float64 b STATUS_PA= RAM ) float64 float64_mul( float64 a, float64 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits64 aSig, bSig, zSig0, zSig1; =20 aSig =3D extractFloat64Frac( a ); @@ -3171,7 +3171,7 @@ float64 float64_mul( float64 a, float64 b STATUS_PA= RAM ) float64 float64_div( float64 a, float64 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int16 aExp, bExp, zExp; + int16_t aExp, bExp, zExp; bits64 aSig, bSig, zSig; bits64 rem0, rem1; bits64 term0, term1; @@ -3241,7 +3241,7 @@ float64 float64_div( float64 a, float64 b STATUS_PA= RAM ) float64 float64_rem( float64 a, float64 b STATUS_PARAM ) { flag aSign, zSign; - int16 aExp, bExp, expDiff; + int16_t aExp, bExp, expDiff; bits64 aSig, bSig; bits64 q, alternateASig; sbits64 sigMean; @@ -3325,7 +3325,7 @@ float64 float64_rem( float64 a, float64 b STATUS_PA= RAM ) float64 float64_sqrt( float64 a STATUS_PARAM ) { flag aSign; - int16 aExp, zExp; + int16_t aExp, zExp; bits64 aSig, zSig, doubleZSig; bits64 rem0, rem1, term0, term1; =20 @@ -3375,7 +3375,7 @@ float64 float64_sqrt( float64 a STATUS_PARAM ) float64 float64_log2( float64 a STATUS_PARAM ) { flag aSign, zSign; - int16 aExp; + int16_t aExp; bits64 aSig, aSig0, aSig1, zSig, i; =20 aSig =3D extractFloat64Frac( a ); @@ -3583,10 +3583,10 @@ int float64_lt_quiet( float64 a, float64 b STATUS= _PARAM ) | overflows, the largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 floatx80_to_int32( floatx80 a STATUS_PARAM ) +int32_t floatx80_to_int32( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig; =20 aSig =3D extractFloatx80Frac( a ); @@ -3610,12 +3610,12 @@ int32 floatx80_to_int32( floatx80 a STATUS_PARAM = ) | sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 floatx80_to_int32_round_to_zero( floatx80 a STATUS_PARAM ) +int32_t floatx80_to_int32_round_to_zero( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig, savedASig; - int32 z; + int32_t z; =20 aSig =3D extractFloatx80Frac( a ); aExp =3D extractFloatx80Exp( a ); @@ -3655,10 +3655,10 @@ int32 floatx80_to_int32_round_to_zero( floatx80 a= STATUS_PARAM ) | overflows, the largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 floatx80_to_int64( floatx80 a STATUS_PARAM ) +int64_t floatx80_to_int64( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig, aSigExtra; =20 aSig =3D extractFloatx80Frac( a ); @@ -3695,12 +3695,12 @@ int64 floatx80_to_int64( floatx80 a STATUS_PARAM = ) | sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 floatx80_to_int64_round_to_zero( floatx80 a STATUS_PARAM ) +int64_t floatx80_to_int64_round_to_zero( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig; - int64 z; + int64_t z; =20 aSig =3D extractFloatx80Frac( a ); aExp =3D extractFloatx80Exp( a ); @@ -3739,7 +3739,7 @@ int64 floatx80_to_int64_round_to_zero( floatx80 a S= TATUS_PARAM ) float32 floatx80_to_float32( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig; =20 aSig =3D extractFloatx80Frac( a ); @@ -3767,7 +3767,7 @@ float32 floatx80_to_float32( floatx80 a STATUS_PARA= M ) float64 floatx80_to_float64( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig, zSig; =20 aSig =3D extractFloatx80Frac( a ); @@ -3797,7 +3797,7 @@ float64 floatx80_to_float64( floatx80 a STATUS_PARA= M ) float128 floatx80_to_float128( floatx80 a STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig, zSig0, zSig1; =20 aSig =3D extractFloatx80Frac( a ); @@ -3823,9 +3823,9 @@ float128 floatx80_to_float128( floatx80 a STATUS_PA= RAM ) floatx80 floatx80_round_to_int( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 lastBitMask, roundBitsMask; - int8 roundingMode; + int8_t roundingMode; floatx80 z; =20 aExp =3D extractFloatx80Exp( a ); @@ -3896,9 +3896,9 @@ floatx80 floatx80_round_to_int( floatx80 a STATUS_P= ARAM ) =20 static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STAT= US_PARAM) { - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig, bSig, zSig0, zSig1; - int32 expDiff; + int32_t expDiff; =20 aSig =3D extractFloatx80Frac( a ); aExp =3D extractFloatx80Exp( a ); @@ -3962,9 +3962,9 @@ static floatx80 addFloatx80Sigs( floatx80 a, floatx= 80 b, flag zSign STATUS_PARAM =20 static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STAT= US_PARAM ) { - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig, bSig, zSig0, zSig1; - int32 expDiff; + int32_t expDiff; floatx80 z; =20 aSig =3D extractFloatx80Frac( a ); @@ -4071,7 +4071,7 @@ floatx80 floatx80_sub( floatx80 a, floatx80 b STATU= S_PARAM ) floatx80 floatx80_mul( floatx80 a, floatx80 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig, bSig, zSig0, zSig1; floatx80 z; =20 @@ -4130,7 +4130,7 @@ floatx80 floatx80_mul( floatx80 a, floatx80 b STATU= S_PARAM ) floatx80 floatx80_div( floatx80 a, floatx80 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig, bSig, zSig0, zSig1; bits64 rem0, rem1, rem2, term0, term1, term2; floatx80 z; @@ -4210,7 +4210,7 @@ floatx80 floatx80_div( floatx80 a, floatx80 b STATU= S_PARAM ) floatx80 floatx80_rem( floatx80 a, floatx80 b STATUS_PARAM ) { flag aSign, zSign; - int32 aExp, bExp, expDiff; + int32_t aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig; bits64 q, term0, term1, alternateASig0, alternateASig1; floatx80 z; @@ -4306,7 +4306,7 @@ floatx80 floatx80_rem( floatx80 a, floatx80 b STATU= S_PARAM ) floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM ) { flag aSign; - int32 aExp, zExp; + int32_t aExp, zExp; bits64 aSig0, aSig1, zSig0, zSig1, doubleZSig0; bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; floatx80 z; @@ -4576,10 +4576,10 @@ int floatx80_lt_quiet( floatx80 a, floatx80 b STA= TUS_PARAM ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float128_to_int32( float128 a STATUS_PARAM ) +int32_t float128_to_int32( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig0, aSig1; =20 aSig1 =3D extractFloat128Frac1( a ); @@ -4605,12 +4605,12 @@ int32 float128_to_int32( float128 a STATUS_PARAM = ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int32 float128_to_int32_round_to_zero( float128 a STATUS_PARAM ) +int32_t float128_to_int32_round_to_zero( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig0, aSig1, savedASig; - int32 z; + int32_t z; =20 aSig1 =3D extractFloat128Frac1( a ); aSig0 =3D extractFloat128Frac0( a ); @@ -4653,10 +4653,10 @@ int32 float128_to_int32_round_to_zero( float128 a= STATUS_PARAM ) | largest integer with the same sign as `a' is returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float128_to_int64( float128 a STATUS_PARAM ) +int64_t float128_to_int64( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig0, aSig1; =20 aSig1 =3D extractFloat128Frac1( a ); @@ -4696,12 +4696,12 @@ int64 float128_to_int64( float128 a STATUS_PARAM = ) | returned. *-----------------------------------------------------------------------= -----*/ =20 -int64 float128_to_int64_round_to_zero( float128 a STATUS_PARAM ) +int64_t float128_to_int64_round_to_zero( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp, shiftCount; + int32_t aExp, shiftCount; bits64 aSig0, aSig1; - int64 z; + int64_t z; =20 aSig1 =3D extractFloat128Frac1( a ); aSig0 =3D extractFloat128Frac0( a ); @@ -4757,7 +4757,7 @@ int64 float128_to_int64_round_to_zero( float128 a S= TATUS_PARAM ) float32 float128_to_float32( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig0, aSig1; bits32 zSig; =20 @@ -4792,7 +4792,7 @@ float32 float128_to_float32( float128 a STATUS_PARA= M ) float64 float128_to_float64( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig0, aSig1; =20 aSig1 =3D extractFloat128Frac1( a ); @@ -4827,7 +4827,7 @@ float64 float128_to_float64( float128 a STATUS_PARA= M ) floatx80 float128_to_floatx80( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig0, aSig1; =20 aSig1 =3D extractFloat128Frac1( a ); @@ -4864,9 +4864,9 @@ floatx80 float128_to_floatx80( float128 a STATUS_PA= RAM ) float128 float128_round_to_int( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 lastBitMask, roundBitsMask; - int8 roundingMode; + int8_t roundingMode; float128 z; =20 aExp =3D extractFloat128Exp( a ); @@ -4967,9 +4967,9 @@ float128 float128_round_to_int( float128 a STATUS_P= ARAM ) =20 static float128 addFloat128Sigs( float128 a, float128 b, flag zSign STAT= US_PARAM) { - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; - int32 expDiff; + int32_t expDiff; =20 aSig1 =3D extractFloat128Frac1( a ); aSig0 =3D extractFloat128Frac0( a ); @@ -5048,9 +5048,9 @@ static float128 addFloat128Sigs( float128 a, float1= 28 b, flag zSign STATUS_PARAM =20 static float128 subFloat128Sigs( float128 a, float128 b, flag zSign STAT= US_PARAM) { - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1; - int32 expDiff; + int32_t expDiff; float128 z; =20 aSig1 =3D extractFloat128Frac1( a ); @@ -5173,7 +5173,7 @@ float128 float128_sub( float128 a, float128 b STATU= S_PARAM ) float128 float128_mul( float128 a, float128 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3; float128 z; =20 @@ -5237,7 +5237,7 @@ float128 float128_mul( float128 a, float128 b STATU= S_PARAM ) float128 float128_div( float128 a, float128 b STATUS_PARAM ) { flag aSign, bSign, zSign; - int32 aExp, bExp, zExp; + int32_t aExp, bExp, zExp; bits64 aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; float128 z; @@ -5321,7 +5321,7 @@ float128 float128_div( float128 a, float128 b STATU= S_PARAM ) float128 float128_rem( float128 a, float128 b STATUS_PARAM ) { flag aSign, zSign; - int32 aExp, bExp, expDiff; + int32_t aExp, bExp, expDiff; bits64 aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; bits64 allZero, alternateASig0, alternateASig1, sigMean1; sbits64 sigMean0; @@ -5430,7 +5430,7 @@ float128 float128_rem( float128 a, float128 b STATU= S_PARAM ) float128 float128_sqrt( float128 a STATUS_PARAM ) { flag aSign; - int32 aExp, zExp; + int32_t aExp, zExp; bits64 aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0; bits64 rem0, rem1, rem2, rem3, term0, term1, term2, term3; float128 z; @@ -5686,17 +5686,17 @@ int float128_lt_quiet( float128 a, float128 b STA= TUS_PARAM ) #endif =20 /* misc functions */ -float32 uint32_to_float32( unsigned int a STATUS_PARAM ) +float32 uint32_to_float32( uint32_t a STATUS_PARAM ) { return int64_to_float32(a STATUS_VAR); } =20 -float64 uint32_to_float64( unsigned int a STATUS_PARAM ) +float64 uint32_to_float64( uint32_t a STATUS_PARAM ) { return int64_to_float64(a STATUS_VAR); } =20 -unsigned int float32_to_uint32( float32 a STATUS_PARAM ) +uint32_t float32_to_uint32( float32 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5714,7 +5714,7 @@ unsigned int float32_to_uint32( float32 a STATUS_PA= RAM ) return res; } =20 -unsigned int float32_to_uint32_round_to_zero( float32 a STATUS_PARAM ) +uint32_t float32_to_uint32_round_to_zero( float32 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5732,7 +5732,7 @@ unsigned int float32_to_uint32_round_to_zero( float= 32 a STATUS_PARAM ) return res; } =20 -unsigned int float32_to_uint16_round_to_zero( float32 a STATUS_PARAM ) +uint16_t float32_to_uint16_round_to_zero( float32 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5750,7 +5750,7 @@ unsigned int float32_to_uint16_round_to_zero( float= 32 a STATUS_PARAM ) return res; } =20 -unsigned int float64_to_uint32( float64 a STATUS_PARAM ) +uint32_t float64_to_uint32( float64 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5768,7 +5768,7 @@ unsigned int float64_to_uint32( float64 a STATUS_PA= RAM ) return res; } =20 -unsigned int float64_to_uint32_round_to_zero( float64 a STATUS_PARAM ) +uint32_t float64_to_uint32_round_to_zero( float64 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5786,7 +5786,7 @@ unsigned int float64_to_uint32_round_to_zero( float= 64 a STATUS_PARAM ) return res; } =20 -unsigned int float64_to_uint16_round_to_zero( float64 a STATUS_PARAM ) +uint16_t float64_to_uint16_round_to_zero( float64 a STATUS_PARAM ) { int64_t v; unsigned int res; @@ -5926,7 +5926,7 @@ int float128_compare_quiet( float128 a, float128 b = STATUS_PARAM ) float32 float32_scalbn( float32 a, int n STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits32 aSig; =20 aSig =3D extractFloat32Frac( a ); @@ -5949,7 +5949,7 @@ float32 float32_scalbn( float32 a, int n STATUS_PAR= AM ) float64 float64_scalbn( float64 a, int n STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig; =20 aSig =3D extractFloat64Frac( a ); @@ -5973,7 +5973,7 @@ float64 float64_scalbn( float64 a, int n STATUS_PAR= AM ) floatx80 floatx80_scalbn( floatx80 a, int n STATUS_PARAM ) { flag aSign; - int16 aExp; + int16_t aExp; bits64 aSig; =20 aSig =3D extractFloatx80Frac( a ); @@ -5996,7 +5996,7 @@ floatx80 floatx80_scalbn( floatx80 a, int n STATUS_= PARAM ) float128 float128_scalbn( float128 a, int n STATUS_PARAM ) { flag aSign; - int32 aExp; + int32_t aExp; bits64 aSig0, aSig1; =20 aSig1 =3D extractFloat128Frac1( a ); diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 1c1004d..e97b11f 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -41,23 +41,10 @@ these four paragraphs for those parts of this code th= at are retained. =20 /*----------------------------------------------------------------------= ------ | Each of the following `typedef's defines the most convenient type that= holds -| integers of at least as many bits as specified. For example, `uint8' = should -| be the most convenient type that can hold unsigned integers of as many= as -| 8 bits. The `flag' type must be able to hold either a 0 or 1. For mo= st -| implementations of C, `flag', `uint8', and `int8' should all be `typed= ef'ed -| to the same as `int'. +| integers of at least as many bits as specified. +| The `flag' type must be able to hold either a 0 or 1. *-----------------------------------------------------------------------= -----*/ typedef uint8_t flag; -typedef uint8_t uint8; -typedef int8_t int8; -#ifndef _AIX -typedef int uint16; -typedef int int16; -#endif -typedef unsigned int uint32; -typedef signed int int32; -typedef uint64_t uint64; -typedef int64_t int64; =20 /*----------------------------------------------------------------------= ------ | Each of the following `typedef's defines a type that holds integers @@ -216,20 +203,20 @@ void set_floatx80_rounding_precision(int val STATUS= _PARAM); | Routine to raise any or all of the software IEC/IEEE floating-point | exception flags. *-----------------------------------------------------------------------= -----*/ -void float_raise( int8 flags STATUS_PARAM); +void float_raise( int8_t flags STATUS_PARAM); =20 /*----------------------------------------------------------------------= ------ | Software IEC/IEEE integer-to-floating-point conversion routines. *-----------------------------------------------------------------------= -----*/ -float32 int32_to_float32( int STATUS_PARAM ); -float64 int32_to_float64( int STATUS_PARAM ); -float32 uint32_to_float32( unsigned int STATUS_PARAM ); -float64 uint32_to_float64( unsigned int STATUS_PARAM ); +float32 int32_to_float32( int32_t STATUS_PARAM ); +float64 int32_to_float64( int32_t STATUS_PARAM ); +float32 uint32_to_float32( uint32_t STATUS_PARAM ); +float64 uint32_to_float64( uint32_t STATUS_PARAM ); #ifdef FLOATX80 -floatx80 int32_to_floatx80( int STATUS_PARAM ); +floatx80 int32_to_floatx80( int32_t STATUS_PARAM ); #endif #ifdef FLOAT128 -float128 int32_to_float128( int STATUS_PARAM ); +float128 int32_to_float128( int32_t STATUS_PARAM ); #endif float32 int64_to_float32( int64_t STATUS_PARAM ); float32 uint64_to_float32( uint64_t STATUS_PARAM ); @@ -251,12 +238,12 @@ float32 float16_to_float32( bits16, flag STATUS_PAR= AM ); /*----------------------------------------------------------------------= ------ | Software IEC/IEEE single-precision conversion routines. *-----------------------------------------------------------------------= -----*/ -int float32_to_int16_round_to_zero( float32 STATUS_PARAM ); -unsigned int float32_to_uint16_round_to_zero( float32 STATUS_PARAM ); -int float32_to_int32( float32 STATUS_PARAM ); -int float32_to_int32_round_to_zero( float32 STATUS_PARAM ); -unsigned int float32_to_uint32( float32 STATUS_PARAM ); -unsigned int float32_to_uint32_round_to_zero( float32 STATUS_PARAM ); +int16_t float32_to_int16_round_to_zero( float32 STATUS_PARAM ); +uint16_t float32_to_uint16_round_to_zero( float32 STATUS_PARAM ); +int32_t float32_to_int32( float32 STATUS_PARAM ); +int32_t float32_to_int32_round_to_zero( float32 STATUS_PARAM ); +uint32_t float32_to_uint32( float32 STATUS_PARAM ); +uint32_t float32_to_uint32_round_to_zero( float32 STATUS_PARAM ); int64_t float32_to_int64( float32 STATUS_PARAM ); int64_t float32_to_int64_round_to_zero( float32 STATUS_PARAM ); float64 float32_to_float64( float32 STATUS_PARAM ); @@ -329,12 +316,12 @@ INLINE int float32_is_any_nan(float32 a) /*----------------------------------------------------------------------= ------ | Software IEC/IEEE double-precision conversion routines. *-----------------------------------------------------------------------= -----*/ -int float64_to_int16_round_to_zero( float64 STATUS_PARAM ); -unsigned int float64_to_uint16_round_to_zero( float64 STATUS_PARAM ); -int float64_to_int32( float64 STATUS_PARAM ); -int float64_to_int32_round_to_zero( float64 STATUS_PARAM ); -unsigned int float64_to_uint32( float64 STATUS_PARAM ); -unsigned int float64_to_uint32_round_to_zero( float64 STATUS_PARAM ); +int16_t float64_to_int16_round_to_zero( float64 STATUS_PARAM ); +uint16_t float64_to_uint16_round_to_zero( float64 STATUS_PARAM ); +int32_t float64_to_int32( float64 STATUS_PARAM ); +int32_t float64_to_int32_round_to_zero( float64 STATUS_PARAM ); +uint32_t float64_to_uint32( float64 STATUS_PARAM ); +uint32_t float64_to_uint32_round_to_zero( float64 STATUS_PARAM ); int64_t float64_to_int64( float64 STATUS_PARAM ); int64_t float64_to_int64_round_to_zero( float64 STATUS_PARAM ); uint64_t float64_to_uint64 (float64 a STATUS_PARAM); @@ -411,8 +398,8 @@ INLINE int float64_is_any_nan(float64 a) /*----------------------------------------------------------------------= ------ | Software IEC/IEEE extended double-precision conversion routines. *-----------------------------------------------------------------------= -----*/ -int floatx80_to_int32( floatx80 STATUS_PARAM ); -int floatx80_to_int32_round_to_zero( floatx80 STATUS_PARAM ); +int32_t floatx80_to_int32( floatx80 STATUS_PARAM ); +int32_t floatx80_to_int32_round_to_zero( floatx80 STATUS_PARAM ); int64_t floatx80_to_int64( floatx80 STATUS_PARAM ); int64_t floatx80_to_int64_round_to_zero( floatx80 STATUS_PARAM ); float32 floatx80_to_float32( floatx80 STATUS_PARAM ); @@ -475,8 +462,8 @@ INLINE int floatx80_is_zero(floatx80 a) /*----------------------------------------------------------------------= ------ | Software IEC/IEEE quadruple-precision conversion routines. *-----------------------------------------------------------------------= -----*/ -int float128_to_int32( float128 STATUS_PARAM ); -int float128_to_int32_round_to_zero( float128 STATUS_PARAM ); +int32_t float128_to_int32( float128 STATUS_PARAM ); +int32_t float128_to_int32_round_to_zero( float128 STATUS_PARAM ); int64_t float128_to_int64( float128 STATUS_PARAM ); int64_t float128_to_int64_round_to_zero( float128 STATUS_PARAM ); float32 float128_to_float32( float128 STATUS_PARAM ); diff --git a/hw/apic.c b/hw/apic.c index a5a53fb..ff581f0 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -765,7 +765,7 @@ static uint32_t apic_mem_readl(void *opaque, target_p= hys_addr_t addr) return val; } =20 -static void apic_send_msi(target_phys_addr_t addr, uint32 data) +static void apic_send_msi(target_phys_addr_t addr, uint32_t data) { uint8_t dest =3D (addr & MSI_ADDR_DEST_ID_MASK) >> MSI_ADDR_DEST_ID_= SHIFT; uint8_t vector =3D (data & MSI_DATA_VECTOR_MASK) >> MSI_DATA_VECTOR_= SHIFT; diff --git a/hw/wdt_ib700.c b/hw/wdt_ib700.c index b6235eb..1248464 100644 --- a/hw/wdt_ib700.c +++ b/hw/wdt_ib700.c @@ -53,7 +53,7 @@ static void ib700_write_enable_reg(void *vp, uint32_t a= ddr, uint32_t data) 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0 }; - int64 timeout; + int64_t timeout; =20 ib700_debug("addr =3D %x, data =3D %x\n", addr, data); =20 diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 06e40f3..f0c07cd 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -737,10 +737,10 @@ typedef struct CPUX86State { user */ struct DeviceState *apic_state; =20 - uint64 mcg_cap; - uint64 mcg_status; - uint64 mcg_ctl; - uint64 mce_banks[MCE_BANKS_DEF*4]; + uint64_t mcg_cap; + uint64_t mcg_status; + uint64_t mcg_ctl; + uint64_t mce_banks[MCE_BANKS_DEF*4]; =20 uint64_t tsc_aux; =20 --=20 1.7.3