Skip to content

Commit

Permalink
NOTICE (TYPE NAME CONSOLIDATION)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mmicko committed Oct 22, 2016
1 parent 333bff8 commit ddb290d
Show file tree
Hide file tree
Showing 8,121 changed files with 135,882 additions and 135,882 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 15 additions & 15 deletions 3rdparty/softfloat/fsincos.c
Expand Up @@ -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;
Expand All @@ -104,26 +104,26 @@ 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);
}
*zSig1 = term2;
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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand Down
44 changes: 22 additions & 22 deletions 3rdparty/softfloat/fyl2x.c
Expand Up @@ -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;
Expand All @@ -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);
}

/*----------------------------------------------------------------------------
Expand Down Expand Up @@ -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);
}
Expand All @@ -284,14 +284,14 @@ static floatx80 fyl2x(floatx80 a, floatx80 b)
}
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) {
Expand All @@ -313,7 +313,7 @@ static floatx80 fyl2x(floatx80 a, floatx80 b)
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);
Expand All @@ -329,11 +329,11 @@ static floatx80 fyl2x(floatx80 a, floatx80 b)
/* 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));
}

Expand Down Expand Up @@ -364,8 +364,8 @@ static floatx80 fyl2x(floatx80 a, floatx80 b)

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);
Expand All @@ -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);
}
Expand All @@ -398,7 +398,7 @@ floatx80 fyl2xp1(floatx80 a, floatx80 b)
}
if (bExp == 0x7FFF)
{
if ((UINT64) (bSig<<1))
if ((uint64_t) (bSig<<1))
return propagateFloatx80NaN(a, b);

if (aExp == 0) {
Expand Down Expand Up @@ -436,17 +436,17 @@ floatx80 fyl2xp1(floatx80 a, floatx80 b)
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;
}
Expand Down
34 changes: 17 additions & 17 deletions 3rdparty/softfloat/mamesf.h
Expand Up @@ -24,30 +24,30 @@
#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
| of _exactly_ the number of bits specified. For instance, for most
| 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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/complay.py
Expand Up @@ -18,7 +18,7 @@
srcfile = sys.argv[1]
dstfile = sys.argv[2]
varname = sys.argv[3]
type = 'UINT8'
type = 'uint8_t'

try:
myfile = open(srcfile, 'rb')
Expand Down
4 changes: 2 additions & 2 deletions scripts/src/emu.lua
Expand Up @@ -249,11 +249,11 @@ dependency {
}

custombuildtask {
{ MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall UINT8" }},
{ MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall uint8_t" }},
}

custombuildtask {
{ MAME_DIR .. "src/frontend/mame/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }},
{ MAME_DIR .. "src/frontend/mame/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 uint8_t" }},

layoutbuildtask("emu/layout", "dualhovu"),
layoutbuildtask("emu/layout", "dualhsxs"),
Expand Down
12 changes: 6 additions & 6 deletions src/devices/bus/a1bus/a1bus.cpp
Expand Up @@ -23,15 +23,15 @@ const device_type A1BUS_SLOT = &device_creator<a1bus_slot_device>;
//-------------------------------------------------
// a1bus_slot_device - constructor
//-------------------------------------------------
a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, A1BUS_SLOT, "Apple I Slot", tag, owner, clock, "a1bus_slot", __FILE__),
device_slot_interface(mconfig, *this),
m_a1bus_tag(nullptr),
m_a1bus_slottag(nullptr)
{
}

a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
a1bus_slot_device::a1bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_slot_interface(mconfig, *this), m_a1bus_tag(nullptr), m_a1bus_slottag(nullptr)
{
Expand Down Expand Up @@ -75,14 +75,14 @@ void a1bus_device::static_set_cputag(device_t &device, const char *tag)
// a1bus_device - constructor
//-------------------------------------------------

a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
a1bus_device::a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, A1BUS, "Apple I Bus", tag, owner, clock, "a1bus", __FILE__), m_maincpu(nullptr),
m_out_irq_cb(*this),
m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
{
}

a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
a1bus_device::a1bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_maincpu(nullptr),
m_out_irq_cb(*this),
m_out_nmi_cb(*this), m_device(nullptr), m_cputag(nullptr)
Expand Down Expand Up @@ -139,7 +139,7 @@ void a1bus_device::install_device(offs_t start, offs_t end, read8_delegate rhand
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler);
}

void a1bus_device::install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data)
void a1bus_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
{
// printf("install_bank: %s @ %x->%x\n", tag, start, end);
m_maincpu = machine().device<cpu_device>(m_cputag);
Expand Down Expand Up @@ -199,7 +199,7 @@ void device_a1bus_card_interface::install_device(offs_t start, offs_t end, read8
m_a1bus->install_device(start, end, rhandler, whandler);
}

void device_a1bus_card_interface::install_bank(offs_t start, offs_t end, char *tag, UINT8 *data)
void device_a1bus_card_interface::install_bank(offs_t start, offs_t end, char *tag, uint8_t *data)
{
m_a1bus->install_bank(start, end, tag, data);
}
12 changes: 6 additions & 6 deletions src/devices/bus/a1bus/a1bus.h
Expand Up @@ -49,8 +49,8 @@ class a1bus_slot_device : public device_t,
{
public:
// construction/destruction
a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
a1bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
a1bus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
a1bus_slot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);

// device-level overrides
virtual void device_start() override;
Expand All @@ -72,8 +72,8 @@ class a1bus_device : public device_t
{
public:
// construction/destruction
a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
a1bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
a1bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
a1bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);

// inline configuration
static void static_set_cputag(device_t &device, const char *tag);
Expand All @@ -87,7 +87,7 @@ class a1bus_device : public device_t
void set_nmi_line(int state);

void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
void install_bank(offs_t start, offs_t end, const char *tag, UINT8 *data);
void install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data);

DECLARE_WRITE_LINE_MEMBER( irq_w );
DECLARE_WRITE_LINE_MEMBER( nmi_w );
Expand Down Expand Up @@ -132,7 +132,7 @@ class device_a1bus_card_interface : public device_slot_card_interface
void lower_slot_nmi() { m_a1bus->set_nmi_line(CLEAR_LINE); }

void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
void install_bank(offs_t start, offs_t end, char *tag, UINT8 *data);
void install_bank(offs_t start, offs_t end, char *tag, uint8_t *data);

// inline configuration
static void static_set_a1bus_tag(device_t &device, const char *tag, const char *slottag);
Expand Down

0 comments on commit ddb290d

Please sign in to comment.