softfloat:

* drop confusing softfloat-only types
  * fix return type of roundAndPackFloat16
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWokeFAAoJEDwlJe0UNgze+hsP/jIo8Rsa19/yUkxSr4ZwKBhX
 NjMJd+1juLUgZdb/8nPc0fWUDHM3+DQ+VD0AIpbOx0QOf53OCiEvKtSKjnot0Oef
 2jakgmR0fb0dQ7/r4jzwKLekLVYKkxlwG3EO+WbrA7cROx2JF47/IJfkXUV7j7L8
 HByJc5/STOL+kEnwP+uNvq5b1rRo/F7B2auXdijFGXtcyxMTBNx4jW05ATYZos2Y
 24MWK95SaialFhaWUXdG3j+Puho/l3ATJnWpfJvEzH03tC8d9K2WdJ7TR1a+g6Iq
 9/X/Hsa3SifCJ8OLqbKINJCGdov9H53P/WSh258qey4rSvg8LyR8zBQYg5sos25O
 f8FQusCIGcW7qfP4Cd03KXtlb03weY/iMGfLjNmkoNB73s0n9Z9xsvPD44rvSOj3
 7ew6is3ZZimn19nel1aGb+jhCge+6iTEFVytJiNt+CPeu3m+82uSRqr6aCkoRFEW
 copMc8rRxqGWj11dHzX4qnvPeYaq8hL8rCR4ossfgXF/ONdpNCfs8mTv5t9mKKq/
 K0N2JGy8EoPXa2/55D7/KF9DCmmzWa6efKE2eV08MdyRTxAbc/Pl2HpdPKYIOTOK
 FXF/XmV/kts+z7zhigxrDpPKvE4uX2BE7A0kKSVKBpelEl33R4wufIJRZFdNJBXt
 IX3Bc+5XYrG3pNt489c9
 =gXbe
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160122' into staging

softfloat:
 * drop confusing softfloat-only types
 * fix return type of roundAndPackFloat16

# gpg: Signature made Fri 22 Jan 2016 15:15:17 GMT using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"

* remotes/pmaydell/tags/pull-softfloat-20160122:
  softfloat: fix return type of roundAndPackFloat16
  fpu: Replace uint8 typedef with uint8_t
  fpu: Replace int8 typedef with int8_t
  fpu: Replace uint32 typedef with uint32_t
  fpu: Replace int32 typedef with int32_t
  fpu: Replace uint64 typedef with uint64_t
  fpu: Replace int64 typedef with int64_t

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-01-22 15:19:20 +00:00
commit 047e363b05
20 changed files with 188 additions and 198 deletions

View File

@ -434,7 +434,7 @@ int qcrypto_secret_lookup(const char *secretid,
return -1;
}
*data = g_new0(uint8, secret->rawlen + 1);
*data = g_new0(uint8_t, secret->rawlen + 1);
memcpy(*data, secret->rawdata, secret->rawlen);
(*data)[secret->rawlen] = '\0';
*datalen = secret->rawlen;

View File

