diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2016-10-22 13:13:17 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2016-10-22 13:13:17 +0200 |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/cpu/v60/v60.cpp | |
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 'src/devices/cpu/v60/v60.cpp')
-rw-r--r-- | src/devices/cpu/v60/v60.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp index 009a7cf66a7..831a826c035 100644 --- a/src/devices/cpu/v60/v60.cpp +++ b/src/devices/cpu/v60/v60.cpp @@ -81,7 +81,7 @@ const device_type V60 = &device_creator<v60_device>; const device_type V70 = &device_creator<v70_device>; -v60_device::v60_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +v60_device::v60_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : cpu_device(mconfig, V60, "V60", tag, owner, clock, "v60", __FILE__) , m_program_config("program", ENDIANNESS_LITTLE, 16, 24, 0) , m_io_config("io", ENDIANNESS_LITTLE, 16, 24, 0) @@ -94,7 +94,7 @@ v60_device::v60_device(const machine_config &mconfig, const char *tag, device_t } -v60_device::v60_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) +v60_device::v60_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) : cpu_device(mconfig, type, name, tag, owner, clock, shortname, source) , m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) , m_io_config("io", ENDIANNESS_LITTLE, 16, 24, 0) @@ -106,20 +106,20 @@ v60_device::v60_device(const machine_config &mconfig, device_type type, const ch m_reg[45] = 0x00007000; } -v70_device::v70_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) +v70_device::v70_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : v60_device(mconfig, V70, "V70", tag, owner, clock, "v70", __FILE__) { } -offs_t v60_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t v60_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( v60 ); return CPU_DISASSEMBLE_NAME(v60)(this, buffer, pc, oprom, opram, options); } -offs_t v70_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) +offs_t v70_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( v70 ); return CPU_DISASSEMBLE_NAME(v70)(this, buffer, pc, oprom, opram, options); @@ -158,14 +158,14 @@ offs_t v70_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opro #define SetCFB(x) {_CY = ((x) & 0x100) ? 1 : 0; } #define SetCFW(x) {_CY = ((x) & 0x10000) ? 1 : 0; } -#define SetCFL(x) {_CY = ((x) & (((UINT64)1) << 32)) ? 1 : 0; } +#define SetCFL(x) {_CY = ((x) & (((uint64_t)1) << 32)) ? 1 : 0; } #define SetSF(x) (_S = (x)) #define SetZF(x) (_Z = (x)) -#define SetSZPF_Byte(x) {_Z = ((UINT8)(x) == 0); _S = ((x)&0x80) ? 1 : 0; } -#define SetSZPF_Word(x) {_Z = ((UINT16)(x) == 0); _S = ((x)&0x8000) ? 1 : 0; } -#define SetSZPF_Long(x) {_Z = ((UINT32)(x) == 0); _S = ((x)&0x80000000) ? 1 : 0; } +#define SetSZPF_Byte(x) {_Z = ((uint8_t)(x) == 0); _S = ((x)&0x80) ? 1 : 0; } +#define SetSZPF_Word(x) {_Z = ((uint16_t)(x) == 0); _S = ((x)&0x8000) ? 1 : 0; } +#define SetSZPF_Long(x) {_Z = ((uint32_t)(x) == 0); _S = ((x)&0x80000000) ? 1 : 0; } #define ORB(dst, src) { (dst) |= (src); _CY = _OV = 0; SetSZPF_Byte(dst); } #define ORW(dst, src) { (dst) |= (src); _CY = _OV = 0; SetSZPF_Word(dst); } @@ -179,13 +179,13 @@ offs_t v70_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opro #define XORW(dst, src) { (dst) ^= (src); _CY = _OV = 0; SetSZPF_Word(dst); } #define XORL(dst, src) { (dst) ^= (src); _CY = _OV = 0; SetSZPF_Long(dst); } -#define SUBB(dst, src) { unsigned res = (dst) - (src); SetCFB(res); SetOFB_Sub(res, src, dst); SetSZPF_Byte(res); dst = (UINT8)res; } -#define SUBW(dst, src) { unsigned res = (dst) - (src); SetCFW(res); SetOFW_Sub(res, src, dst); SetSZPF_Word(res); dst = (UINT16)res; } -#define SUBL(dst, src) { UINT64 res = (UINT64)(dst) - (INT64)(src); SetCFL(res); SetOFL_Sub(res, src, dst); SetSZPF_Long(res); dst = (UINT32)res; } +#define SUBB(dst, src) { unsigned res = (dst) - (src); SetCFB(res); SetOFB_Sub(res, src, dst); SetSZPF_Byte(res); dst = (uint8_t)res; } +#define SUBW(dst, src) { unsigned res = (dst) - (src); SetCFW(res); SetOFW_Sub(res, src, dst); SetSZPF_Word(res); dst = (uint16_t)res; } +#define SUBL(dst, src) { uint64_t res = (uint64_t)(dst) - (int64_t)(src); SetCFL(res); SetOFL_Sub(res, src, dst); SetSZPF_Long(res); dst = (uint32_t)res; } -#define ADDB(dst, src) { unsigned res = (dst) + (src); SetCFB(res); SetOFB_Add(res, src, dst); SetSZPF_Byte(res); dst = (UINT8)res; } -#define ADDW(dst, src) { unsigned res = (dst) + (src); SetCFW(res); SetOFW_Add(res, src, dst); SetSZPF_Word(res); dst = (UINT16)res; } -#define ADDL(dst, src) { UINT64 res = (UINT64)(dst) + (UINT64)(src); SetCFL(res); SetOFL_Add(res, src, dst); SetSZPF_Long(res); dst = (UINT32)res; } +#define ADDB(dst, src) { unsigned res = (dst) + (src); SetCFB(res); SetOFB_Add(res, src, dst); SetSZPF_Byte(res); dst = (uint8_t)res; } +#define ADDW(dst, src) { unsigned res = (dst) + (src); SetCFW(res); SetOFW_Add(res, src, dst); SetSZPF_Word(res); dst = (uint16_t)res; } +#define ADDL(dst, src) { uint64_t res = (uint64_t)(dst) + (uint64_t)(src); SetCFL(res); SetOFL_Add(res, src, dst); SetSZPF_Long(res); dst = (uint32_t)res; } #define SETREG8(a, b) (a) = ((a) & ~0xff) | ((b) & 0xff) #define SETREG16(a, b) (a) = ((a) & ~0xffff) | ((b) & 0xffff) @@ -296,14 +296,14 @@ void v60_device::v60ReloadStack() SP = m_reg[37 + ((PSW >> 24) & 3)]; } -UINT32 v60_device::v60ReadPSW() +uint32_t v60_device::v60ReadPSW() { PSW &= 0xfffffff0; PSW |= (_Z?1:0) | (_S?2:0) | (_OV?4:0) | (_CY?8:0); return PSW; } -void v60_device::v60WritePSW(UINT32 newval) +void v60_device::v60WritePSW(uint32_t newval) { /* determine if we need to save / restore the stacks */ int updateStack = 0; @@ -322,10 +322,10 @@ void v60_device::v60WritePSW(UINT32 newval) /* set the new value and update the flags */ PSW = newval; - _Z = (UINT8)(PSW & 1); - _S = (UINT8)(PSW & 2); - _OV = (UINT8)(PSW & 4); - _CY = (UINT8)(PSW & 8); + _Z = (uint8_t)(PSW & 1); + _S = (uint8_t)(PSW & 2); + _OV = (uint8_t)(PSW & 4); + _CY = (uint8_t)(PSW & 8); /* fetch the new stack value */ if (updateStack) @@ -333,10 +333,10 @@ void v60_device::v60WritePSW(UINT32 newval) } -UINT32 v60_device::v60_update_psw_for_exception(int is_interrupt, int target_level) +uint32_t v60_device::v60_update_psw_for_exception(int is_interrupt, int target_level) { - UINT32 oldPSW = v60ReadPSW(); - UINT32 newPSW = oldPSW; + uint32_t oldPSW = v60ReadPSW(); + uint32_t newPSW = oldPSW; // Change to interrupt context newPSW &= ~(3 << 24); // PSW.EL = 0 @@ -371,7 +371,7 @@ UINT32 v60_device::v60_update_psw_for_exception(int is_interrupt, int target_lev #include "op6.hxx" #include "op7a.hxx" -UINT32 v60_device::opUNHANDLED() +uint32_t v60_device::opUNHANDLED() { fatalerror("Unhandled OpCode found : %02x at %08x\n", OpRead16(PC), PC); //return 0; /* never reached, fatalerror won't return */ @@ -552,7 +552,7 @@ void v60_device::stall() void v60_device::v60_do_irq(int vector) { - UINT32 oldPSW = v60_update_psw_for_exception(1, 0); + uint32_t oldPSW = v60_update_psw_for_exception(1, 0); // Push PC and PSW onto the stack SP-=4; @@ -608,7 +608,7 @@ void v60_device::execute_run() while (m_icount > 0) { - UINT32 inc; + uint32_t inc; m_PPC = PC; debugger_instruction_hook(this, PC); m_icount -= 8; /* fix me -- this is just an average */ |