summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2016-11-19 05:35:54 +1100
committer Vas Crabb <vas@vastheman.com>2016-11-19 05:38:48 +1100
commit8179a84458204a5e767446fcf7d10f032a40fd0c (patch)
tree16105e1667f811dcb24dbf0fc255166cb06df5c2 /3rdparty
parent1b489fe83034072149fb0637b20c7ba57dc72a7a (diff)
Introduce u8/u16/u32/u64/s8/s16/s32/s64
* New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
Diffstat (limited to '3rdparty')
-rw-r--r--3rdparty/softfloat/fpu_constant.h24
-rw-r--r--3rdparty/softfloat/fsincos.c12
-rw-r--r--3rdparty/softfloat/fyl2x.c34
3 files changed, 35 insertions, 35 deletions
diff --git a/3rdparty/softfloat/fpu_constant.h b/3rdparty/softfloat/fpu_constant.h
index 3ac8862ba0c..fdd9719eb99 100644
--- a/3rdparty/softfloat/fpu_constant.h
+++ b/3rdparty/softfloat/fpu_constant.h
@@ -37,11 +37,11 @@ these four paragraphs for those parts of this code that are retained.
// 128-bit PI fraction
#ifdef BETTER_THAN_PENTIUM
-#define FLOAT_PI_HI (U64(0xc90fdaa22168c234))
-#define FLOAT_PI_LO (U64(0xc4c6628b80dc1cd1))
+#define FLOAT_PI_HI (0xc90fdaa22168c234U)
+#define FLOAT_PI_LO (0xc4c6628b80dc1cd1U)
#else
-#define FLOAT_PI_HI (U64(0xc90fdaa22168c234))
-#define FLOAT_PI_LO (U64(0xC000000000000000))
+#define FLOAT_PI_HI (0xc90fdaa22168c234U)
+#define FLOAT_PI_LO (0xC000000000000000U)
#endif
#define FLOATX80_PI2_EXP (0x3FFF)
@@ -55,11 +55,11 @@ these four paragraphs for those parts of this code that are retained.
// 128-bit 3PI/4 fraction
#ifdef BETTER_THAN_PENTIUM
-#define FLOAT_3PI4_HI (U64(0x96cbe3f9990e91a7))
-#define FLOAT_3PI4_LO (U64(0x9394c9e8a0a5159c))
+#define FLOAT_3PI4_HI (0x96cbe3f9990e91a7U)
+#define FLOAT_3PI4_LO (0x9394c9e8a0a5159cU)
#else
-#define FLOAT_3PI4_HI (U64(0x96cbe3f9990e91a7))
-#define FLOAT_3PI4_LO (U64(0x9000000000000000))
+#define FLOAT_3PI4_HI (0x96cbe3f9990e91a7U)
+#define FLOAT_3PI4_LO (0x9000000000000000U)
#endif
//////////////////////////////
@@ -70,11 +70,11 @@ these four paragraphs for those parts of this code that are retained.
// 128-bit 1/LN2 fraction
#ifdef BETTER_THAN_PENTIUM
-#define FLOAT_LN2INV_HI (U64(0xb8aa3b295c17f0bb))
-#define FLOAT_LN2INV_LO (U64(0xbe87fed0691d3e89))
+#define FLOAT_LN2INV_HI (0xb8aa3b295c17f0bbU)
+#define FLOAT_LN2INV_LO (0xbe87fed0691d3e89U)
#else
-#define FLOAT_LN2INV_HI (U64(0xb8aa3b295c17f0bb))
-#define FLOAT_LN2INV_LO (U64(0xC000000000000000))
+#define FLOAT_LN2INV_HI (0xb8aa3b295c17f0bbU)
+#define FLOAT_LN2INV_LO (0xC000000000000000U)
#endif
#endif
diff --git a/3rdparty/softfloat/fsincos.c b/3rdparty/softfloat/fsincos.c
index 742c07f2b3b..a57b9ccbf87 100644
--- a/3rdparty/softfloat/fsincos.c
+++ b/3rdparty/softfloat/fsincos.c
@@ -31,8 +31,8 @@ these four paragraphs for those parts of this code that are retained.
//#include "softfloat-specialize"
#include "fpu_constant.h"
-static const floatx80 floatx80_one = packFloatx80(0, 0x3fff, U64(0x8000000000000000));
-static const floatx80 floatx80_default_nan = packFloatx80(0, 0xffff, U64(0xffffffffffffffff));
+static const floatx80 floatx80_one = packFloatx80(0, 0x3fff, 0x8000000000000000U);
+static const floatx80 floatx80_default_nan = packFloatx80(0, 0xffff, 0xffffffffffffffffU);
#define packFloat2x128m(zHi, zLo) {(zHi), (zLo)}
#define PACK_FLOAT_128(hi,lo) packFloat2x128m(LIT64(hi),LIT64(lo))
@@ -83,7 +83,7 @@ INLINE floatx80 propagateFloatx80NaNOneArg(floatx80 a)
if (floatx80_is_signaling_nan(a))
float_raise(float_flag_invalid);
- a.low |= U64(0xC000000000000000);
+ a.low |= 0xC000000000000000U;
return a;
}
@@ -322,7 +322,7 @@ int sf_fsincos(floatx80 a, floatx80 *sin_a, floatx80 *cos_a)
// float_raise(float_flag_denormal);
/* handle pseudo denormals */
- if (! (aSig0 & U64(0x8000000000000000)))
+ if (! (aSig0 & 0x8000000000000000U))
{
float_raise(float_flag_inexact);
if (sin_a)
@@ -435,7 +435,7 @@ int floatx80_ftan(floatx80 &a)
if (aSig0 == 0) return 0;
// float_raise(float_flag_denormal);
/* handle pseudo denormals */
- if (! (aSig0 & U64(0x8000000000000000)))
+ if (! (aSig0 & 0x8000000000000000U))
{
float_raise(float_flag_inexact | float_flag_underflow);
return 0;
@@ -616,7 +616,7 @@ floatx80 floatx80_scale(floatx80 a, floatx80 b)
}
if (aSig && (aExp == 0)) float_raise(float_flag_denormal);
if (bSign) return packFloatx80(aSign, 0, 0);
- return packFloatx80(aSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(aSign, 0x7FFF, 0x8000000000000000U);
}
if (aExp == 0) {
if (aSig == 0) return a;
diff --git a/3rdparty/softfloat/fyl2x.c b/3rdparty/softfloat/fyl2x.c
index d7c5baa3e70..44c3e7610bc 100644
--- a/3rdparty/softfloat/fyl2x.c
+++ b/3rdparty/softfloat/fyl2x.c
@@ -32,10 +32,10 @@ these four paragraphs for those parts of this code that are retained.
//#include "softfloat-specialize"
#include "fpu_constant.h"
-static const floatx80 floatx80_log10_2 = packFloatx80(0, 0x3ffd, U64(0x9a209a84fbcff798));
-static const floatx80 floatx80_ln_2 = packFloatx80(0, 0x3ffe, U64(0xb17217f7d1cf79ac));
-static const floatx80 floatx80_one = packFloatx80(0, 0x3fff, U64(0x8000000000000000));
-static const floatx80 floatx80_default_nan = packFloatx80(0, 0xffff, U64(0xffffffffffffffff));
+static const floatx80 floatx80_log10_2 = packFloatx80(0, 0x3ffd, 0x9a209a84fbcff798U);
+static const floatx80 floatx80_ln_2 = packFloatx80(0, 0x3ffe, 0xb17217f7d1cf79acU);
+static const floatx80 floatx80_one = packFloatx80(0, 0x3fff, 0x8000000000000000U);
+static const floatx80 floatx80_default_nan = packFloatx80(0, 0xffff, 0xffffffffffffffffU);
#define packFloat_128(zHi, zLo) {(zHi), (zLo)}
#define PACK_FLOAT_128(hi,lo) packFloat_128(LIT64(hi),LIT64(lo))
@@ -87,7 +87,7 @@ INLINE floatx80 propagateFloatx80NaNOneArg(floatx80 a)
if (floatx80_is_signaling_nan(a))
float_raise(float_flag_invalid);
- a.low |= U64(0xC000000000000000);
+ a.low |= 0xC000000000000000U;
return a;
}
@@ -130,8 +130,8 @@ static floatx80 propagateFloatx80NaN(floatx80 a, floatx80 b)
int aIsSignalingNaN = floatx80_is_signaling_nan(a);
int bIsNaN = floatx80_is_nan(b);
int bIsSignalingNaN = floatx80_is_signaling_nan(b);
- a.low |= U64(0xC000000000000000);
- b.low |= U64(0xC000000000000000);
+ a.low |= 0xC000000000000000U;
+ b.low |= 0xC000000000000000U;
if (aIsSignalingNaN | bIsSignalingNaN) float_raise(float_flag_invalid);
if (aIsSignalingNaN) {
if (bIsSignalingNaN) goto returnLargerSignificand;
@@ -150,14 +150,14 @@ static floatx80 propagateFloatx80NaN(floatx80 a, floatx80 b)
}
static const float128 float128_one =
- packFloat_128(U64(0x3fff000000000000), U64(0x0000000000000000));
+ packFloat_128(0x3fff000000000000U, 0x0000000000000000U);
static const float128 float128_two =
- packFloat_128(U64(0x4000000000000000), U64(0x0000000000000000));
+ packFloat_128(0x4000000000000000U, 0x0000000000000000U);
static const float128 float128_ln2inv2 =
- packFloat_128(U64(0x400071547652b82f), U64(0xe1777d0ffda0d23a));
+ packFloat_128(0x400071547652b82fU, 0xe1777d0ffda0d23aU);
-#define SQRT2_HALF_SIG U64(0xb504f333f9de6484)
+#define SQRT2_HALF_SIG 0xb504f333f9de6484U
extern float128 OddPoly(float128 x, float128 *arr, unsigned n);
@@ -279,7 +279,7 @@ invalid:
if (bSig == 0) goto invalid;
float_raise(float_flag_denormal);
}
- return packFloatx80(bSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(bSign, 0x7FFF, 0x8000000000000000U);
}
}
if (bExp == 0x7FFF)
@@ -289,16 +289,16 @@ invalid:
if (aSig && (aExp == 0))
float_raise(float_flag_denormal);
if (aExp < 0x3FFF) {
- return packFloatx80(zSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(zSign, 0x7FFF, 0x8000000000000000U);
}
if (aExp == 0x3FFF && ((uint64_t) (aSig<<1) == 0)) goto invalid;
- return packFloatx80(bSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(bSign, 0x7FFF, 0x8000000000000000U);
}
if (aExp == 0) {
if (aSig == 0) {
if ((bExp | bSig) == 0) goto invalid;
float_raise(float_flag_divbyzero);
- return packFloatx80(zSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(zSign, 0x7FFF, 0x8000000000000000U);
}
if (aSign) goto invalid;
float_raise(float_flag_denormal);
@@ -393,7 +393,7 @@ invalid:
if (bSig == 0) goto invalid;
float_raise(float_flag_denormal);
}
- return packFloatx80(bSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(bSign, 0x7FFF, 0x8000000000000000U);
}
}
if (bExp == 0x7FFF)
@@ -406,7 +406,7 @@ invalid:
float_raise(float_flag_denormal);
}
- return packFloatx80(zSign, 0x7FFF, U64(0x8000000000000000));
+ return packFloatx80(zSign, 0x7FFF, 0x8000000000000000U);
}
if (aExp == 0) {
if (aSig == 0) {