@ -164,7 +164,7 @@ static inline void
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
uint64_t z0, z1;
int8 negCount = ( - count ) & 63;
int8_t negCount = ( - count ) & 63;
if ( count == 0 ) {
z1 = a1;
@ -201,7 +201,7 @@ static inline void
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
uint64_t z0, z1;
int8 negCount = ( - count ) & 63;
int8_t negCount = ( - count ) & 63;
if ( count == 0 ) {
z1 = a1;
@ -236,7 +236,7 @@ static inline void
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
uint64_t z0, z1;
int8 negCount = ( - count ) & 63;
int8_t negCount = ( - count ) & 63;
if ( count == 0 ) {
z1 = a1;
@ -294,7 +294,7 @@ static inline void
)
{
uint64_t z0, z1, z2;
int8 negCount = ( - count ) & 63;
int8_t negCount = ( - count ) & 63;
if ( count == 0 ) {
z2 = a2;
@ -371,7 +371,7 @@ static inline void
)
{
uint64_t z0, z1, z2;
int8 negCount;
int8_t negCount;
z2 = a2<<count;
z1 = a1<<count;
@ -428,7 +428,7 @@ static inline void
)
{
uint64_t z0, z1, z2;
int8 carry0, carry1;
int8_t carry0, carry1;
z2 = a2 + b2;
carry1 = ( z2 < a2 );
@ -484,7 +484,7 @@ static inline void
)
{
uint64_t z0, z1, z2;
int8 borrow0, borrow1;
int8_t borrow0, borrow1;
z2 = a2 - b2;
borrow1 = ( a2 < b2 );
@ -645,7 +645,7 @@ static uint32_t estimateSqrt32(int_fast16_t aExp, uint32_t a)
0x0A2D, 0x08AF, 0x075A, 0x0629, 0x051A, 0x0429, 0x0356, 0x029E,
0x0200, 0x0179, 0x0109, 0x00AF, 0x0068, 0x0034, 0x0012, 0x0002
};
int8 index;
int8_t index;
uint32_t z;
index = ( a>>27 ) & 15;
@ -669,7 +669,7 @@ static uint32_t estimateSqrt32(int_fast16_t aExp, uint32_t a)
| `a'. If `a' is zero, 32 is returned.
*----------------------------------------------------------------------------*/
static int8 countLeadingZeros32( uint32_t a )
static int8_t countLeadingZeros32( uint32_t a )
{
#if SOFTFLOAT_GNUC_PREREQ(3, 4)
if (a) {
@ -678,7 +678,7 @@ static int8 countLeadingZeros32( uint32_t a )
return 32;
}
#else
static const int8 countLeadingZerosHigh[] = {
static const int8_t countLeadingZerosHigh[] = {
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,
@ -696,7 +696,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;
int8_t shiftCount;
shiftCount = 0;
if ( a < 0x10000 ) {
@ -717,7 +717,7 @@ static int8 countLeadingZeros32( uint32_t a )
| `a'. If `a' is zero, 64 is returned.
*----------------------------------------------------------------------------*/
static int8 countLeadingZeros64( uint64_t a )
static int8_t countLeadingZeros64( uint64_t a )
{
#if SOFTFLOAT_GNUC_PREREQ(3, 4)
if (a) {
@ -726,7 +726,7 @@ static int8 countLeadingZeros64( uint64_t a )
return 64;
}
#else
int8 shiftCount;
int8_t shiftCount;
shiftCount = 0;
if ( a < ( (uint64_t) 1 )<<32 ) {

View File

@ -174,7 +174,7 @@ const float128 float128_default_nan
| should be simply `float_exception_flags |= flags;'.
*----------------------------------------------------------------------------*/
void float_raise(int8 flags, float_status *status)
void float_raise(int8_t flags, float_status *status)
{
status->float_exception_flags |= flags;
}

View File

@ -144,11 +144,11 @@ static inline flag extractFloat16Sign(float16 a)
| positive or negative integer is returned.
*----------------------------------------------------------------------------*/
static int32 roundAndPackInt32(flag zSign, uint64_t absZ, float_status *status)
static int32_t roundAndPackInt32(flag zSign, uint64_t absZ, float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven;
int8 roundIncrement, roundBits;
int8_t roundIncrement, roundBits;
int32_t z;
roundingMode = status->float_rounding_mode;
@ -198,10 +198,10 @@ static int32 roundAndPackInt32(flag zSign, uint64_t absZ, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
static int64 roundAndPackInt64(flag zSign, uint64_t absZ0, uint64_t absZ1,
static int64_t roundAndPackInt64(flag zSign, uint64_t absZ0, uint64_t absZ1,
float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven, increment;
int64_t z;
@ -255,10 +255,10 @@ static int64 roundAndPackInt64(flag zSign, uint64_t absZ0, uint64_t absZ1,
| exception is raised and the largest unsigned integer is returned.
*----------------------------------------------------------------------------*/
static int64 roundAndPackUint64(flag zSign, uint64_t absZ0,
static int64_t roundAndPackUint64(flag zSign, uint64_t absZ0,
uint64_t absZ1, float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven, increment;
roundingMode = status->float_rounding_mode;
@ -358,7 +358,7 @@ float32 float32_squash_input_denormal(float32 a, float_status *status)
static void
normalizeFloat32Subnormal(uint32_t aSig, int_fast16_t *zExpPtr, uint32_t *zSigPtr)
{
int8 shiftCount;
int8_t shiftCount;
shiftCount = countLeadingZeros32( aSig ) - 8;
*zSigPtr = aSig<<shiftCount;
@ -410,9 +410,9 @@ static inline float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig)
static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig,
float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven;
int8 roundIncrement, roundBits;
int8_t roundIncrement, roundBits;
flag isTiny;
roundingMode = status->float_rounding_mode;
@ -485,7 +485,7 @@ static float32
normalizeRoundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig,
float_status *status)
{
int8 shiftCount;
int8_t shiftCount;
shiftCount = countLeadingZeros32( zSig ) - 1;
return roundAndPackFloat32(zSign, zExp - shiftCount, zSig<<shiftCount,
@ -551,7 +551,7 @@ float64 float64_squash_input_denormal(float64 a, float_status *status)
static void
normalizeFloat64Subnormal(uint64_t aSig, int_fast16_t *zExpPtr, uint64_t *zSigPtr)
{
int8 shiftCount;
int8_t shiftCount;
shiftCount = countLeadingZeros64( aSig ) - 11;
*zSigPtr = aSig<<shiftCount;
@ -603,7 +603,7 @@ static inline float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig)
static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig,
float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven;
int_fast16_t roundIncrement, roundBits;
flag isTiny;
@ -677,7 +677,7 @@ static float64
normalizeRoundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig,
float_status *status)
{
int8 shiftCount;
int8_t shiftCount;
shiftCount = countLeadingZeros64( zSig ) - 1;
return roundAndPackFloat64(zSign, zExp - shiftCount, zSig<<shiftCount,
@ -702,7 +702,7 @@ static inline uint64_t extractFloatx80Frac( floatx80 a )
| value `a'.
*----------------------------------------------------------------------------*/
static inline int32 extractFloatx80Exp( floatx80 a )
static inline int32_t extractFloatx80Exp( floatx80 a )
{
return a.high & 0x7FFF;
@ -729,9 +729,9 @@ static inline flag extractFloatx80Sign( floatx80 a )
*----------------------------------------------------------------------------*/
static void
normalizeFloatx80Subnormal( uint64_t aSig, int32 *zExpPtr, uint64_t *zSigPtr )
normalizeFloatx80Subnormal( uint64_t aSig, int32_t *zExpPtr, uint64_t *zSigPtr )
{
int8 shiftCount;
int8_t shiftCount;
shiftCount = countLeadingZeros64( aSig );
*zSigPtr = aSig<<shiftCount;
@ -744,7 +744,7 @@ static void
| extended double-precision floating-point value, returning the result.
*----------------------------------------------------------------------------*/
static inline floatx80 packFloatx80( flag zSign, int32 zExp, uint64_t zSig )
static inline floatx80 packFloatx80( flag zSign, int32_t zExp, uint64_t zSig )
{
floatx80 z;
@ -778,13 +778,13 @@ static inline floatx80 packFloatx80( flag zSign, int32 zExp, uint64_t zSig )
| Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
static floatx80 roundAndPackFloatx80(int8 roundingPrecision, flag zSign,
int32 zExp, uint64_t zSig0, uint64_t zSig1,
static floatx80 roundAndPackFloatx80(int8_t roundingPrecision, flag zSign,
int32_t zExp, uint64_t zSig0, uint64_t zSig1,
float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven, increment, isTiny;
int64 roundIncrement, roundMask, roundBits;
int64_t roundIncrement, roundMask, roundBits;
roundingMode = status->float_rounding_mode;
roundNearestEven = ( roundingMode == float_round_nearest_even );
@ -974,12 +974,12 @@ static floatx80 roundAndPackFloatx80(int8 roundingPrecision, flag zSign,
| normalized.
*----------------------------------------------------------------------------*/
static floatx80 normalizeRoundAndPackFloatx80(int8 roundingPrecision,
flag zSign, int32 zExp,
static floatx80 normalizeRoundAndPackFloatx80(int8_t roundingPrecision,
flag zSign, int32_t zExp,
uint64_t zSig0, uint64_t zSig1,
float_status *status)
{
int8 shiftCount;
int8_t shiftCount;
if ( zSig0 == 0 ) {
zSig0 = zSig1;
@ -1023,7 +1023,7 @@ static inline uint64_t extractFloat128Frac0( float128 a )
| `a'.
*----------------------------------------------------------------------------*/
static inline int32 extractFloat128Exp( float128 a )
static inline int32_t extractFloat128Exp( float128 a )
{
return ( a.high>>48 ) & 0x7FFF;
@ -1055,12 +1055,12 @@ static void
normalizeFloat128Subnormal(
uint64_t aSig0,
uint64_t aSig1,
int32 *zExpPtr,
int32_t *zExpPtr,
uint64_t *zSig0Ptr,
uint64_t *zSig1Ptr
)
{
int8 shiftCount;
int8_t shiftCount;
if ( aSig0 == 0 ) {
shiftCount = countLeadingZeros64( aSig1 ) - 15;
@ -1096,7 +1096,7 @@ static void
*----------------------------------------------------------------------------*/
static inline float128
packFloat128( flag zSign, int32 zExp, uint64_t zSig0, uint64_t zSig1 )
packFloat128( flag zSign, int32_t zExp, uint64_t zSig0, uint64_t zSig1 )
{
float128 z;
@ -1127,11 +1127,11 @@ static inline float128
| overflow follows the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
static float128 roundAndPackFloat128(flag zSign, int32 zExp,
static float128 roundAndPackFloat128(flag zSign, int32_t zExp,
uint64_t zSig0, uint64_t zSig1,
uint64_t zSig2, float_status *status)
{
int8 roundingMode;
int8_t roundingMode;
flag roundNearestEven, increment, isTiny;
roundingMode = status->float_rounding_mode;
@ -1245,11 +1245,11 @@ static float128 roundAndPackFloat128(flag zSign, int32 zExp,
| point exponent.
*----------------------------------------------------------------------------*/
static float128 normalizeRoundAndPackFloat128(flag zSign, int32 zExp,
static float128 normalizeRoundAndPackFloat128(flag zSign, int32_t zExp,
uint64_t zSig0, uint64_t zSig1,
float_status *status)
{
int8 shiftCount;
int8_t shiftCount;
uint64_t zSig2;
if ( zSig0 == 0 ) {
@ -1296,8 +1296,8 @@ float32 int32_to_float32(int32_t a, float_status *status)
float64 int32_to_float64(int32_t a, float_status *status)
{
flag zSign;
uint32 absA;
int8 shiftCount;
uint32_t absA;
int8_t shiftCount;
uint64_t zSig;
if ( a == 0 ) return float64_zero;
@ -1319,8 +1319,8 @@ float64 int32_to_float64(int32_t a, float_status *status)
floatx80 int32_to_floatx80(int32_t a, float_status *status)
{
flag zSign;
uint32 absA;
int8 shiftCount;
uint32_t absA;
int8_t shiftCount;
uint64_t zSig;
if ( a == 0 ) return packFloatx80( 0, 0, 0 );
@ -1341,8 +1341,8 @@ floatx80 int32_to_floatx80(int32_t a, float_status *status)
float128 int32_to_float128(int32_t a, float_status *status)
{
flag zSign;
uint32 absA;
int8 shiftCount;
uint32_t absA;
int8_t shiftCount;
uint64_t zSig0;
if ( a == 0 ) return packFloat128( 0, 0, 0, 0 );
@ -1363,8 +1363,8 @@ float128 int32_to_float128(int32_t a, float_status *status)
float32 int64_to_float32(int64_t a, float_status *status)
{
flag zSign;
uint64 absA;
int8 shiftCount;
uint64_t absA;
int8_t shiftCount;
if ( a == 0 ) return float32_zero;
zSign = ( a < 0 );
@ -1414,8 +1414,8 @@ float64 int64_to_float64(int64_t a, float_status *status)
floatx80 int64_to_floatx80(int64_t a, float_status *status)
{
flag zSign;
uint64 absA;
int8 shiftCount;
uint64_t absA;
int8_t shiftCount;
if ( a == 0 ) return packFloatx80( 0, 0, 0 );
zSign = ( a < 0 );
@ -1434,9 +1434,9 @@ floatx80 int64_to_floatx80(int64_t a, float_status *status)
float128 int64_to_float128(int64_t a, float_status *status)
{
flag zSign;
uint64 absA;
int8 shiftCount;
int32 zExp;
uint64_t absA;
int8_t shiftCount;
int32_t zExp;
uint64_t zSig0, zSig1;
if ( a == 0 ) return packFloat128( 0, 0, 0, 0 );
@ -1541,7 +1541,7 @@ float128 uint64_to_float128(uint64_t a, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int32 float32_to_int32(float32 a, float_status *status)
int32_t float32_to_int32(float32 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -1572,7 +1572,7 @@ int32 float32_to_int32(float32 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int32 float32_to_int32_round_to_zero(float32 a, float_status *status)
int32_t float32_to_int32_round_to_zero(float32 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -1622,7 +1622,7 @@ int_fast16_t float32_to_int16_round_to_zero(float32 a, float_status *status)
flag aSign;
int_fast16_t aExp, shiftCount;
uint32_t aSig;
int32 z;
int32_t z;
aSig = extractFloat32Frac( a );
aExp = extractFloat32Exp( a );
@ -1666,7 +1666,7 @@ int_fast16_t float32_to_int16_round_to_zero(float32 a, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int64 float32_to_int64(float32 a, float_status *status)
int64_t float32_to_int64(float32 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -1705,7 +1705,7 @@ int64 float32_to_int64(float32 a, float_status *status)
| raise the inexact exception flag.
*----------------------------------------------------------------------------*/
uint64 float32_to_uint64(float32 a, float_status *status)
uint64_t float32_to_uint64(float32 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -1750,7 +1750,7 @@ uint64 float32_to_uint64(float32 a, float_status *status)
| not round to zero will raise the inexact flag.
*----------------------------------------------------------------------------*/
uint64 float32_to_uint64_round_to_zero(float32 a, float_status *status)
uint64_t float32_to_uint64_round_to_zero(float32 a, float_status *status)
{
signed char current_rounding_mode = status->float_rounding_mode;
set_float_rounding_mode(float_round_to_zero, status);
@ -1769,13 +1769,13 @@ uint64 float32_to_uint64_round_to_zero(float32 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int64 float32_to_int64_round_to_zero(float32 a, float_status *status)
int64_t float32_to_int64_round_to_zero(float32 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
uint32_t aSig;
uint64_t aSig64;
int64 z;
int64_t z;
a = float32_squash_input_denormal(a, status);
aSig = extractFloat32Frac( a );
@ -3073,7 +3073,7 @@ int float32_unordered_quiet(float32 a, float32 b, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int32 float64_to_int32(float64 a, float_status *status)
int32_t float64_to_int32(float64 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -3101,7 +3101,7 @@ int32 float64_to_int32(float64 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int32 float64_to_int32_round_to_zero(float64 a, float_status *status)
int32_t float64_to_int32_round_to_zero(float64 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -3155,7 +3155,7 @@ int_fast16_t float64_to_int16_round_to_zero(float64 a, float_status *status)
flag aSign;
int_fast16_t aExp, shiftCount;
uint64_t aSig, savedASig;
int32 z;
int32_t z;
aSig = extractFloat64Frac( a );
aExp = extractFloat64Exp( a );
@ -3201,7 +3201,7 @@ int_fast16_t float64_to_int16_round_to_zero(float64 a, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int64 float64_to_int64(float64 a, float_status *status)
int64_t float64_to_int64(float64 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
@ -3244,12 +3244,12 @@ int64 float64_to_int64(float64 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int64 float64_to_int64_round_to_zero(float64 a, float_status *status)
int64_t float64_to_int64_round_to_zero(float64 a, float_status *status)
{
flag aSign;
int_fast16_t aExp, shiftCount;
uint64_t aSig;
int64 z;
int64_t z;
a = float64_squash_input_denormal(a, status);
aSig = extractFloat64Frac( a );
@ -3368,7 +3368,7 @@ static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig)
| Binary Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
static float32 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
static float16 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
uint32_t zSig, flag ieee,
float_status *status)
{
@ -4790,10 +4790,10 @@ int float64_unordered_quiet(float64 a, float64 b, float_status *status)
| overflows, the largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int32 floatx80_to_int32(floatx80 a, float_status *status)
int32_t floatx80_to_int32(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig;
aSig = extractFloatx80Frac( a );
@ -4817,10 +4817,10 @@ int32 floatx80_to_int32(floatx80 a, float_status *status)
| sign as `a' is returned.
*----------------------------------------------------------------------------*/
int32 floatx80_to_int32_round_to_zero(floatx80 a, float_status *status)
int32_t floatx80_to_int32_round_to_zero(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig, savedASig;
int32_t z;
@ -4864,10 +4864,10 @@ int32 floatx80_to_int32_round_to_zero(floatx80 a, float_status *status)
| overflows, the largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int64 floatx80_to_int64(floatx80 a, float_status *status)
int64_t floatx80_to_int64(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig, aSigExtra;
aSig = extractFloatx80Frac( a );
@ -4904,12 +4904,12 @@ int64 floatx80_to_int64(floatx80 a, float_status *status)
| sign as `a' is returned.
*----------------------------------------------------------------------------*/
int64 floatx80_to_int64_round_to_zero(floatx80 a, float_status *status)
int64_t floatx80_to_int64_round_to_zero(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig;
int64 z;
int64_t z;
aSig = extractFloatx80Frac( a );
aExp = extractFloatx80Exp( a );
@ -4950,7 +4950,7 @@ int64 floatx80_to_int64_round_to_zero(floatx80 a, float_status *status)
float32 floatx80_to_float32(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t aSig;
aSig = extractFloatx80Frac( a );
@ -4978,7 +4978,7 @@ float32 floatx80_to_float32(floatx80 a, float_status *status)
float64 floatx80_to_float64(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t aSig, zSig;
aSig = extractFloatx80Frac( a );
@ -5030,7 +5030,7 @@ float128 floatx80_to_float128(floatx80 a, float_status *status)
floatx80 floatx80_round_to_int(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t lastBitMask, roundBitsMask;
floatx80 z;
@ -5125,9 +5125,9 @@ floatx80 floatx80_round_to_int(floatx80 a, float_status *status)
static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
float_status *status)
{
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig, bSig, zSig0, zSig1;
int32 expDiff;
int32_t expDiff;
aSig = extractFloatx80Frac( a );
aExp = extractFloatx80Exp( a );
@ -5194,9 +5194,9 @@ static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
static floatx80 subFloatx80Sigs(floatx80 a, floatx80 b, flag zSign,
float_status *status)
{
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig, bSig, zSig0, zSig1;
int32 expDiff;
int32_t expDiff;
floatx80 z;
aSig = extractFloatx80Frac( a );
@ -5305,7 +5305,7 @@ floatx80 floatx80_sub(floatx80 a, floatx80 b, float_status *status)
floatx80 floatx80_mul(floatx80 a, floatx80 b, float_status *status)
{
flag aSign, bSign, zSign;
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig, bSig, zSig0, zSig1;
floatx80 z;
@ -5364,7 +5364,7 @@ floatx80 floatx80_mul(floatx80 a, floatx80 b, float_status *status)
floatx80 floatx80_div(floatx80 a, floatx80 b, float_status *status)
{
flag aSign, bSign, zSign;
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig, bSig, zSig0, zSig1;
uint64_t rem0, rem1, rem2, term0, term1, term2;
floatx80 z;
@ -5448,7 +5448,7 @@ floatx80 floatx80_div(floatx80 a, floatx80 b, float_status *status)
floatx80 floatx80_rem(floatx80 a, floatx80 b, float_status *status)
{
flag aSign, zSign;
int32 aExp, bExp, expDiff;
int32_t aExp, bExp, expDiff;
uint64_t aSig0, aSig1, bSig;
uint64_t q, term0, term1, alternateASig0, alternateASig1;
floatx80 z;
@ -5546,7 +5546,7 @@ floatx80 floatx80_rem(floatx80 a, floatx80 b, float_status *status)
floatx80 floatx80_sqrt(floatx80 a, float_status *status)
{
flag aSign;
int32 aExp, zExp;
int32_t aExp, zExp;
uint64_t aSig0, aSig1, zSig0, zSig1, doubleZSig0;
uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3;
floatx80 z;
@ -5854,10 +5854,10 @@ int floatx80_unordered_quiet(floatx80 a, floatx80 b, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int32 float128_to_int32(float128 a, float_status *status)
int32_t float128_to_int32(float128 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig0, aSig1;
aSig1 = extractFloat128Frac1( a );
@ -5883,10 +5883,10 @@ int32 float128_to_int32(float128 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int32 float128_to_int32_round_to_zero(float128 a, float_status *status)
int32_t float128_to_int32_round_to_zero(float128 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig0, aSig1, savedASig;
int32_t z;
@ -5933,10 +5933,10 @@ int32 float128_to_int32_round_to_zero(float128 a, float_status *status)
| largest integer with the same sign as `a' is returned.
*----------------------------------------------------------------------------*/
int64 float128_to_int64(float128 a, float_status *status)
int64_t float128_to_int64(float128 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig0, aSig1;
aSig1 = extractFloat128Frac1( a );
@ -5976,12 +5976,12 @@ int64 float128_to_int64(float128 a, float_status *status)
| returned.
*----------------------------------------------------------------------------*/
int64 float128_to_int64_round_to_zero(float128 a, float_status *status)
int64_t float128_to_int64_round_to_zero(float128 a, float_status *status)
{
flag aSign;
int32 aExp, shiftCount;
int32_t aExp, shiftCount;
uint64_t aSig0, aSig1;
int64 z;
int64_t z;
aSig1 = extractFloat128Frac1( a );
aSig0 = extractFloat128Frac0( a );
@ -6039,7 +6039,7 @@ int64 float128_to_int64_round_to_zero(float128 a, float_status *status)
float32 float128_to_float32(float128 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t aSig0, aSig1;
uint32_t zSig;
@ -6074,7 +6074,7 @@ float32 float128_to_float32(float128 a, float_status *status)
float64 float128_to_float64(float128 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t aSig0, aSig1;
aSig1 = extractFloat128Frac1( a );
@ -6107,7 +6107,7 @@ float64 float128_to_float64(float128 a, float_status *status)
floatx80 float128_to_floatx80(float128 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t aSig0, aSig1;
aSig1 = extractFloat128Frac1( a );
@ -6142,7 +6142,7 @@ floatx80 float128_to_floatx80(float128 a, float_status *status)
float128 float128_round_to_int(float128 a, float_status *status)
{
flag aSign;
int32 aExp;
int32_t aExp;
uint64_t lastBitMask, roundBitsMask;
float128 z;
@ -6281,9 +6281,9 @@ float128 float128_round_to_int(float128 a, float_status *status)
static float128 addFloat128Sigs(float128 a, float128 b, flag zSign,
float_status *status)
{
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2;
int32 expDiff;
int32_t expDiff;
aSig1 = extractFloat128Frac1( a );
aSig0 = extractFloat128Frac0( a );
@ -6372,9 +6372,9 @@ static float128 addFloat128Sigs(float128 a, float128 b, flag zSign,
static float128 subFloat128Sigs(float128 a, float128 b, flag zSign,
float_status *status)
{
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1;
int32 expDiff;
int32_t expDiff;
float128 z;
aSig1 = extractFloat128Frac1( a );
@ -6503,7 +6503,7 @@ float128 float128_sub(float128 a, float128 b, float_status *status)
float128 float128_mul(float128 a, float128 b, float_status *status)
{
flag aSign, bSign, zSign;
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3;
float128 z;
@ -6569,7 +6569,7 @@ float128 float128_mul(float128 a, float128 b, float_status *status)
float128 float128_div(float128 a, float128 b, float_status *status)
{
flag aSign, bSign, zSign;
int32 aExp, bExp, zExp;
int32_t aExp, bExp, zExp;
uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2;
uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3;
float128 z;
@ -6659,7 +6659,7 @@ float128 float128_div(float128 a, float128 b, float_status *status)
float128 float128_rem(float128 a, float128 b, float_status *status)
{
flag aSign, zSign;
int32 aExp, bExp, expDiff;
int32_t aExp, bExp, expDiff;
uint64_t aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2;
uint64_t allZero, alternateASig0, alternateASig1, sigMean1;
int64_t sigMean0;
@ -6769,7 +6769,7 @@ float128 float128_rem(float128 a, float128 b, float_status *status)
float128 float128_sqrt(float128 a, float_status *status)
{
flag aSign;
int32 aExp, zExp;
int32_t aExp, zExp;
uint64_t aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0;
uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3;
float128 z;
@ -7080,10 +7080,10 @@ float64 uint32_to_float64(uint32_t a, float_status *status)
return int64_to_float64(a, status);
}
uint32 float32_to_uint32(float32 a, float_status *status)
uint32_t float32_to_uint32(float32 a, float_status *status)
{
int64_t v;
uint32 res;
uint32_t res;
int old_exc_flags = get_float_exception_flags(status);
v = float32_to_int64(a, status);
@ -7099,10 +7099,10 @@ uint32 float32_to_uint32(float32 a, float_status *status)
return res;
}
uint32 float32_to_uint32_round_to_zero(float32 a, float_status *status)
uint32_t float32_to_uint32_round_to_zero(float32 a, float_status *status)
{
int64_t v;
uint32 res;
uint32_t res;
int old_exc_flags = get_float_exception_flags(status);
v = float32_to_int64_round_to_zero(a, status);
@ -7177,10 +7177,10 @@ uint_fast16_t float32_to_uint16_round_to_zero(float32 a, float_status *status)
return res;
}
uint32 float64_to_uint32(float64 a, float_status *status)
uint32_t float64_to_uint32(float64 a, float_status *status)
{
uint64_t v;
uint32 res;
uint32_t res;
int old_exc_flags = get_float_exception_flags(status);
v = float64_to_uint64(a, status);
@ -7194,10 +7194,10 @@ uint32 float64_to_uint32(float64 a, float_status *status)
return res;
}
uint32 float64_to_uint32_round_to_zero(float64 a, float_status *status)
uint32_t float64_to_uint32_round_to_zero(float64 a, float_status *status)
{
uint64_t v;
uint32 res;
uint32_t res;
int old_exc_flags = get_float_exception_flags(status);
v = float64_to_uint64_round_to_zero(a, status);

View File

@ -1454,7 +1454,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
bool create_fdctrl,
bool no_vmport,
uint32 hpet_irqs)
uint32_t hpet_irqs)
{
int i;
DriveInfo *fd[MAX_FD];

View File

@ -405,7 +405,7 @@ static void ipmi_bt_class_init(IPMIInterfaceClass *iic)
typedef struct ISAIPMIBTDevice {
ISADevice dev;
int32 isairq;
int32_t isairq;
IPMIBT bt;
IPMIFwInfo fwinfo;
} ISAIPMIBTDevice;

View File

@ -368,7 +368,7 @@ static void ipmi_kcs_class_init(IPMIInterfaceClass *iic)
typedef struct ISAIPMIKCSDevice {
ISADevice dev;
int32 isairq;
int32_t isairq;
IPMIKCS kcs;
IPMIFwInfo fwinfo;
} ISAIPMIKCSDevice;

View File

@ -249,7 +249,7 @@ static void imx25_ccm_reset(DeviceState *dev)
static uint64_t imx25_ccm_read(void *opaque, hwaddr offset, unsigned size)
{
uint32 value = 0;
uint32_t value = 0;
IMX25CCMState *s = (IMX25CCMState *)opaque;
if (offset < 0x70) {

View File

@ -261,7 +261,7 @@ static void imx31_ccm_reset(DeviceState *dev)
static uint64_t imx31_ccm_read(void *opaque, hwaddr offset, unsigned size)
{
uint32 value = 0;
uint32_t value = 0;
IMX31CCMState *s = (IMX31CCMState *)opaque;
if ((offset >> 2) < IMX31_CCM_MAX_REG) {

View File

@ -49,7 +49,7 @@ vmw_shmem_rw(hwaddr addr, void *buf, int len, int is_write)
}
static inline void
vmw_shmem_set(hwaddr addr, uint8 val, int len)
vmw_shmem_set(hwaddr addr, uint8_t val, int len)
{
int i;
VMW_SHPRN("SHMEM set: %" PRIx64 ", len: %d (value 0x%X)", addr, len, val);

View File

@ -522,7 +522,7 @@ vmxnet3_dec_rx_completion_counter(VMXNET3State *s, int qidx)
vmxnet3_ring_dec(&s->rxq_descr[qidx].comp_ring);
}
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32 tx_ridx)
static void vmxnet3_complete_packet(VMXNET3State *s, int qidx, uint32_t tx_ridx)
{
struct Vmxnet3_TxCompDesc txcq_descr;

View File

@ -459,7 +459,7 @@ void spapr_hotplug_req_add_by_index(sPAPRDRConnector *drc)
{
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
sPAPRDRConnectorType drc_type = drck->get_type(drc);
uint32 index = drck->get_index(drc);
uint32_t index = drck->get_index(drc);
spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX,
RTAS_LOG_V6_HP_ACTION_ADD, drc_type, index);
@ -469,7 +469,7 @@ void spapr_hotplug_req_remove_by_index(sPAPRDRConnector *drc)
{
sPAPRDRConnectorClass *drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
sPAPRDRConnectorType drc_type = drck->get_type(drc);
uint32 index = drck->get_index(drc);
uint32_t index = drck->get_index(drc);
spapr_hotplug_req_event(RTAS_LOG_V6_HP_ID_DRC_INDEX,
RTAS_LOG_V6_HP_ACTION_REMOVE, drc_type, index);

View File

@ -90,21 +90,11 @@ this code that are retained.
#include "config-host.h"
#include "qemu/osdep.h"
/*----------------------------------------------------------------------------
| 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 most
| implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed
| to the same as `int'.
*----------------------------------------------------------------------------*/
/* This 'flag' type must be able to hold at least 0 and 1. It should
* probably be replaced with 'bool' but the uses would need to be audited
* to check that they weren't accidentally relying on it being a larger type.
*/
typedef uint8_t flag;
typedef uint8_t uint8;
typedef int8_t int8;
typedef unsigned int uint32;
typedef signed int int32;
typedef uint64_t uint64;
typedef int64_t int64;
#define LIT64( a ) a##LL
@ -282,7 +272,7 @@ static inline flag get_default_nan_mode(float_status *status)
| Routine to raise any or all of the software IEC/IEEE floating-point
| exception flags.
*----------------------------------------------------------------------------*/
void float_raise(int8 flags, float_status *status);
void float_raise(int8_t flags, float_status *status);
/*----------------------------------------------------------------------------
| If `a' is denormal and we are in flush-to-zero mode then set the
@ -376,14 +366,14 @@ int_fast16_t float32_to_int16(float32, float_status *status);
uint_fast16_t float32_to_uint16(float32, float_status *status);
int_fast16_t float32_to_int16_round_to_zero(float32, float_status *status);
uint_fast16_t float32_to_uint16_round_to_zero(float32, float_status *status);
int32 float32_to_int32(float32, float_status *status);
int32 float32_to_int32_round_to_zero(float32, float_status *status);
uint32 float32_to_uint32(float32, float_status *status);
uint32 float32_to_uint32_round_to_zero(float32, float_status *status);
int64 float32_to_int64(float32, float_status *status);
uint64 float32_to_uint64(float32, float_status *status);
uint64 float32_to_uint64_round_to_zero(float32, float_status *status);
int64 float32_to_int64_round_to_zero(float32, float_status *status);
int32_t float32_to_int32(float32, float_status *status);
int32_t float32_to_int32_round_to_zero(float32, float_status *status);
uint32_t float32_to_uint32(float32, float_status *status);
uint32_t float32_to_uint32_round_to_zero(float32, float_status *status);
int64_t float32_to_int64(float32, float_status *status);
uint64_t float32_to_uint64(float32, float_status *status);
uint64_t float32_to_uint64_round_to_zero(float32, float_status *status);
int64_t float32_to_int64_round_to_zero(float32, float_status *status);
float64 float32_to_float64(float32, float_status *status);
floatx80 float32_to_floatx80(float32, float_status *status);
float128 float32_to_float128(float32, float_status *status);
@ -488,14 +478,14 @@ int_fast16_t float64_to_int16(float64, float_status *status);
uint_fast16_t float64_to_uint16(float64, float_status *status);
int_fast16_t float64_to_int16_round_to_zero(float64, float_status *status);
uint_fast16_t float64_to_uint16_round_to_zero(float64, float_status *status);
int32 float64_to_int32(float64, float_status *status);
int32 float64_to_int32_round_to_zero(float64, float_status *status);
uint32 float64_to_uint32(float64, float_status *status);
uint32 float64_to_uint32_round_to_zero(float64, float_status *status);
int64 float64_to_int64(float64, float_status *status);
int64 float64_to_int64_round_to_zero(float64, float_status *status);
uint64 float64_to_uint64(float64 a, float_status *status);
uint64 float64_to_uint64_round_to_zero(float64 a, float_status *status);
int32_t float64_to_int32(float64, float_status *status);
int32_t float64_to_int32_round_to_zero(float64, float_status *status);
uint32_t float64_to_uint32(float64, float_status *status);
uint32_t float64_to_uint32_round_to_zero(float64, float_status *status);
int64_t float64_to_int64(float64, float_status *status);
int64_t float64_to_int64_round_to_zero(float64, float_status *status);
uint64_t float64_to_uint64(float64 a, float_status *status);
uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status);
float32 float64_to_float32(float64, float_status *status);
floatx80 float64_to_floatx80(float64, float_status *status);
float128 float64_to_float128(float64, float_status *status);
@ -596,10 +586,10 @@ extern const float64 float64_default_nan;
/*----------------------------------------------------------------------------
| Software IEC/IEEE extended double-precision conversion routines.
*----------------------------------------------------------------------------*/
int32 floatx80_to_int32(floatx80, float_status *status);
int32 floatx80_to_int32_round_to_zero(floatx80, float_status *status);
int64 floatx80_to_int64(floatx80, float_status *status);
int64 floatx80_to_int64_round_to_zero(floatx80, float_status *status);
int32_t floatx80_to_int32(floatx80, float_status *status);
int32_t floatx80_to_int32_round_to_zero(floatx80, float_status *status);
int64_t floatx80_to_int64(floatx80, float_status *status);
int64_t floatx80_to_int64_round_to_zero(floatx80, float_status *status);
float32 floatx80_to_float32(floatx80, float_status *status);
float64 floatx80_to_float64(floatx80, float_status *status);
float128 floatx80_to_float128(floatx80, float_status *status);
@ -681,10 +671,10 @@ extern const floatx80 floatx80_default_nan;
/*----------------------------------------------------------------------------
| Software IEC/IEEE quadruple-precision conversion routines.
*----------------------------------------------------------------------------*/
int32 float128_to_int32(float128, float_status *status);
int32 float128_to_int32_round_to_zero(float128, float_status *status);
int64 float128_to_int64(float128, float_status *status);
int64 float128_to_int64_round_to_zero(float128, float_status *status);
int32_t float128_to_int32(float128, float_status *status);
int32_t float128_to_int32_round_to_zero(float128, float_status *status);
int64_t float128_to_int64(float128, float_status *status);
int64_t float128_to_int64_round_to_zero(float128, float_status *status);
float32 float128_to_float32(float128, float_status *status);
float64 float128_to_float64(float128, float_status *status);
floatx80 float128_to_floatx80(float128, float_status *status);

View File

@ -258,7 +258,7 @@ void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
bool create_fdctrl,
bool no_vmport,
uint32 hpet_irqs);
uint32_t hpet_irqs);
void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
void pc_cmos_init(PCMachineState *pcms,
BusState *ide0, BusState *ide1,

View File

@ -265,7 +265,7 @@ struct DecompressParam {
QemuMutex mutex;
QemuCond cond;
void *des;
uint8 *compbuf;
uint8_t *compbuf;
int len;
};
typedef struct DecompressParam DecompressParam;

View File

@ -437,7 +437,7 @@ uint64_t helper_cvtqs(CPUAlphaState *env, uint64_t a)
return float32_to_s(fr);
}
/* Implement float64 to uint64 conversion without saturation -- we must
/* Implement float64 to uint64_t conversion without saturation -- we must
supply the truncated result. This behaviour is used by the compiler
to get unsigned conversion for free with the same instruction. */

View File

@ -277,7 +277,7 @@ static inline int kvm_mips_get_one_reg(CPUState *cs, uint64_t reg_id,
return kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &cp0reg);
}
static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64 reg_id,
static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64_t reg_id,
target_ulong *addr)
{
int ret;
@ -294,7 +294,7 @@ static inline int kvm_mips_get_one_ulreg(CPUState *cs, uint64 reg_id,
return ret;
}
static inline int kvm_mips_get_one_reg64(CPUState *cs, uint64 reg_id,
static inline int kvm_mips_get_one_reg64(CPUState *cs, uint64_t reg_id,
uint64_t *addr)
{
struct kvm_one_reg cp0reg = {

View File

@ -1604,7 +1604,7 @@ static inline int get_enabled_exceptions(const CPUMIPSState *env, int c)
return c & enable;
}
static inline float16 float16_from_float32(int32 a, flag ieee,
static inline float16 float16_from_float32(int32_t a, flag ieee,
float_status *status)
{
float16 f_val;
@ -1615,7 +1615,7 @@ static inline float16 float16_from_float32(int32 a, flag ieee,
return a < 0 ? (f_val | (1 << 15)) : f_val;
}
static inline float32 float32_from_float64(int64 a, float_status *status)
static inline float32 float32_from_float64(int64_t a, float_status *status)
{
float32 f_val;
@ -1636,7 +1636,7 @@ static inline float32 float32_from_float16(int16_t a, flag ieee,
return a < 0 ? (f_val | (1 << 31)) : f_val;
}
static inline float64 float64_from_float32(int32 a, float_status *status)
static inline float64 float64_from_float32(int32_t a, float_status *status)
{
float64 f_val;
@ -1657,7 +1657,7 @@ static inline float32 float32_from_q16(int16_t a, float_status *status)
return f_val;
}
static inline float64 float64_from_q32(int32 a, float_status *status)
static inline float64 float64_from_q32(int32_t a, float_status *status)
{
float64 f_val;
@ -1670,9 +1670,9 @@ static inline float64 float64_from_q32(int32 a, float_status *status)
static inline int16_t float32_to_q16(float32 a, float_status *status)
{
int32 q_val;
int32 q_min = 0xffff8000;
int32 q_max = 0x00007fff;
int32_t q_val;
int32_t q_min = 0xffff8000;
int32_t q_max = 0x00007fff;
int ieee_ex;
@ -1690,7 +1690,7 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
if (ieee_ex & float_flag_overflow) {
float_raise(float_flag_inexact, status);
return (int32)a < 0 ? q_min : q_max;
return (int32_t)a < 0 ? q_min : q_max;
}
/* conversion to int */
@ -1704,7 +1704,7 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
set_float_exception_flags(ieee_ex & (~float_flag_invalid)
, status);
float_raise(float_flag_overflow | float_flag_inexact, status);
return (int32)a < 0 ? q_min : q_max;
return (int32_t)a < 0 ? q_min : q_max;
}
if (q_val < q_min) {
@ -1720,11 +1720,11 @@ static inline int16_t float32_to_q16(float32 a, float_status *status)
return (int16_t)q_val;
}
static inline int32 float64_to_q32(float64 a, float_status *status)
static inline int32_t float64_to_q32(float64 a, float_status *status)
{
int64 q_val;
int64 q_min = 0xffffffff80000000LL;
int64 q_max = 0x000000007fffffffLL;
int64_t q_val;
int64_t q_min = 0xffffffff80000000LL;
int64_t q_max = 0x000000007fffffffLL;
int ieee_ex;
@ -1742,7 +1742,7 @@ static inline int32 float64_to_q32(float64 a, float_status *status)
if (ieee_ex & float_flag_overflow) {
float_raise(float_flag_inexact, status);
return (int64)a < 0 ? q_min : q_max;
return (int64_t)a < 0 ? q_min : q_max;
}
/* conversion to integer */
@ -1756,20 +1756,20 @@ static inline int32 float64_to_q32(float64 a, float_status *status)
set_float_exception_flags(ieee_ex & (~float_flag_invalid)
, status);
float_raise(float_flag_overflow | float_flag_inexact, status);
return (int64)a < 0 ? q_min : q_max;
return (int64_t)a < 0 ? q_min : q_max;
}
if (q_val < q_min) {
float_raise(float_flag_overflow | float_flag_inexact, status);
return (int32)q_min;
return (int32_t)q_min;
}
if (q_max < q_val) {
float_raise(float_flag_overflow | float_flag_inexact, status);
return (int32)q_max;
return (int32_t)q_max;
}
return (int32)q_val;
return (int32_t)q_val;
}
#define MSA_FLOAT_COND(DEST, OP, ARG1, ARG2, BITS, QUIET) \

View File

@ -1433,7 +1433,7 @@ static int kvm_s390_store_status(S390CPU *cpu, hwaddr addr, bool store_arch)
cpu_physical_memory_write(offsetof(LowCore, ar_access_id), &ar_id, 1);
}
for (i = 0; i < 16; ++i) {
*((uint64 *)mem + i) = get_freg(&cpu->env, i)->ll;
*((uint64_t *)mem + i) = get_freg(&cpu->env, i)->ll;
}
memcpy(mem + 128, &cpu->env.regs, 128);
memcpy(mem + 256, &cpu->env.psw, 16);

View File

@ -439,7 +439,7 @@ static void wait_for_log_fd(TestServer *s)
g_mutex_unlock(&s->data_mutex);
}
static void write_guest_mem(TestServer *s, uint32 seed)
static void write_guest_mem(TestServer *s, uint32_t seed)
{
uint32_t *guest_mem;
int i, j;