Based on the following Coccinelle patch: @@ typedef flag, bool; @@ -flag +bool
Also drop the comment block now that the last typedef is removed. Signed-off-by: Andreas Färber <afaer...@suse.de> --- fpu/softfloat-macros.h | 8 +- fpu/softfloat-specialize.h | 54 +++++----- fpu/softfloat.c | 278 ++++++++++++++++++++++---------------------- fpu/softfloat.h | 27 ++--- 4 files changed, 179 insertions(+), 188 deletions(-) diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h index b82871a..fe68176 100644 --- a/fpu/softfloat-macros.h +++ b/fpu/softfloat-macros.h @@ -702,7 +702,7 @@ static int_fast8_t countLeadingZeros64(uint64_t a) | Otherwise, returns 0. *----------------------------------------------------------------------------*/ -INLINE flag eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) +INLINE bool eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) { return ( a0 == b0 ) && ( a1 == b1 ); @@ -715,7 +715,7 @@ INLINE flag eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) | Otherwise, returns 0. *----------------------------------------------------------------------------*/ -INLINE flag le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) +INLINE bool le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) { return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) ); @@ -728,7 +728,7 @@ INLINE flag le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) | returns 0. *----------------------------------------------------------------------------*/ -INLINE flag lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) +INLINE bool lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) { return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) ); @@ -741,7 +741,7 @@ INLINE flag lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) | Otherwise, returns 0. *----------------------------------------------------------------------------*/ -INLINE flag ne128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) +INLINE bool ne128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 ) { return ( a0 != b0 ) || ( a1 != b1 ); diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index d57af1a..6fc24cf 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -123,7 +123,7 @@ void float_raise(int_fast8_t flags STATUS_PARAM) | Internal canonical NaN format. *----------------------------------------------------------------------------*/ typedef struct { - flag sign; + bool sign; uint64_t high, low; } commonNaNT; @@ -325,8 +325,8 @@ static float32 commonNaNToFloat32( commonNaNT a STATUS_PARAM) *----------------------------------------------------------------------------*/ #if defined(TARGET_ARM) -static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag aIsLargerSignificand) +static int pickNaN(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool aIsLargerSignificand) { /* ARM mandated NaN propagation rules: take the first of: * 1. A if it is signaling @@ -346,8 +346,8 @@ static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, } } #elif defined(TARGET_MIPS) -static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag aIsLargerSignificand) +static int pickNaN(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool aIsLargerSignificand) { /* According to MIPS specifications, if one of the two operands is * a sNaN, a new qNaN has to be generated. This is done in @@ -373,8 +373,8 @@ static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, } } #elif defined(TARGET_PPC) -static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag aIsLargerSignificand) +static int pickNaN(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool aIsLargerSignificand) { /* PowerPC propagation rules: * 1. A if it sNaN or qNaN @@ -388,8 +388,8 @@ static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, } } #else -static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag aIsLargerSignificand) +static int pickNaN(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool aIsLargerSignificand) { /* This implements x87 NaN propagation rules: * SNaN + QNaN => return the QNaN @@ -426,8 +426,8 @@ static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, | Return values : 0 : a; 1 : b; 2 : c; 3 : default-NaN *----------------------------------------------------------------------------*/ #if defined(TARGET_ARM) -static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag cIsQNaN, flag cIsSNaN, flag infzero STATUS_PARAM) +static int pickNaNMulAdd(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool cIsQNaN, bool cIsSNaN, bool infzero STATUS_PARAM) { /* For ARM, the (inf,zero,qnan) case sets InvalidOp and returns * the default NaN @@ -455,8 +455,8 @@ static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, } } #elif defined(TARGET_PPC) -static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag cIsQNaN, flag cIsSNaN, flag infzero STATUS_PARAM) +static int pickNaNMulAdd(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool cIsQNaN, bool cIsSNaN, bool infzero STATUS_PARAM) { /* For PPC, the (inf,zero,qnan) case sets InvalidOp, but we prefer * to return an input NaN if we have one (ie c) rather than generating @@ -482,8 +482,8 @@ static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, /* A default implementation: prefer a to b to c. * This is unlikely to actually match any real implementation. */ -static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, - flag cIsQNaN, flag cIsSNaN, flag infzero STATUS_PARAM) +static int pickNaNMulAdd(bool aIsQNaN, bool aIsSNaN, bool bIsQNaN, bool bIsSNaN, + bool cIsQNaN, bool cIsSNaN, bool infzero STATUS_PARAM) { if (aIsSNaN || aIsQNaN) { return 0; @@ -503,8 +503,8 @@ static int pickNaNMulAdd(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, static float32 propagateFloat32NaN( float32 a, float32 b STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; - flag aIsLargerSignificand; + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; + bool aIsLargerSignificand; uint32_t av, bv; aIsQuietNaN = float32_is_quiet_nan( a ); @@ -545,9 +545,9 @@ static float32 propagateFloat32NaN( float32 a, float32 b STATUS_PARAM) *----------------------------------------------------------------------------*/ static float32 propagateFloat32MulAddNaN(float32 a, float32 b, - float32 c, flag infzero STATUS_PARAM) + float32 c, bool infzero STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN, + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN, cIsQuietNaN, cIsSignalingNaN; int which; @@ -690,8 +690,8 @@ static float64 commonNaNToFloat64( commonNaNT a STATUS_PARAM) static float64 propagateFloat64NaN( float64 a, float64 b STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; - flag aIsLargerSignificand; + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; + bool aIsLargerSignificand; uint64_t av, bv; aIsQuietNaN = float64_is_quiet_nan( a ); @@ -732,9 +732,9 @@ static float64 propagateFloat64NaN( float64 a, float64 b STATUS_PARAM) *----------------------------------------------------------------------------*/ static float64 propagateFloat64MulAddNaN(float64 a, float64 b, - float64 c, flag infzero STATUS_PARAM) + float64 c, bool infzero STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN, + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN, cIsQuietNaN, cIsSignalingNaN; int which; @@ -897,8 +897,8 @@ static floatx80 commonNaNToFloatx80( commonNaNT a STATUS_PARAM) static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; - flag aIsLargerSignificand; + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; + bool aIsLargerSignificand; aIsQuietNaN = floatx80_is_quiet_nan( a ); aIsSignalingNaN = floatx80_is_signaling_nan( a ); @@ -1032,8 +1032,8 @@ static float128 commonNaNToFloat128( commonNaNT a STATUS_PARAM) static float128 propagateFloat128NaN( float128 a, float128 b STATUS_PARAM) { - flag aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; - flag aIsLargerSignificand; + bool aIsQuietNaN, aIsSignalingNaN, bIsQuietNaN, bIsSignalingNaN; + bool aIsLargerSignificand; aIsQuietNaN = float128_is_quiet_nan( a ); aIsSignalingNaN = float128_is_signaling_nan( a ); diff --git a/fpu/softfloat.c b/fpu/softfloat.c index e71a3c2..d5e2f8d 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -96,7 +96,7 @@ INLINE int_fast16_t extractFloat16Exp(float16 a) | Returns the sign bit of the single-precision floating-point value `a'. *----------------------------------------------------------------------------*/ -INLINE flag extractFloat16Sign(float16 a) +INLINE bool extractFloat16Sign(float16 a) { return float16_val(a)>>15; } @@ -112,10 +112,10 @@ INLINE flag extractFloat16Sign(float16 a) | positive or negative integer is returned. *----------------------------------------------------------------------------*/ -static int_fast32_t roundAndPackInt32(flag zSign, uint64_t absZ STATUS_PARAM) +static int_fast32_t roundAndPackInt32(bool zSign, uint64_t absZ STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven; + bool roundNearestEven; int_fast8_t roundIncrement, roundBits; int_fast32_t z; @@ -162,10 +162,10 @@ static int_fast32_t roundAndPackInt32(flag zSign, uint64_t absZ STATUS_PARAM) | returned. *----------------------------------------------------------------------------*/ -static int_fast64_t roundAndPackInt64(flag zSign, uint64_t absZ0, uint64_t absZ1 STATUS_PARAM) +static int_fast64_t roundAndPackInt64(bool zSign, uint64_t absZ0, uint64_t absZ1 STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven, increment; + bool roundNearestEven, increment; int_fast64_t z; roundingMode = STATUS(float_rounding_mode); @@ -229,7 +229,7 @@ INLINE int_fast16_t extractFloat32Exp(float32 a) | Returns the sign bit of the single-precision floating-point value `a'. *----------------------------------------------------------------------------*/ -INLINE flag extractFloat32Sign( float32 a ) +INLINE bool extractFloat32Sign( float32 a ) { return float32_val(a)>>31; @@ -280,7 +280,7 @@ static void | significand. *----------------------------------------------------------------------------*/ -INLINE float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig) +INLINE float32 packFloat32(bool zSign, int_fast16_t zExp, uint32_t zSig) { return make_float32( @@ -310,12 +310,12 @@ INLINE float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig) | Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig STATUS_PARAM) +static float32 roundAndPackFloat32(bool zSign, int_fast16_t zExp, uint32_t zSig STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven; + bool roundNearestEven; int_fast8_t roundIncrement, roundBits; - flag isTiny; + bool isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); @@ -376,7 +376,7 @@ static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig *----------------------------------------------------------------------------*/ static float32 - normalizeRoundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig STATUS_PARAM) + normalizeRoundAndPackFloat32(bool zSign, int_fast16_t zExp, uint32_t zSig STATUS_PARAM) { int_fast8_t shiftCount; @@ -411,7 +411,7 @@ INLINE int_fast16_t extractFloat64Exp(float64 a) | Returns the sign bit of the double-precision floating-point value `a'. *----------------------------------------------------------------------------*/ -INLINE flag extractFloat64Sign( float64 a ) +INLINE bool extractFloat64Sign( float64 a ) { return float64_val(a)>>63; @@ -462,7 +462,7 @@ static void | significand. *----------------------------------------------------------------------------*/ -INLINE float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig) +INLINE float64 packFloat64(bool zSign, int_fast16_t zExp, uint64_t zSig) { return make_float64( @@ -492,12 +492,12 @@ INLINE float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig) | Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig STATUS_PARAM) +static float64 roundAndPackFloat64(bool zSign, int_fast16_t zExp, uint64_t zSig STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven; + bool roundNearestEven; int_fast16_t roundIncrement, roundBits; - flag isTiny; + bool isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); @@ -558,7 +558,7 @@ static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig *----------------------------------------------------------------------------*/ static float64 - normalizeRoundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig STATUS_PARAM) + normalizeRoundAndPackFloat64(bool zSign, int_fast16_t zExp, uint64_t zSig STATUS_PARAM) { int_fast8_t shiftCount; @@ -596,7 +596,7 @@ INLINE int_fast32_t extractFloatx80Exp(floatx80 a) | `a'. *----------------------------------------------------------------------------*/ -INLINE flag extractFloatx80Sign( floatx80 a ) +INLINE bool extractFloatx80Sign( floatx80 a ) { return a.high>>15; @@ -626,7 +626,7 @@ static void | extended double-precision floating-point value, returning the result. *----------------------------------------------------------------------------*/ -INLINE floatx80 packFloatx80(flag zSign, int_fast32_t zExp, uint64_t zSig) +INLINE floatx80 packFloatx80(bool zSign, int_fast32_t zExp, uint64_t zSig) { floatx80 z; @@ -662,11 +662,11 @@ INLINE floatx80 packFloatx80(flag zSign, int_fast32_t zExp, uint64_t zSig) static floatx80 roundAndPackFloatx80( - int_fast8_t roundingPrecision, flag zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 + int_fast8_t roundingPrecision, bool zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven, increment, isTiny; + bool roundNearestEven, increment, isTiny; int_fast64_t roundIncrement, roundMask, roundBits; roundingMode = STATUS(float_rounding_mode); @@ -834,7 +834,7 @@ static floatx80 static floatx80 normalizeRoundAndPackFloatx80( - int_fast8_t roundingPrecision, flag zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 + int_fast8_t roundingPrecision, bool zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 STATUS_PARAM) { int_fast8_t shiftCount; @@ -892,7 +892,7 @@ INLINE int_fast32_t extractFloat128Exp(float128 a) | Returns the sign bit of the quadruple-precision floating-point value `a'. *----------------------------------------------------------------------------*/ -INLINE flag extractFloat128Sign( float128 a ) +INLINE bool extractFloat128Sign(float128 a) { return a.high>>63; @@ -954,7 +954,7 @@ static void *----------------------------------------------------------------------------*/ INLINE float128 - packFloat128(flag zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1) + packFloat128(bool zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1) { float128 z; @@ -987,10 +987,10 @@ INLINE float128 static float128 roundAndPackFloat128( - flag zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1, uint64_t zSig2 STATUS_PARAM) + bool zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1, uint64_t zSig2 STATUS_PARAM) { int_fast8_t roundingMode; - flag roundNearestEven, increment, isTiny; + bool roundNearestEven, increment, isTiny; roundingMode = STATUS(float_rounding_mode); roundNearestEven = ( roundingMode == float_round_nearest_even ); @@ -1091,7 +1091,7 @@ static float128 static float128 normalizeRoundAndPackFloat128( - flag zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 STATUS_PARAM) + bool zSign, int_fast32_t zExp, uint64_t zSig0, uint64_t zSig1 STATUS_PARAM) { int_fast8_t shiftCount; uint64_t zSig2; @@ -1123,7 +1123,7 @@ static float128 float32 int32_to_float32(int_fast32_t a STATUS_PARAM) { - flag zSign; + bool zSign; if ( a == 0 ) return float32_zero; if ( a == (int32_t) 0x80000000 ) return packFloat32( 1, 0x9E, 0 ); @@ -1140,7 +1140,7 @@ float32 int32_to_float32(int_fast32_t a STATUS_PARAM) float64 int32_to_float64(int_fast32_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast32_t absA; int_fast8_t shiftCount; uint64_t zSig; @@ -1163,7 +1163,7 @@ float64 int32_to_float64(int_fast32_t a STATUS_PARAM) floatx80 int32_to_floatx80(int_fast32_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast32_t absA; int_fast8_t shiftCount; uint64_t zSig; @@ -1185,7 +1185,7 @@ floatx80 int32_to_floatx80(int_fast32_t a STATUS_PARAM) float128 int32_to_float128(int_fast32_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast32_t absA; int_fast8_t shiftCount; uint64_t zSig0; @@ -1207,7 +1207,7 @@ float128 int32_to_float128(int_fast32_t a STATUS_PARAM) float32 int64_to_float32(int_fast64_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast64_t absA; int_fast8_t shiftCount; @@ -1260,7 +1260,7 @@ float32 uint64_to_float32(uint_fast64_t a STATUS_PARAM) float64 int64_to_float64(int_fast64_t a STATUS_PARAM) { - flag zSign; + bool zSign; if ( a == 0 ) return float64_zero; if ( a == (int64_t) LIT64( 0x8000000000000000 ) ) { @@ -1287,7 +1287,7 @@ float64 uint64_to_float64(uint_fast64_t a STATUS_PARAM) floatx80 int64_to_floatx80(int_fast64_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast64_t absA; int_fast8_t shiftCount; @@ -1307,7 +1307,7 @@ floatx80 int64_to_floatx80(int_fast64_t a STATUS_PARAM) float128 int64_to_float128(int_fast64_t a STATUS_PARAM) { - flag zSign; + bool zSign; uint_fast64_t absA; int_fast8_t shiftCount; int_fast32_t zExp; @@ -1344,7 +1344,7 @@ float128 int64_to_float128(int_fast64_t a STATUS_PARAM) int_fast32_t float32_to_int32(float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint32_t aSig; uint64_t aSig64; @@ -1375,7 +1375,7 @@ int_fast32_t float32_to_int32(float32 a STATUS_PARAM) int_fast32_t float32_to_int32_round_to_zero(float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint32_t aSig; int_fast32_t z; @@ -1418,7 +1418,7 @@ int_fast32_t float32_to_int32_round_to_zero(float32 a STATUS_PARAM) int_fast16_t float32_to_int16_round_to_zero(float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint32_t aSig; int_fast32_t z; @@ -1467,7 +1467,7 @@ int_fast16_t float32_to_int16_round_to_zero(float32 a STATUS_PARAM) int_fast64_t float32_to_int64(float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint32_t aSig; uint64_t aSig64, aSigExtra; @@ -1504,7 +1504,7 @@ int_fast64_t float32_to_int64(float32 a STATUS_PARAM) int_fast64_t float32_to_int64_round_to_zero(float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint32_t aSig; uint64_t aSig64; @@ -1548,7 +1548,7 @@ int_fast64_t float32_to_int64_round_to_zero(float32 a STATUS_PARAM) float64 float32_to_float64( float32 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; a = float32_squash_input_denormal(a STATUS_VAR); @@ -1578,7 +1578,7 @@ float64 float32_to_float64( float32 a STATUS_PARAM ) floatx80 float32_to_floatx80( float32 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; @@ -1608,7 +1608,7 @@ floatx80 float32_to_floatx80( float32 a STATUS_PARAM ) float128 float32_to_float128( float32 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; @@ -1638,7 +1638,7 @@ float128 float32_to_float128( float32 a STATUS_PARAM ) float32 float32_round_to_int( float32 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t lastBitMask, roundBitsMask; int_fast8_t roundingMode; @@ -1697,7 +1697,7 @@ float32 float32_round_to_int( float32 a STATUS_PARAM) | Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float32 addFloat32Sigs( float32 a, float32 b, flag zSign STATUS_PARAM) +static float32 addFloat32Sigs(float32 a, float32 b, bool zSign STATUS_PARAM) { int_fast16_t aExp, bExp, zExp; uint32_t aSig, bSig, zSig; @@ -1776,7 +1776,7 @@ static float32 addFloat32Sigs( float32 a, float32 b, flag zSign STATUS_PARAM) | Standard for Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float32 subFloat32Sigs( float32 a, float32 b, flag zSign STATUS_PARAM) +static float32 subFloat32Sigs(float32 a, float32 b, bool zSign STATUS_PARAM) { int_fast16_t aExp, bExp, zExp; uint32_t aSig, bSig, zSig; @@ -1851,7 +1851,7 @@ static float32 subFloat32Sigs( float32 a, float32 b, flag zSign STATUS_PARAM) float32 float32_add( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -1874,7 +1874,7 @@ float32 float32_add( float32 a, float32 b STATUS_PARAM ) float32 float32_sub( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -1897,7 +1897,7 @@ float32 float32_sub( float32 a, float32 b STATUS_PARAM ) float32 float32_mul( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast16_t aExp, bExp, zExp; uint32_t aSig, bSig; uint64_t zSig64; @@ -1960,7 +1960,7 @@ float32 float32_mul( float32 a, float32 b STATUS_PARAM ) float32 float32_div( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast16_t aExp, bExp, zExp; uint32_t aSig, bSig, zSig; a = float32_squash_input_denormal(a STATUS_VAR); @@ -2024,7 +2024,7 @@ float32 float32_div( float32 a, float32 b STATUS_PARAM ) float32 float32_rem( float32 a, float32 b STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast16_t aExp, bExp, expDiff; uint32_t aSig, bSig; uint32_t q; @@ -2130,14 +2130,14 @@ float32 float32_rem( float32 a, float32 b STATUS_PARAM ) float32 float32_muladd(float32 a, float32 b, float32 c, int flags STATUS_PARAM) { - flag aSign, bSign, cSign, zSign; + bool aSign, bSign, cSign, zSign; int_fast16_t aExp, bExp, cExp, pExp, zExp, expDiff; uint32_t aSig, bSig, cSig; - flag pInf, pZero, pSign; + bool pInf, pZero, pSign; uint64_t pSig64, cSig64, zSig64; uint32_t pSig; int shiftcount; - flag signflip, infzero; + bool signflip, infzero; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -2332,7 +2332,7 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags STATUS_PARAM) float32 float32_sqrt( float32 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp, zExp; uint32_t aSig, zSig; uint64_t rem, term; @@ -2418,7 +2418,7 @@ static const float64 float32_exp2_coefficients[15] = float32 float32_exp2( float32 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; float64 r, x, xn; @@ -2466,7 +2466,7 @@ float32 float32_exp2( float32 a STATUS_PARAM ) *----------------------------------------------------------------------------*/ float32 float32_log2( float32 a STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast16_t aExp; uint32_t aSig, zSig, i; @@ -2540,7 +2540,7 @@ int float32_eq( float32 a, float32 b STATUS_PARAM ) int float32_le( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint32_t av, bv; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -2569,7 +2569,7 @@ int float32_le( float32 a, float32 b STATUS_PARAM ) int float32_lt( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint32_t av, bv; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -2643,7 +2643,7 @@ int float32_eq_quiet( float32 a, float32 b STATUS_PARAM ) int float32_le_quiet( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint32_t av, bv; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -2674,7 +2674,7 @@ int float32_le_quiet( float32 a, float32 b STATUS_PARAM ) int float32_lt_quiet( float32 a, float32 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint32_t av, bv; a = float32_squash_input_denormal(a STATUS_VAR); b = float32_squash_input_denormal(b STATUS_VAR); @@ -2731,7 +2731,7 @@ int float32_unordered_quiet( float32 a, float32 b STATUS_PARAM ) int_fast32_t float64_to_int32(float64 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint64_t aSig; a = float64_squash_input_denormal(a STATUS_VAR); @@ -2759,7 +2759,7 @@ int_fast32_t float64_to_int32(float64 a STATUS_PARAM) int_fast32_t float64_to_int32_round_to_zero(float64 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint64_t aSig, savedASig; int_fast32_t z; @@ -2806,7 +2806,7 @@ int_fast32_t float64_to_int32_round_to_zero(float64 a STATUS_PARAM) int_fast16_t float64_to_int16_round_to_zero(float64 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint64_t aSig, savedASig; int_fast32_t z; @@ -2857,7 +2857,7 @@ int_fast16_t float64_to_int16_round_to_zero(float64 a STATUS_PARAM) int_fast64_t float64_to_int64(float64 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint64_t aSig, aSigExtra; a = float64_squash_input_denormal(a STATUS_VAR); @@ -2900,7 +2900,7 @@ int_fast64_t float64_to_int64(float64 a STATUS_PARAM) int_fast64_t float64_to_int64_round_to_zero(float64 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp, shiftCount; uint64_t aSig; int_fast64_t z; @@ -2950,7 +2950,7 @@ int_fast64_t float64_to_int64_round_to_zero(float64 a STATUS_PARAM) float32 float64_to_float32( float64 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint64_t aSig; uint32_t zSig; @@ -2984,7 +2984,7 @@ float32 float64_to_float32( float64 a STATUS_PARAM ) | than the desired result exponent whenever `zSig' is a complete, normalized | significand. *----------------------------------------------------------------------------*/ -static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig) +static float16 packFloat16(bool zSign, int_fast16_t zExp, uint16_t zSig) { return make_float16( (((uint32_t)zSign) << 15) + (((uint32_t)zExp) << 10) + zSig); @@ -2993,9 +2993,9 @@ static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig) /* Half precision floats come in two formats: standard IEEE and "ARM" format. The latter gains extra exponent range by omitting the NaN/Inf encodings. */ -float32 float16_to_float32(float16 a, flag ieee STATUS_PARAM) +float32 float16_to_float32(float16 a, bool ieee STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; @@ -3023,9 +3023,9 @@ float32 float16_to_float32(float16 a, flag ieee STATUS_PARAM) return packFloat32( aSign, aExp + 0x70, aSig << 13); } -float16 float32_to_float16(float32 a, flag ieee STATUS_PARAM) +float16 float32_to_float16(float32 a, bool ieee STATUS_PARAM) { - flag aSign; + bool aSign; int_fast16_t aExp; uint32_t aSig; uint32_t mask; @@ -3126,7 +3126,7 @@ float16 float32_to_float16(float32 a, flag ieee STATUS_PARAM) floatx80 float64_to_floatx80( float64 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint64_t aSig; @@ -3157,7 +3157,7 @@ floatx80 float64_to_floatx80( float64 a STATUS_PARAM ) float128 float64_to_float128( float64 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint64_t aSig, zSig0, zSig1; @@ -3188,7 +3188,7 @@ float128 float64_to_float128( float64 a STATUS_PARAM ) float64 float64_round_to_int( float64 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint64_t lastBitMask, roundBitsMask; int_fast8_t roundingMode; @@ -3260,7 +3260,7 @@ float64 float64_trunc_to_int( float64 a STATUS_PARAM) | Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float64 addFloat64Sigs( float64 a, float64 b, flag zSign STATUS_PARAM ) +static float64 addFloat64Sigs(float64 a, float64 b, bool zSign STATUS_PARAM) { int_fast16_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig; @@ -3339,7 +3339,7 @@ static float64 addFloat64Sigs( float64 a, float64 b, flag zSign STATUS_PARAM ) | Standard for Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float64 subFloat64Sigs( float64 a, float64 b, flag zSign STATUS_PARAM ) +static float64 subFloat64Sigs(float64 a, float64 b, bool zSign STATUS_PARAM) { int_fast16_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig; @@ -3414,7 +3414,7 @@ static float64 subFloat64Sigs( float64 a, float64 b, flag zSign STATUS_PARAM ) float64 float64_add( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -3437,7 +3437,7 @@ float64 float64_add( float64 a, float64 b STATUS_PARAM ) float64 float64_sub( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -3460,7 +3460,7 @@ float64 float64_sub( float64 a, float64 b STATUS_PARAM ) float64 float64_mul( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast16_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig0, zSig1; @@ -3521,7 +3521,7 @@ float64 float64_mul( float64 a, float64 b STATUS_PARAM ) float64 float64_div( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast16_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig; uint64_t rem0, rem1; @@ -3593,7 +3593,7 @@ float64 float64_div( float64 a, float64 b STATUS_PARAM ) float64 float64_rem( float64 a, float64 b STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast16_t aExp, bExp, expDiff; uint64_t aSig, bSig; uint64_t q, alternateASig; @@ -3684,13 +3684,13 @@ float64 float64_rem( float64 a, float64 b STATUS_PARAM ) float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM) { - flag aSign, bSign, cSign, zSign; + bool aSign, bSign, cSign, zSign; int_fast16_t aExp, bExp, cExp, pExp, zExp, expDiff; uint64_t aSig, bSig, cSig; - flag pInf, pZero, pSign; + bool pInf, pZero, pSign; uint64_t pSig0, pSig1, cSig0, cSig1, zSig0, zSig1; int shiftcount; - flag signflip, infzero; + bool signflip, infzero; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -3899,7 +3899,7 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags STATUS_PARAM) float64 float64_sqrt( float64 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp, zExp; uint64_t aSig, zSig, doubleZSig; uint64_t rem0, rem1, term0, term1; @@ -3950,7 +3950,7 @@ float64 float64_sqrt( float64 a STATUS_PARAM ) *----------------------------------------------------------------------------*/ float64 float64_log2( float64 a STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast16_t aExp; uint64_t aSig, aSig0, aSig1, zSig, i; a = float64_squash_input_denormal(a STATUS_VAR); @@ -4024,7 +4024,7 @@ int float64_eq( float64 a, float64 b STATUS_PARAM ) int float64_le( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint64_t av, bv; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -4053,7 +4053,7 @@ int float64_le( float64 a, float64 b STATUS_PARAM ) int float64_lt( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint64_t av, bv; a = float64_squash_input_denormal(a STATUS_VAR); @@ -4130,7 +4130,7 @@ int float64_eq_quiet( float64 a, float64 b STATUS_PARAM ) int float64_le_quiet( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint64_t av, bv; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -4161,7 +4161,7 @@ int float64_le_quiet( float64 a, float64 b STATUS_PARAM ) int float64_lt_quiet( float64 a, float64 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; uint64_t av, bv; a = float64_squash_input_denormal(a STATUS_VAR); b = float64_squash_input_denormal(b STATUS_VAR); @@ -4218,7 +4218,7 @@ int float64_unordered_quiet( float64 a, float64 b STATUS_PARAM ) int_fast32_t floatx80_to_int32(floatx80 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig; @@ -4245,7 +4245,7 @@ int_fast32_t floatx80_to_int32(floatx80 a STATUS_PARAM) int_fast32_t floatx80_to_int32_round_to_zero(floatx80 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig, savedASig; int_fast32_t z; @@ -4290,7 +4290,7 @@ int_fast32_t floatx80_to_int32_round_to_zero(floatx80 a STATUS_PARAM) int_fast64_t floatx80_to_int64(floatx80 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig, aSigExtra; @@ -4330,7 +4330,7 @@ int_fast64_t floatx80_to_int64(floatx80 a STATUS_PARAM) int_fast64_t floatx80_to_int64_round_to_zero(floatx80 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig; int_fast64_t z; @@ -4371,7 +4371,7 @@ int_fast64_t floatx80_to_int64_round_to_zero(floatx80 a STATUS_PARAM) float32 floatx80_to_float32( floatx80 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t aSig; @@ -4399,7 +4399,7 @@ float32 floatx80_to_float32( floatx80 a STATUS_PARAM ) float64 floatx80_to_float64( floatx80 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t aSig, zSig; @@ -4427,7 +4427,7 @@ float64 floatx80_to_float64( floatx80 a STATUS_PARAM ) float128 floatx80_to_float128( floatx80 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast16_t aExp; uint64_t aSig, zSig0, zSig1; @@ -4451,7 +4451,7 @@ float128 floatx80_to_float128( floatx80 a STATUS_PARAM ) floatx80 floatx80_round_to_int( floatx80 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t lastBitMask, roundBitsMask; int_fast8_t roundingMode; @@ -4523,7 +4523,7 @@ floatx80 floatx80_round_to_int( floatx80 a STATUS_PARAM ) | Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STATUS_PARAM) +static floatx80 addFloatx80Sigs(floatx80 a, floatx80 b, bool zSign STATUS_PARAM) { int_fast32_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig0, zSig1; @@ -4589,7 +4589,7 @@ static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STATUS_PARAM | Standard for Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STATUS_PARAM ) +static floatx80 subFloatx80Sigs(floatx80 a, floatx80 b, bool zSign STATUS_PARAM) { int_fast32_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig0, zSig1; @@ -4657,7 +4657,7 @@ static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign STATUS_PARAM floatx80 floatx80_add( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; aSign = extractFloatx80Sign( a ); bSign = extractFloatx80Sign( b ); @@ -4678,7 +4678,7 @@ floatx80 floatx80_add( floatx80 a, floatx80 b STATUS_PARAM ) floatx80 floatx80_sub( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; aSign = extractFloatx80Sign( a ); bSign = extractFloatx80Sign( b ); @@ -4699,7 +4699,7 @@ floatx80 floatx80_sub( floatx80 a, floatx80 b STATUS_PARAM ) floatx80 floatx80_mul( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast32_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig0, zSig1; floatx80 z; @@ -4758,7 +4758,7 @@ floatx80 floatx80_mul( floatx80 a, floatx80 b STATUS_PARAM ) floatx80 floatx80_div( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast32_t aExp, bExp, zExp; uint64_t aSig, bSig, zSig0, zSig1; uint64_t rem0, rem1, rem2, term0, term1, term2; @@ -4838,7 +4838,7 @@ floatx80 floatx80_div( floatx80 a, floatx80 b STATUS_PARAM ) floatx80 floatx80_rem( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast32_t aExp, bExp, expDiff; uint64_t aSig0, aSig1, bSig; uint64_t q, term0, term1, alternateASig0, alternateASig1; @@ -4934,7 +4934,7 @@ floatx80 floatx80_rem( floatx80 a, floatx80 b STATUS_PARAM ) floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp, zExp; uint64_t aSig0, aSig1, zSig0, zSig1, doubleZSig0; uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3; @@ -5033,7 +5033,7 @@ int floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM ) int floatx80_le( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) && (uint64_t) ( extractFloatx80Frac( a )<<1 ) ) @@ -5066,7 +5066,7 @@ int floatx80_le( floatx80 a, floatx80 b STATUS_PARAM ) int floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) && (uint64_t) ( extractFloatx80Frac( a )<<1 ) ) @@ -5148,7 +5148,7 @@ int floatx80_eq_quiet( floatx80 a, floatx80 b STATUS_PARAM ) int floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) && (uint64_t) ( extractFloatx80Frac( a )<<1 ) ) @@ -5184,7 +5184,7 @@ int floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM ) int floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) && (uint64_t) ( extractFloatx80Frac( a )<<1 ) ) @@ -5245,7 +5245,7 @@ int floatx80_unordered_quiet( floatx80 a, floatx80 b STATUS_PARAM ) int_fast32_t float128_to_int32(float128 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig0, aSig1; @@ -5274,7 +5274,7 @@ int_fast32_t float128_to_int32(float128 a STATUS_PARAM) int_fast32_t float128_to_int32_round_to_zero(float128 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig0, aSig1, savedASig; int_fast32_t z; @@ -5322,7 +5322,7 @@ int_fast32_t float128_to_int32_round_to_zero(float128 a STATUS_PARAM) int_fast64_t float128_to_int64(float128 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig0, aSig1; @@ -5365,7 +5365,7 @@ int_fast64_t float128_to_int64(float128 a STATUS_PARAM) int_fast64_t float128_to_int64_round_to_zero(float128 a STATUS_PARAM) { - flag aSign; + bool aSign; int_fast32_t aExp, shiftCount; uint64_t aSig0, aSig1; int_fast64_t z; @@ -5423,7 +5423,7 @@ int_fast64_t float128_to_int64_round_to_zero(float128 a STATUS_PARAM) float32 float128_to_float32( float128 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t aSig0, aSig1; uint32_t zSig; @@ -5458,7 +5458,7 @@ float32 float128_to_float32( float128 a STATUS_PARAM ) float64 float128_to_float64( float128 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t aSig0, aSig1; @@ -5491,7 +5491,7 @@ float64 float128_to_float64( float128 a STATUS_PARAM ) floatx80 float128_to_floatx80( float128 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t aSig0, aSig1; @@ -5526,7 +5526,7 @@ floatx80 float128_to_floatx80( float128 a STATUS_PARAM ) float128 float128_round_to_int( float128 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp; uint64_t lastBitMask, roundBitsMask; int_fast8_t roundingMode; @@ -5628,7 +5628,7 @@ float128 float128_round_to_int( float128 a STATUS_PARAM ) | Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float128 addFloat128Sigs( float128 a, float128 b, flag zSign STATUS_PARAM) +static float128 addFloat128Sigs(float128 a, float128 b, bool zSign STATUS_PARAM) { int_fast32_t aExp, bExp, zExp; uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; @@ -5714,7 +5714,7 @@ static float128 addFloat128Sigs( float128 a, float128 b, flag zSign STATUS_PARAM | Standard for Binary Floating-Point Arithmetic. *----------------------------------------------------------------------------*/ -static float128 subFloat128Sigs( float128 a, float128 b, flag zSign STATUS_PARAM) +static float128 subFloat128Sigs(float128 a, float128 b, bool zSign STATUS_PARAM) { int_fast32_t aExp, bExp, zExp; uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1; @@ -5798,7 +5798,7 @@ static float128 subFloat128Sigs( float128 a, float128 b, flag zSign STATUS_PARAM float128 float128_add( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; aSign = extractFloat128Sign( a ); bSign = extractFloat128Sign( b ); @@ -5819,7 +5819,7 @@ float128 float128_add( float128 a, float128 b STATUS_PARAM ) float128 float128_sub( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; aSign = extractFloat128Sign( a ); bSign = extractFloat128Sign( b ); @@ -5840,7 +5840,7 @@ float128 float128_sub( float128 a, float128 b STATUS_PARAM ) float128 float128_mul( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast32_t aExp, bExp, zExp; uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2, zSig3; float128 z; @@ -5904,7 +5904,7 @@ float128 float128_mul( float128 a, float128 b STATUS_PARAM ) float128 float128_div( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign, zSign; + bool aSign, bSign, zSign; int_fast32_t aExp, bExp, zExp; uint64_t aSig0, aSig1, bSig0, bSig1, zSig0, zSig1, zSig2; uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3; @@ -5988,7 +5988,7 @@ float128 float128_div( float128 a, float128 b STATUS_PARAM ) float128 float128_rem( float128 a, float128 b STATUS_PARAM ) { - flag aSign, zSign; + bool aSign, zSign; int_fast32_t aExp, bExp, expDiff; uint64_t aSig0, aSig1, bSig0, bSig1, q, term0, term1, term2; uint64_t allZero, alternateASig0, alternateASig1, sigMean1; @@ -6097,7 +6097,7 @@ float128 float128_rem( float128 a, float128 b STATUS_PARAM ) float128 float128_sqrt( float128 a STATUS_PARAM ) { - flag aSign; + bool aSign; int_fast32_t aExp, zExp; uint64_t aSig0, aSig1, zSig0, zSig1, zSig2, doubleZSig0; uint64_t rem0, rem1, rem2, rem3, term0, term1, term2, term3; @@ -6194,7 +6194,7 @@ int float128_eq( float128 a, float128 b STATUS_PARAM ) int float128_le( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) @@ -6227,7 +6227,7 @@ int float128_le( float128 a, float128 b STATUS_PARAM ) int float128_lt( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) @@ -6310,7 +6310,7 @@ int float128_eq_quiet( float128 a, float128 b STATUS_PARAM ) int float128_le_quiet( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) @@ -6346,7 +6346,7 @@ int float128_le_quiet( float128 a, float128 b STATUS_PARAM ) int float128_lt_quiet( float128 a, float128 b STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) @@ -6542,7 +6542,7 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) INLINE int float ## s ## _compare_internal( float ## s a, float ## s b, \ int is_quiet STATUS_PARAM ) \ { \ - flag aSign, bSign; \ + bool aSign, bSign; \ uint ## s ## _t av, bv; \ a = float ## s ## _squash_input_denormal(a STATUS_VAR); \ b = float ## s ## _squash_input_denormal(b STATUS_VAR); \ @@ -6594,7 +6594,7 @@ COMPARE(64, 0x7ff) INLINE int floatx80_compare_internal( floatx80 a, floatx80 b, int is_quiet STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if (( ( extractFloatx80Exp( a ) == 0x7fff ) && ( extractFloatx80Frac( a )<<1 ) ) || @@ -6640,7 +6640,7 @@ int floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM ) INLINE int float128_compare_internal( float128 a, float128 b, int is_quiet STATUS_PARAM ) { - flag aSign, bSign; + bool aSign, bSign; if (( ( extractFloat128Exp( a ) == 0x7fff ) && ( extractFloat128Frac0( a ) | extractFloat128Frac1( a ) ) ) || @@ -6689,7 +6689,7 @@ int float128_compare_quiet( float128 a, float128 b STATUS_PARAM ) INLINE float ## s float ## s ## _minmax(float ## s a, float ## s b, \ int ismin STATUS_PARAM ) \ { \ - flag aSign, bSign; \ + bool aSign, bSign; \ uint ## s ## _t av, bv; \ a = float ## s ## _squash_input_denormal(a STATUS_VAR); \ b = float ## s ## _squash_input_denormal(b STATUS_VAR); \ @@ -6733,7 +6733,7 @@ MINMAX(64, 0x7ff) /* Multiply A by 2 raised to the power N. */ float32 float32_scalbn( float32 a, int n STATUS_PARAM ) { - flag aSign; + bool aSign; int16_t aExp; uint32_t aSig; @@ -6766,7 +6766,7 @@ float32 float32_scalbn( float32 a, int n STATUS_PARAM ) float64 float64_scalbn( float64 a, int n STATUS_PARAM ) { - flag aSign; + bool aSign; int16_t aExp; uint64_t aSig; @@ -6799,7 +6799,7 @@ float64 float64_scalbn( float64 a, int n STATUS_PARAM ) floatx80 floatx80_scalbn( floatx80 a, int n STATUS_PARAM ) { - flag aSign; + bool aSign; int32_t aExp; uint64_t aSig; @@ -6830,7 +6830,7 @@ floatx80 floatx80_scalbn( floatx80 a, int n STATUS_PARAM ) float128 float128_scalbn( float128 a, int n STATUS_PARAM ) { - flag aSign; + bool aSign; int32_t aExp; uint64_t aSig0, aSig1; diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 0c43436..257733d 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -43,19 +43,10 @@ these four paragraphs for those parts of this code that are retained. #endif #include <inttypes.h> +#include <stdbool.h> #include "config-host.h" #include "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'. -*----------------------------------------------------------------------------*/ -typedef uint8_t flag; - #define LIT64( a ) a##LL #define INLINE static inline @@ -166,10 +157,10 @@ typedef struct float_status { signed char float_exception_flags; signed char floatx80_rounding_precision; /* should denormalised results go to zero and set the inexact flag? */ - flag flush_to_zero; + bool flush_to_zero; /* should denormalised inputs go to zero and set the input_denormal flag? */ - flag flush_inputs_to_zero; - flag default_nan_mode; + bool flush_inputs_to_zero; + bool default_nan_mode; } float_status; void set_float_rounding_mode(int val STATUS_PARAM); @@ -178,15 +169,15 @@ INLINE void set_float_detect_tininess(int val STATUS_PARAM) { STATUS(float_detect_tininess) = val; } -INLINE void set_flush_to_zero(flag val STATUS_PARAM) +INLINE void set_flush_to_zero(bool val STATUS_PARAM) { STATUS(flush_to_zero) = val; } -INLINE void set_flush_inputs_to_zero(flag val STATUS_PARAM) +INLINE void set_flush_inputs_to_zero(bool val STATUS_PARAM) { STATUS(flush_inputs_to_zero) = val; } -INLINE void set_default_nan_mode(flag val STATUS_PARAM) +INLINE void set_default_nan_mode(bool val STATUS_PARAM) { STATUS(default_nan_mode) = val; } @@ -233,8 +224,8 @@ float128 int64_to_float128(int_fast64_t STATUS_PARAM); /*---------------------------------------------------------------------------- | Software half-precision conversion routines. *----------------------------------------------------------------------------*/ -float16 float32_to_float16( float32, flag STATUS_PARAM ); -float32 float16_to_float32( float16, flag STATUS_PARAM ); +float16 float32_to_float16(float32, bool STATUS_PARAM); +float32 float16_to_float32(float16, bool STATUS_PARAM); /*---------------------------------------------------------------------------- | Software half-precision operations. -- 1.7.7