diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /3rdparty/softfloat | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to '3rdparty/softfloat')
-rw-r--r-- | 3rdparty/softfloat/fsincos.c | 30 | ||||
-rw-r--r-- | 3rdparty/softfloat/fyl2x.c | 44 | ||||
-rw-r--r-- | 3rdparty/softfloat/mamesf.h | 34 |
3 files changed, 54 insertions, 54 deletions
diff --git a/3rdparty/softfloat/fsincos.c b/3rdparty/softfloat/fsincos.c index 1adb689e32b..742c07f2b3b 100644 --- a/3rdparty/softfloat/fsincos.c +++ b/3rdparty/softfloat/fsincos.c @@ -95,7 +95,7 @@ INLINE floatx80 propagateFloatx80NaNOneArg(floatx80 a) | `zSigPtr', respectively. *----------------------------------------------------------------------------*/ -void normalizeFloatx80Subnormal(UINT64 aSig, INT32 *zExpPtr, UINT64 *zSigPtr) +void normalizeFloatx80Subnormal(uint64_t aSig, int32_t *zExpPtr, uint64_t *zSigPtr) { int shiftCount = countLeadingZeros64(aSig); *zSigPtr = aSig<<shiftCount; @@ -104,16 +104,16 @@ void normalizeFloatx80Subnormal(UINT64 aSig, INT32 *zExpPtr, UINT64 *zSigPtr) /* reduce trigonometric function argument using 128-bit precision M_PI approximation */ -static UINT64 argument_reduction_kernel(UINT64 aSig0, int Exp, UINT64 *zSig0, UINT64 *zSig1) +static uint64_t argument_reduction_kernel(uint64_t aSig0, int Exp, uint64_t *zSig0, uint64_t *zSig1) { - UINT64 term0, term1, term2; - UINT64 aSig1 = 0; + uint64_t term0, term1, term2; + uint64_t aSig1 = 0; shortShift128Left(aSig1, aSig0, Exp, &aSig1, &aSig0); - UINT64 q = estimateDiv128To64(aSig1, aSig0, FLOAT_PI_HI); + uint64_t q = estimateDiv128To64(aSig1, aSig0, FLOAT_PI_HI); mul128By64To192(FLOAT_PI_HI, FLOAT_PI_LO, q, &term0, &term1, &term2); sub128(aSig1, aSig0, term0, term1, zSig1, zSig0); - while ((INT64)(*zSig1) < 0) { + while ((int64_t)(*zSig1) < 0) { --q; add192(*zSig1, *zSig0, term2, 0, FLOAT_PI_HI, FLOAT_PI_LO, zSig1, zSig0, &term2); } @@ -121,9 +121,9 @@ static UINT64 argument_reduction_kernel(UINT64 aSig0, int Exp, UINT64 *zSig0, UI return q; } -static int reduce_trig_arg(int expDiff, int &zSign, UINT64 &aSig0, UINT64 &aSig1) +static int reduce_trig_arg(int expDiff, int &zSign, uint64_t &aSig0, uint64_t &aSig1) { - UINT64 term0, term1, q = 0; + uint64_t term0, term1, q = 0; if (expDiff < 0) { shift128Right(aSig0, 0, 1, &aSig0, &aSig1); @@ -251,7 +251,7 @@ INLINE void sincos_tiny_argument(floatx80 *sin_a, floatx80 *cos_a, floatx80 a) if (cos_a) *cos_a = floatx80_one; } -static floatx80 sincos_approximation(int neg, float128 r, UINT64 quotient) +static floatx80 sincos_approximation(int neg, float128 r, uint64_t quotient) { if (quotient & 0x1) { r = poly_cos(r); @@ -292,8 +292,8 @@ static floatx80 sincos_approximation(int neg, float128 r, UINT64 quotient) int sf_fsincos(floatx80 a, floatx80 *sin_a, floatx80 *cos_a) { - UINT64 aSig0, aSig1 = 0; - INT32 aExp, zExp, expDiff; + uint64_t aSig0, aSig1 = 0; + int32_t aExp, zExp, expDiff; int aSign, zSign; int q = 0; @@ -303,7 +303,7 @@ int sf_fsincos(floatx80 a, floatx80 *sin_a, floatx80 *cos_a) /* invalid argument */ if (aExp == 0x7FFF) { - if ((UINT64) (aSig0<<1)) { + if ((uint64_t) (aSig0<<1)) { sincos_invalid(sin_a, cos_a, propagateFloatx80NaNOneArg(a)); return 0; } @@ -409,8 +409,8 @@ int floatx80_fcos(floatx80 &a) int floatx80_ftan(floatx80 &a) { - UINT64 aSig0, aSig1 = 0; - INT32 aExp, zExp, expDiff; + uint64_t aSig0, aSig1 = 0; + int32_t aExp, zExp, expDiff; int aSign, zSign; int q = 0; @@ -420,7 +420,7 @@ int floatx80_ftan(floatx80 &a) /* invalid argument */ if (aExp == 0x7FFF) { - if ((UINT64) (aSig0<<1)) + if ((uint64_t) (aSig0<<1)) { a = propagateFloatx80NaNOneArg(a); return 0; diff --git a/3rdparty/softfloat/fyl2x.c b/3rdparty/softfloat/fyl2x.c index d1aeb329afd..d7c5baa3e70 100644 --- a/3rdparty/softfloat/fyl2x.c +++ b/3rdparty/softfloat/fyl2x.c @@ -100,7 +100,7 @@ INLINE floatx80 propagateFloatx80NaNOneArg(floatx80 a) | `zSigPtr', respectively. *----------------------------------------------------------------------------*/ -INLINE void normalizeFloatx80Subnormal(UINT64 aSig, INT32 *zExpPtr, UINT64 *zSigPtr) +INLINE void normalizeFloatx80Subnormal(uint64_t aSig, int32_t *zExpPtr, uint64_t *zSigPtr) { int shiftCount = countLeadingZeros64(aSig); *zSigPtr = aSig<<shiftCount; @@ -115,7 +115,7 @@ INLINE void normalizeFloatx80Subnormal(UINT64 aSig, INT32 *zExpPtr, UINT64 *zSig INLINE int floatx80_is_nan(floatx80 a) { - return ((a.high & 0x7FFF) == 0x7FFF) && (INT64) (a.low<<1); + return ((a.high & 0x7FFF) == 0x7FFF) && (int64_t) (a.low<<1); } /*---------------------------------------------------------------------------- @@ -253,18 +253,18 @@ static float128 poly_l2p1(float128 x) static floatx80 fyl2x(floatx80 a, floatx80 b) { - UINT64 aSig = extractFloatx80Frac(a); - INT32 aExp = extractFloatx80Exp(a); + uint64_t aSig = extractFloatx80Frac(a); + int32_t aExp = extractFloatx80Exp(a); int aSign = extractFloatx80Sign(a); - UINT64 bSig = extractFloatx80Frac(b); - INT32 bExp = extractFloatx80Exp(b); + uint64_t bSig = extractFloatx80Frac(b); + int32_t bExp = extractFloatx80Exp(b); int bSign = extractFloatx80Sign(b); int zSign = bSign ^ 1; if (aExp == 0x7FFF) { - if ((UINT64) (aSig<<1) - || ((bExp == 0x7FFF) && (UINT64) (bSig<<1))) + if ((uint64_t) (aSig<<1) + || ((bExp == 0x7FFF) && (uint64_t) (bSig<<1))) { return propagateFloatx80NaN(a, b); } @@ -284,14 +284,14 @@ invalid: } if (bExp == 0x7FFF) { - if ((UINT64) (bSig<<1)) return propagateFloatx80NaN(a, b); - if (aSign && (UINT64)(aExp | aSig)) goto invalid; + if ((uint64_t) (bSig<<1)) return propagateFloatx80NaN(a, b); + if (aSign && (uint64_t)(aExp | aSig)) goto invalid; if (aSig && (aExp == 0)) float_raise(float_flag_denormal); if (aExp < 0x3FFF) { return packFloatx80(zSign, 0x7FFF, U64(0x8000000000000000)); } - if (aExp == 0x3FFF && ((UINT64) (aSig<<1) == 0)) goto invalid; + if (aExp == 0x3FFF && ((uint64_t) (aSig<<1) == 0)) goto invalid; return packFloatx80(bSign, 0x7FFF, U64(0x8000000000000000)); } if (aExp == 0) { @@ -313,7 +313,7 @@ invalid: float_raise(float_flag_denormal); normalizeFloatx80Subnormal(bSig, &bExp, &bSig); } - if (aExp == 0x3FFF && ((UINT64) (aSig<<1) == 0)) + if (aExp == 0x3FFF && ((uint64_t) (aSig<<1) == 0)) return packFloatx80(bSign, 0, 0); float_raise(float_flag_inexact); @@ -329,11 +329,11 @@ invalid: /* using float128 for approximation */ /* ******************************** */ - UINT64 zSig0, zSig1; + uint64_t zSig0, zSig1; shift128Right(aSig<<1, 0, 16, &zSig0, &zSig1); float128 x = packFloat128(0, aExp+0x3FFF, zSig0, zSig1); x = poly_l2(x); - x = float128_add(x, int64_to_float128((INT64) ExpDiff)); + x = float128_add(x, int64_to_float128((int64_t) ExpDiff)); return floatx80_mul(b, float128_to_floatx80(x)); } @@ -364,8 +364,8 @@ invalid: floatx80 fyl2xp1(floatx80 a, floatx80 b) { - INT32 aExp, bExp; - UINT64 aSig, bSig, zSig0, zSig1, zSig2; + int32_t aExp, bExp; + uint64_t aSig, bSig, zSig0, zSig1, zSig2; int aSign, bSign; aSig = extractFloatx80Frac(a); @@ -377,8 +377,8 @@ floatx80 fyl2xp1(floatx80 a, floatx80 b) int zSign = aSign ^ bSign; if (aExp == 0x7FFF) { - if ((UINT64) (aSig<<1) - || ((bExp == 0x7FFF) && (UINT64) (bSig<<1))) + if ((uint64_t) (aSig<<1) + || ((bExp == 0x7FFF) && (uint64_t) (bSig<<1))) { return propagateFloatx80NaN(a, b); } @@ -398,7 +398,7 @@ invalid: } if (bExp == 0x7FFF) { - if ((UINT64) (bSig<<1)) + if ((uint64_t) (bSig<<1)) return propagateFloatx80NaN(a, b); if (aExp == 0) { @@ -436,17 +436,17 @@ invalid: if (aExp < EXP_BIAS-70) { // first order approximation, return (a*b)/ln(2) - INT32 zExp = aExp + FLOAT_LN2INV_EXP - 0x3FFE; + int32_t zExp = aExp + FLOAT_LN2INV_EXP - 0x3FFE; mul128By64To192(FLOAT_LN2INV_HI, FLOAT_LN2INV_LO, aSig, &zSig0, &zSig1, &zSig2); - if (0 < (INT64) zSig0) { + if (0 < (int64_t) zSig0) { shortShift128Left(zSig0, zSig1, 1, &zSig0, &zSig1); --zExp; } zExp = zExp + bExp - 0x3FFE; mul128By64To192(zSig0, zSig1, bSig, &zSig0, &zSig1, &zSig2); - if (0 < (INT64) zSig0) { + if (0 < (int64_t) zSig0) { shortShift128Left(zSig0, zSig1, 1, &zSig0, &zSig1); --zExp; } diff --git a/3rdparty/softfloat/mamesf.h b/3rdparty/softfloat/mamesf.h index c66931698a3..437f54834e3 100644 --- a/3rdparty/softfloat/mamesf.h +++ b/3rdparty/softfloat/mamesf.h @@ -24,15 +24,15 @@ #include "assert.h" #include "osdcomm.h" -typedef INT8 flag; -typedef UINT8 uint8; -typedef INT8 int8; -typedef UINT16 uint16; -typedef INT16 int16; -typedef UINT32 uint32; -typedef INT32 int32; -typedef UINT64 uint64; -typedef INT64 int64; +typedef int8_t flag; +typedef uint8_t uint8; +typedef int8_t int8; +typedef uint16_t uint16; +typedef int16_t int16; +typedef uint32_t uint32; +typedef int32_t int32; +typedef uint64_t uint64; +typedef int64_t int64; /*---------------------------------------------------------------------------- | Each of the following `typedef's defines a type that holds integers @@ -40,14 +40,14 @@ typedef INT64 int64; | implementation of C, `bits16' and `sbits16' should be `typedef'ed to | `unsigned short int' and `signed short int' (or `short int'), respectively. *----------------------------------------------------------------------------*/ -typedef UINT8 bits8; -typedef INT8 sbits8; -typedef UINT16 bits16; -typedef INT16 sbits16; -typedef UINT32 bits32; -typedef INT32 sbits32; -typedef UINT64 bits64; -typedef INT64 sbits64; +typedef uint8_t bits8; +typedef int8_t sbits8; +typedef uint16_t bits16; +typedef int16_t sbits16; +typedef uint32_t bits32; +typedef int32_t sbits32; +typedef uint64_t bits64; +typedef int64_t sbits64; /*---------------------------------------------------------------------------- | The `LIT64' macro takes as its argument a textual integer literal and |