Received: from [140.186.70.92] (port=40049 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwOP2-0005nv-TJ for qemu-devel@nongnu.org; Sun, 06 Mar 2011 19:34:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwOOz-0000uH-T6 for qemu-devel@nongnu.org; Sun, 06 Mar 2011 19:34:24 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:37761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwOOz-0000tm-87 for qemu-devel@nongnu.org; Sun, 06 Mar 2011 19:34:21 -0500 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 7 Mar 2011 01:34:09 +0100 Message-Id: <1299458053-69428-6-git-send-email-andreas.faerber@web.de> In-Reply-To: <1299458053-69428-5-git-send-email-andreas.faerber@web.de> References: <1294169951-5153-5-git-send-email-andreas.faerber@web.de> <1299458053-69428-1-git-send-email-andreas.faerber@web.de> <1299458053-69428-2-git-send-email-andreas.faerber@web.de> <1299458053-69428-3-git-send-email-andreas.faerber@web.de> <1299458053-69428-4-git-send-email-andreas.faerber@web.de> <1299458053-69428-5-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 v5 06/10] softfloat: Drop [u]int8 types in favor of int_fast8_t 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?= v5: * Initial. Cc: Peter Maydell Signed-off-by: Andreas F=C3=A4rber --- fpu/softfloat-macros.h | 26 +++++++++--------- fpu/softfloat-specialize.h | 2 +- fpu/softfloat.c | 62 ++++++++++++++++++++++----------------= ------ fpu/softfloat.h | 4 +-- 4 files changed, 46 insertions(+), 48 deletions(-) diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h index 7b350c0..28637d4 100644 --- a/fpu/softfloat-macros.h +++ b/fpu/softfloat-macros.h @@ -109,7 +109,7 @@ INLINE void uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint= 64_t *z1Ptr ) { uint64_t z0, z1; - int8 negCount =3D ( - count ) & 63; + int_fast8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -146,7 +146,7 @@ INLINE void uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint= 64_t *z1Ptr ) { uint64_t z0, z1; - int8 negCount =3D ( - count ) & 63; + int_fast8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -181,7 +181,7 @@ INLINE void uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint= 64_t *z1Ptr ) { uint64_t z0, z1; - int8 negCount =3D ( - count ) & 63; + int_fast8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z1 =3D a1; @@ -239,7 +239,7 @@ INLINE void ) { uint64_t z0, z1, z2; - int8 negCount =3D ( - count ) & 63; + int_fast8_t negCount =3D ( - count ) & 63; =20 if ( count =3D=3D 0 ) { z2 =3D a2; @@ -316,7 +316,7 @@ INLINE void ) { uint64_t z0, z1, z2; - int8 negCount; + int_fast8_t negCount; =20 z2 =3D a2<>27 ) & 15; @@ -614,9 +614,9 @@ static uint32_t estimateSqrt32( int_fast16_t aExp, ui= nt32_t a ) | `a'. If `a' is zero, 32 is returned. *-----------------------------------------------------------------------= -----*/ =20 -static int8 countLeadingZeros32( uint32_t a ) +static int_fast8_t countLeadingZeros32( uint32_t a ) { - static const int8 countLeadingZerosHigh[] =3D { + static const int_fast8_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, @@ -634,7 +634,7 @@ static int8 countLeadingZeros32( uint32_t 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; + int_fast8_t shiftCount; =20 shiftCount =3D 0; if ( a < 0x10000 ) { @@ -655,9 +655,9 @@ static int8 countLeadingZeros32( uint32_t a ) | `a'. If `a' is zero, 64 is returned. *-----------------------------------------------------------------------= -----*/ =20 -static int8 countLeadingZeros64( uint64_t a ) +static int_fast8_t countLeadingZeros64( uint64_t a ) { - int8 shiftCount; + int_fast8_t shiftCount; =20 shiftCount =3D 0; if ( a < ( (uint64_t) 1 )<<32 ) { diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 4b65de6..e81ae96 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -42,7 +42,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( int_fast8_t flags STATUS_PARAM ) { STATUS(float_exception_flags) |=3D flags; } diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 4e23511..e6ecf6c 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -111,9 +111,9 @@ INLINE flag extractFloat16Sign(float16 a) =20 static int32 roundAndPackInt32( flag zSign, uint64_t absZ STATUS_PARAM) { - int8 roundingMode; + int_fast8_t roundingMode; flag roundNearestEven; - int8 roundIncrement, roundBits; + int_fast8_t roundIncrement, roundBits; int32 z; =20 roundingMode =3D STATUS(float_rounding_mode); @@ -161,7 +161,7 @@ static int32 roundAndPackInt32( flag zSign, uint64_t = absZ STATUS_PARAM) =20 static int64 roundAndPackInt64( flag zSign, uint64_t absZ0, uint64_t abs= Z1 STATUS_PARAM) { - int8 roundingMode; + int_fast8_t roundingMode; flag roundNearestEven, increment; int64 z; =20 @@ -258,7 +258,7 @@ static float32 float32_squash_input_denormal(float32 = a STATUS_PARAM) static void normalizeFloat32Subnormal( uint32_t aSig, int_fast16_t *zExpPtr, uint32= _t *zSigPtr ) { - int8 shiftCount; + int_fast8_t shiftCount; =20 shiftCount =3D countLeadingZeros32( aSig ) - 8; *zSigPtr =3D aSig<