summaryrefslogtreecommitdiffstats
path: root/src/devices/cpu/mips/r3000.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/mips/r3000.cpp')
-rw-r--r--src/devices/cpu/mips/r3000.cpp184
1 files changed, 92 insertions, 92 deletions
diff --git a/src/devices/cpu/mips/r3000.cpp b/src/devices/cpu/mips/r3000.cpp
index 9eec18d9de2..2e37da309a0 100644
--- a/src/devices/cpu/mips/r3000.cpp
+++ b/src/devices/cpu/mips/r3000.cpp
@@ -86,8 +86,8 @@
#define RTVAL m_r[RTREG]
#define RDVAL m_r[RDREG]
-#define SIMMVAL ((INT16)m_op)
-#define UIMMVAL ((UINT16)m_op)
+#define SIMMVAL ((int16_t)m_op)
+#define UIMMVAL ((uint16_t)m_op)
#define LIMMVAL (m_op & 0x03ffffff)
#define ADDPC(x) do { m_nextpc = m_pc + ((x) << 2); } while (0)
@@ -124,7 +124,7 @@ const device_type R3081 = &device_creator<r3081_device>;
// r3000_device - constructor
//-------------------------------------------------
-r3000_device::r3000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, chip_type chiptype, const char *shortname, const char *source)
+r3000_device::r3000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, chip_type chiptype, const char *shortname, const char *source)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_program_config_be("program", ENDIANNESS_BIG, 32, 29),
m_program_config_le("program", ENDIANNESS_LITTLE, 32, 29),
@@ -169,7 +169,7 @@ r3000_device::~r3000_device()
// r3041_device - constructor
//-------------------------------------------------
-r3041_device::r3041_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+r3041_device::r3041_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: r3000_device(mconfig, R3041, "R3041", tag, owner, clock, CHIP_TYPE_R3041, "r3041", __FILE__) { }
@@ -177,7 +177,7 @@ r3041_device::r3041_device(const machine_config &mconfig, const char *tag, devic
// r3051_device - constructor
//-------------------------------------------------
-r3051_device::r3051_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+r3051_device::r3051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: r3000_device(mconfig, R3051, "R3051", tag, owner, clock, CHIP_TYPE_R3051, "r3051", __FILE__) { }
@@ -185,7 +185,7 @@ r3051_device::r3051_device(const machine_config &mconfig, const char *tag, devic
// r3052_device - constructor
//-------------------------------------------------
-r3052_device::r3052_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+r3052_device::r3052_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: r3000_device(mconfig, R3052, "R3052", tag, owner, clock, CHIP_TYPE_R3052, "r3052", __FILE__) { }
@@ -193,7 +193,7 @@ r3052_device::r3052_device(const machine_config &mconfig, const char *tag, devic
// r3071_device - constructor
//-------------------------------------------------
-r3071_device::r3071_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+r3071_device::r3071_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: r3000_device(mconfig, R3071, "R3071", tag, owner, clock, CHIP_TYPE_R3071, "r3071", __FILE__) { }
@@ -201,7 +201,7 @@ r3071_device::r3071_device(const machine_config &mconfig, const char *tag, devic
// r3081_device - constructor
//-------------------------------------------------
-r3081_device::r3081_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
+r3081_device::r3081_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: r3000_device(mconfig, R3081, "R3081", tag, owner, clock, CHIP_TYPE_R3081, "r3081", __FILE__) { }
@@ -458,7 +458,7 @@ void r3000_device::state_string_export(const device_state_entry &entry, std::str
// of the shortest instruction, in bytes
//-------------------------------------------------
-UINT32 r3000_device::disasm_min_opcode_bytes() const
+uint32_t r3000_device::disasm_min_opcode_bytes() const
{
return 4;
}
@@ -469,7 +469,7 @@ UINT32 r3000_device::disasm_min_opcode_bytes() const
// of the longest instruction, in bytes
//-------------------------------------------------
-UINT32 r3000_device::disasm_max_opcode_bytes() const
+uint32_t r3000_device::disasm_max_opcode_bytes() const
{
return 4;
}
@@ -480,7 +480,7 @@ UINT32 r3000_device::disasm_max_opcode_bytes() const
// helper function
//-------------------------------------------------
-offs_t r3000_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
+offs_t r3000_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( r3000le );
extern CPU_DISASSEMBLE( r3000be );
@@ -496,37 +496,37 @@ offs_t r3000_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
MEMORY ACCESSORS
***************************************************************************/
-inline UINT32 r3000_device::readop(offs_t pc)
+inline uint32_t r3000_device::readop(offs_t pc)
{
return m_direct->read_dword(pc);
}
-UINT8 r3000_device::readmem(offs_t offset)
+uint8_t r3000_device::readmem(offs_t offset)
{
return m_program->read_byte(offset);
}
-UINT16 r3000_device::readmem_word(offs_t offset)
+uint16_t r3000_device::readmem_word(offs_t offset)
{
return m_program->read_word(offset);
}
-UINT32 r3000_device::readmem_dword(offs_t offset)
+uint32_t r3000_device::readmem_dword(offs_t offset)
{
return m_program->read_dword(offset);
}
-void r3000_device::writemem(offs_t offset, UINT8 data)
+void r3000_device::writemem(offs_t offset, uint8_t data)
{
m_program->write_byte(offset, data);
}
-void r3000_device::writemem_word(offs_t offset, UINT16 data)
+void r3000_device::writemem_word(offs_t offset, uint16_t data)
{
m_program->write_word(offset, data);
}
-void r3000_device::writemem_dword(offs_t offset, UINT32 data)
+void r3000_device::writemem_dword(offs_t offset, uint32_t data)
{
m_program->write_dword(offset, data);
}
@@ -536,43 +536,43 @@ void r3000_device::writemem_dword(offs_t offset, UINT32 data)
BIG ENDIAN CACHE I/O
***************************************************************************/
-UINT8 r3000_device::readcache_be(offs_t offset)
+uint8_t r3000_device::readcache_be(offs_t offset)
{
offset &= 0x1fffffff;
return (offset * 4 < m_cache_size) ? m_cache[BYTE4_XOR_BE(offset)] : 0xff;
}
-UINT16 r3000_device::readcache_be_word(offs_t offset)
+uint16_t r3000_device::readcache_be_word(offs_t offset)
{
offset &= 0x1fffffff;
- return (offset * 4 < m_cache_size) ? *(UINT16 *)&m_cache[WORD_XOR_BE(offset)] : 0xffff;
+ return (offset * 4 < m_cache_size) ? *(uint16_t *)&m_cache[WORD_XOR_BE(offset)] : 0xffff;
}
-UINT32 r3000_device::readcache_be_dword(offs_t offset)
+uint32_t r3000_device::readcache_be_dword(offs_t offset)
{
offset &= 0x1fffffff;
- return (offset * 4 < m_cache_size) ? *(UINT32 *)&m_cache[offset] : 0xffffffff;
+ return (offset * 4 < m_cache_size) ? *(uint32_t *)&m_cache[offset] : 0xffffffff;
}
-void r3000_device::writecache_be(offs_t offset, UINT8 data)
+void r3000_device::writecache_be(offs_t offset, uint8_t data)
{
offset &= 0x1fffffff;
if (offset * 4 < m_cache_size) m_cache[BYTE4_XOR_BE(offset)] = data;
}
-void r3000_device::writecache_be_word(offs_t offset, UINT16 data)
+void r3000_device::writecache_be_word(offs_t offset, uint16_t data)
{
offset &= 0x1fffffff;
- if (offset * 4 < m_cache_size) *(UINT16 *)&m_cache[WORD_XOR_BE(offset)] = data;
+ if (offset * 4 < m_cache_size) *(uint16_t *)&m_cache[WORD_XOR_BE(offset)] = data;
}
-void r3000_device::writecache_be_dword(offs_t offset, UINT32 data)
+void r3000_device::writecache_be_dword(offs_t offset, uint32_t data)
{
offset &= 0x1fffffff;
- if (offset * 4 < m_cache_size) *(UINT32 *)&m_cache[offset] = data;
+ if (offset * 4 < m_cache_size) *(uint32_t *)&m_cache[offset] = data;
}
-UINT8 r3000_device::readcache_le(offs_t offset)
+uint8_t r3000_device::readcache_le(offs_t offset)
{
offset &= 0x1fffffff;
return (offset * 4 < m_cache_size) ? m_cache[BYTE4_XOR_LE(offset)] : 0xff;
@@ -583,34 +583,34 @@ UINT8 r3000_device::readcache_le(offs_t offset)
LITTLE ENDIAN CACHE I/O
***************************************************************************/
-UINT16 r3000_device::readcache_le_word(offs_t offset)
+uint16_t r3000_device::readcache_le_word(offs_t offset)
{
offset &= 0x1fffffff;
- return (offset * 4 < m_cache_size) ? *(UINT16 *)&m_cache[WORD_XOR_LE(offset)] : 0xffff;
+ return (offset * 4 < m_cache_size) ? *(uint16_t *)&m_cache[WORD_XOR_LE(offset)] : 0xffff;
}
-UINT32 r3000_device::readcache_le_dword(offs_t offset)
+uint32_t r3000_device::readcache_le_dword(offs_t offset)
{
offset &= 0x1fffffff;
- return (offset * 4 < m_cache_size) ? *(UINT32 *)&m_cache[offset] : 0xffffffff;
+ return (offset * 4 < m_cache_size) ? *(uint32_t *)&m_cache[offset] : 0xffffffff;
}
-void r3000_device::writecache_le(offs_t offset, UINT8 data)
+void r3000_device::writecache_le(offs_t offset, uint8_t data)
{
offset &= 0x1fffffff;
if (offset * 4 < m_cache_size) m_cache[BYTE4_XOR_LE(offset)] = data;
}
-void r3000_device::writecache_le_word(offs_t offset, UINT16 data)
+void r3000_device::writecache_le_word(offs_t offset, uint16_t data)
{
offset &= 0x1fffffff;
- if (offset * 4 < m_cache_size) *(UINT16 *)&m_cache[WORD_XOR_LE(offset)] = data;
+ if (offset * 4 < m_cache_size) *(uint16_t *)&m_cache[WORD_XOR_LE(offset)] = data;
}
-void r3000_device::writecache_le_dword(offs_t offset, UINT32 data)
+void r3000_device::writecache_le_dword(offs_t offset, uint32_t data)
{
offset &= 0x1fffffff;
- if (offset * 4 < m_cache_size) *(UINT32 *)&m_cache[offset] = data;
+ if (offset * 4 < m_cache_size) *(uint32_t *)&m_cache[offset] = data;
}
@@ -680,12 +680,12 @@ void r3000_device::set_irq_line(int irqline, int state)
COP0 (SYSTEM) EXECUTION HANDLING
***************************************************************************/
-inline UINT32 r3000_device::get_cop0_reg(int idx)
+inline uint32_t r3000_device::get_cop0_reg(int idx)
{
return m_cpr[0][idx];
}
-inline void r3000_device::set_cop0_reg(int idx, UINT32 val)
+inline void r3000_device::set_cop0_reg(int idx, uint32_t val)
{
if (idx == COP0_Cause)
{
@@ -696,8 +696,8 @@ inline void r3000_device::set_cop0_reg(int idx, UINT32 val)
}
else if (idx == COP0_Status)
{
- UINT32 oldsr = m_cpr[0][idx];
- UINT32 diff = oldsr ^ val;
+ uint32_t oldsr = m_cpr[0][idx];
+ uint32_t diff = oldsr ^ val;
// handle cache isolation
if (diff & SR_IsC)
@@ -725,12 +725,12 @@ inline void r3000_device::set_cop0_reg(int idx, UINT32 val)
m_cpr[0][idx] = val;
}
-inline UINT32 r3000_device::get_cop0_creg(int idx)
+inline uint32_t r3000_device::get_cop0_creg(int idx)
{
return m_ccr[0][idx];
}
-inline void r3000_device::set_cop0_creg(int idx, UINT32 val)
+inline void r3000_device::set_cop0_creg(int idx, uint32_t val)
{
m_ccr[0][idx] = val;
}
@@ -792,22 +792,22 @@ inline void r3000_device::handle_cop0()
COP1 (FPU) EXECUTION HANDLING
***************************************************************************/
-inline UINT32 r3000_device::get_cop1_reg(int idx)
+inline uint32_t r3000_device::get_cop1_reg(int idx)
{
return m_cpr[1][idx];
}
-inline void r3000_device::set_cop1_reg(int idx, UINT32 val)
+inline void r3000_device::set_cop1_reg(int idx, uint32_t val)
{
m_cpr[1][idx] = val;
}
-inline UINT32 r3000_device::get_cop1_creg(int idx)
+inline uint32_t r3000_device::get_cop1_creg(int idx)
{
return m_ccr[1][idx];
}
-inline void r3000_device::set_cop1_creg(int idx, UINT32 val)
+inline void r3000_device::set_cop1_creg(int idx, uint32_t val)
{
m_ccr[1][idx] = val;
}
@@ -860,22 +860,22 @@ inline void r3000_device::handle_cop1()
COP2 (CUSTOM) EXECUTION HANDLING
***************************************************************************/
-inline UINT32 r3000_device::get_cop2_reg(int idx)
+inline uint32_t r3000_device::get_cop2_reg(int idx)
{
return m_cpr[2][idx];
}
-inline void r3000_device::set_cop2_reg(int idx, UINT32 val)
+inline void r3000_device::set_cop2_reg(int idx, uint32_t val)
{
m_cpr[2][idx] = val;
}
-inline UINT32 r3000_device::get_cop2_creg(int idx)
+inline uint32_t r3000_device::get_cop2_creg(int idx)
{
return m_ccr[2][idx];
}
-inline void r3000_device::set_cop2_creg(int idx, UINT32 val)
+inline void r3000_device::set_cop2_creg(int idx, uint32_t val)
{
m_ccr[2][idx] = val;
}
@@ -926,22 +926,22 @@ inline void r3000_device::handle_cop2()
COP3 (CUSTOM) EXECUTION HANDLING
***************************************************************************/
-inline UINT32 r3000_device::get_cop3_reg(int idx)
+inline uint32_t r3000_device::get_cop3_reg(int idx)
{
return m_cpr[3][idx];
}
-inline void r3000_device::set_cop3_reg(int idx, UINT32 val)
+inline void r3000_device::set_cop3_reg(int idx, uint32_t val)
{
m_cpr[3][idx] = val;
}
-inline UINT32 r3000_device::get_cop3_creg(int idx)
+inline uint32_t r3000_device::get_cop3_creg(int idx)
{
return m_ccr[3][idx];
}
-inline void r3000_device::set_cop3_creg(int idx, UINT32 val)
+inline void r3000_device::set_cop3_creg(int idx, uint32_t val)
{
m_ccr[3][idx] = val;
}
@@ -997,7 +997,7 @@ inline void r3000_device::handle_cop3()
// cycles it takes for one instruction to execute
//-------------------------------------------------
-UINT32 r3000_device::execute_min_cycles() const
+uint32_t r3000_device::execute_min_cycles() const
{
return 1;
}
@@ -1008,7 +1008,7 @@ UINT32 r3000_device::execute_min_cycles() const
// cycles it takes for one instruction to execute
//-------------------------------------------------
-UINT32 r3000_device::execute_max_cycles() const
+uint32_t r3000_device::execute_max_cycles() const
{
return 40;
}
@@ -1019,7 +1019,7 @@ UINT32 r3000_device::execute_max_cycles() const
// input/interrupt lines
//-------------------------------------------------
-UINT32 r3000_device::execute_input_lines() const
+uint32_t r3000_device::execute_input_lines() const
{
return 6;
}
@@ -1051,7 +1051,7 @@ void r3000_device::execute_run()
// core execution loop
do
{
- UINT64 temp64;
+ uint64_t temp64;
int temp;
// debugging
@@ -1078,10 +1078,10 @@ void r3000_device::execute_run()
{
case 0x00: /* SLL */ if (RDREG) RDVAL = RTVAL << SHIFT; break;
case 0x02: /* SRL */ if (RDREG) RDVAL = RTVAL >> SHIFT; break;
- case 0x03: /* SRA */ if (RDREG) RDVAL = (INT32)RTVAL >> SHIFT; break;
+ case 0x03: /* SRA */ if (RDREG) RDVAL = (int32_t)RTVAL >> SHIFT; break;
case 0x04: /* SLLV */ if (RDREG) RDVAL = RTVAL << (RSVAL & 31); break;
case 0x06: /* SRLV */ if (RDREG) RDVAL = RTVAL >> (RSVAL & 31); break;
- case 0x07: /* SRAV */ if (RDREG) RDVAL = (INT32)RTVAL >> (RSVAL & 31); break;
+ case 0x07: /* SRAV */ if (RDREG) RDVAL = (int32_t)RTVAL >> (RSVAL & 31); break;
case 0x08: /* JR */ SETPC(RSVAL); break;
case 0x09: /* JALR */ SETPCL(RSVAL, RDREG); break;
case 0x0c: /* SYSCALL */ generate_exception(EXCEPTION_SYSCALL); break;
@@ -1092,22 +1092,22 @@ void r3000_device::execute_run()
case 0x12: /* MFLO */ if (RDREG) RDVAL = m_lo; break;
case 0x13: /* MTLO */ m_lo = RSVAL; break;
case 0x18: /* MULT */
- temp64 = (INT64)(INT32)RSVAL * (INT64)(INT32)RTVAL;
- m_lo = (UINT32)temp64;
- m_hi = (UINT32)(temp64 >> 32);
+ temp64 = (int64_t)(int32_t)RSVAL * (int64_t)(int32_t)RTVAL;
+ m_lo = (uint32_t)temp64;
+ m_hi = (uint32_t)(temp64 >> 32);
m_icount -= 11;
break;
case 0x19: /* MULTU */
- temp64 = (UINT64)RSVAL * (UINT64)RTVAL;
- m_lo = (UINT32)temp64;
- m_hi = (UINT32)(temp64 >> 32);
+ temp64 = (uint64_t)RSVAL * (uint64_t)RTVAL;
+ m_lo = (uint32_t)temp64;
+ m_hi = (uint32_t)(temp64 >> 32);
m_icount -= 11;
break;
case 0x1a: /* DIV */
if (RTVAL)
{
- m_lo = (INT32)RSVAL / (INT32)RTVAL;
- m_hi = (INT32)RSVAL % (INT32)RTVAL;
+ m_lo = (int32_t)RSVAL / (int32_t)RTVAL;
+ m_hi = (int32_t)RSVAL % (int32_t)RTVAL;
}
m_icount -= 34;
break;
@@ -1133,8 +1133,8 @@ void r3000_device::execute_run()
case 0x25: /* OR */ if (RDREG) RDVAL = RSVAL | RTVAL; break;
case 0x26: /* XOR */ if (RDREG) RDVAL = RSVAL ^ RTVAL; break;
case 0x27: /* NOR */ if (RDREG) RDVAL = ~(RSVAL | RTVAL); break;
- case 0x2a: /* SLT */ if (RDREG) RDVAL = (INT32)RSVAL < (INT32)RTVAL; break;
- case 0x2b: /* SLTU */ if (RDREG) RDVAL = (UINT32)RSVAL < (UINT32)RTVAL; break;
+ case 0x2a: /* SLT */ if (RDREG) RDVAL = (int32_t)RSVAL < (int32_t)RTVAL; break;
+ case 0x2b: /* SLTU */ if (RDREG) RDVAL = (uint32_t)RSVAL < (uint32_t)RTVAL; break;
case 0x30: /* TEQ */ invalid_instruction(); break;
case 0x31: /* TGEU */ invalid_instruction(); break;
case 0x32: /* TLT */ invalid_instruction(); break;
@@ -1148,8 +1148,8 @@ void r3000_device::execute_run()
case 0x01: /* REGIMM */
switch (RTREG)
{
- case 0x00: /* BLTZ */ if ((INT32)RSVAL < 0) ADDPC(SIMMVAL); break;
- case 0x01: /* BGEZ */ if ((INT32)RSVAL >= 0) ADDPC(SIMMVAL); break;
+ case 0x00: /* BLTZ */ if ((int32_t)RSVAL < 0) ADDPC(SIMMVAL); break;
+ case 0x01: /* BGEZ */ if ((int32_t)RSVAL >= 0) ADDPC(SIMMVAL); break;
case 0x02: /* BLTZL */ invalid_instruction(); break;
case 0x03: /* BGEZL */ invalid_instruction(); break;
case 0x08: /* TGEI */ invalid_instruction(); break;
@@ -1158,8 +1158,8 @@ void r3000_device::execute_run()
case 0x0b: /* TLTIU */ invalid_instruction(); break;
case 0x0c: /* TEQI */ invalid_instruction(); break;
case 0x0e: /* TNEI */ invalid_instruction(); break;
- case 0x10: /* BLTZAL */ if ((INT32)RSVAL < 0) ADDPCL(SIMMVAL,31); break;
- case 0x11: /* BGEZAL */ if ((INT32)RSVAL >= 0) ADDPCL(SIMMVAL,31); break;
+ case 0x10: /* BLTZAL */ if ((int32_t)RSVAL < 0) ADDPCL(SIMMVAL,31); break;
+ case 0x11: /* BGEZAL */ if ((int32_t)RSVAL >= 0) ADDPCL(SIMMVAL,31); break;
case 0x12: /* BLTZALL */ invalid_instruction(); break;
case 0x13: /* BGEZALL */ invalid_instruction(); break;
default: /* ??? */ invalid_instruction(); break;
@@ -1170,15 +1170,15 @@ void r3000_device::execute_run()
case 0x03: /* JAL */ ABSPCL(LIMMVAL,31); break;
case 0x04: /* BEQ */ if (RSVAL == RTVAL) ADDPC(SIMMVAL); break;
case 0x05: /* BNE */ if (RSVAL != RTVAL) ADDPC(SIMMVAL); break;
- case 0x06: /* BLEZ */ if ((INT32)RSVAL <= 0) ADDPC(SIMMVAL); break;
- case 0x07: /* BGTZ */ if ((INT32)RSVAL > 0) ADDPC(SIMMVAL); break;
+ case 0x06: /* BLEZ */ if ((int32_t)RSVAL <= 0) ADDPC(SIMMVAL); break;
+ case 0x07: /* BGTZ */ if ((int32_t)RSVAL > 0) ADDPC(SIMMVAL); break;
case 0x08: /* ADDI */
if (ENABLE_OVERFLOWS && RSVAL > ~SIMMVAL) generate_exception(EXCEPTION_OVERFLOW);
else if (RTREG) RTVAL = RSVAL + SIMMVAL;
break;
case 0x09: /* ADDIU */ if (RTREG) RTVAL = RSVAL + SIMMVAL; break;
- case 0x0a: /* SLTI */ if (RTREG) RTVAL = (INT32)RSVAL < (INT32)SIMMVAL; break;
- case 0x0b: /* SLTIU */ if (RTREG) RTVAL = (UINT32)RSVAL < (UINT32)SIMMVAL; break;
+ case 0x0a: /* SLTI */ if (RTREG) RTVAL = (int32_t)RSVAL < (int32_t)SIMMVAL; break;
+ case 0x0b: /* SLTIU */ if (RTREG) RTVAL = (uint32_t)RSVAL < (uint32_t)SIMMVAL; break;
case 0x0c: /* ANDI */ if (RTREG) RTVAL = RSVAL & UIMMVAL; break;
case 0x0d: /* ORI */ if (RTREG) RTVAL = RSVAL | UIMMVAL; break;
case 0x0e: /* XORI */ if (RTREG) RTVAL = RSVAL ^ UIMMVAL; break;
@@ -1191,12 +1191,12 @@ void r3000_device::execute_run()
case 0x15: /* BNEL */ invalid_instruction(); break;
case 0x16: /* BLEZL */ invalid_instruction(); break;
case 0x17: /* BGTZL */ invalid_instruction(); break;
- case 0x20: /* LB */ temp = RBYTE(SIMMVAL+RSVAL); if (RTREG) RTVAL = (INT8)temp; break;
- case 0x21: /* LH */ temp = RWORD(SIMMVAL+RSVAL); if (RTREG) RTVAL = (INT16)temp; break;
+ case 0x20: /* LB */ temp = RBYTE(SIMMVAL+RSVAL); if (RTREG) RTVAL = (int8_t)temp; break;
+ case 0x21: /* LH */ temp = RWORD(SIMMVAL+RSVAL); if (RTREG) RTVAL = (int16_t)temp; break;
case 0x22: /* LWL */ (*this.*m_lwl)(); break;
case 0x23: /* LW */ temp = RLONG(SIMMVAL+RSVAL); if (RTREG) RTVAL = temp; break;
- case 0x24: /* LBU */ temp = RBYTE(SIMMVAL+RSVAL); if (RTREG) RTVAL = (UINT8)temp; break;
- case 0x25: /* LHU */ temp = RWORD(SIMMVAL+RSVAL); if (RTREG) RTVAL = (UINT16)temp; break;
+ case 0x24: /* LBU */ temp = RBYTE(SIMMVAL+RSVAL); if (RTREG) RTVAL = (uint8_t)temp; break;
+ case 0x25: /* LHU */ temp = RWORD(SIMMVAL+RSVAL); if (RTREG) RTVAL = (uint16_t)temp; break;
case 0x26: /* LWR */ (*this.*m_lwr)(); break;
case 0x28: /* SB */ WBYTE(SIMMVAL+RSVAL, RTVAL); break;
case 0x29: /* SH */ WWORD(SIMMVAL+RSVAL, RTVAL); break;
@@ -1238,7 +1238,7 @@ void r3000_device::execute_run()
void r3000_device::lwl_be()
{
offs_t offs = SIMMVAL + RSVAL;
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
if (RTREG)
{
if (!(offs & 3)) RTVAL = temp;
@@ -1253,7 +1253,7 @@ void r3000_device::lwl_be()
void r3000_device::lwr_be()
{
offs_t offs = SIMMVAL + RSVAL;
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
if (RTREG)
{
if ((offs & 3) == 3) RTVAL = temp;
@@ -1271,7 +1271,7 @@ void r3000_device::swl_be()
if (!(offs & 3)) WLONG(offs, RTVAL);
else
{
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
int shift = 8 * (offs & 3);
WLONG(offs & ~3, (temp & (0xffffff00 << (24 - shift))) | (RTVAL >> shift));
}
@@ -1284,7 +1284,7 @@ void r3000_device::swr_be()
if ((offs & 3) == 3) WLONG(offs & ~3, RTVAL);
else
{
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
int shift = 8 * (offs & 3);
WLONG(offs & ~3, (temp & (0x00ffffff >> shift)) | (RTVAL << (24 - shift)));
}
@@ -1295,7 +1295,7 @@ void r3000_device::swr_be()
void r3000_device::lwl_le()
{
offs_t offs = SIMMVAL + RSVAL;
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
if (RTREG)
{
if (!(offs & 3)) RTVAL = temp;
@@ -1310,7 +1310,7 @@ void r3000_device::lwl_le()
void r3000_device::lwr_le()
{
offs_t offs = SIMMVAL + RSVAL;
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
if (RTREG)
{
if ((offs & 3) == 3) RTVAL = temp;
@@ -1328,7 +1328,7 @@ void r3000_device::swl_le()
if (!(offs & 3)) WLONG(offs, RTVAL);
else
{
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
int shift = 8 * (offs & 3);
WLONG(offs & ~3, (temp & (0x00ffffff >> (24 - shift))) | (RTVAL << shift));
}
@@ -1340,7 +1340,7 @@ void r3000_device::swr_le()
if ((offs & 3) == 3) WLONG(offs & ~3, RTVAL);
else
{
- UINT32 temp = RLONG(offs & ~3);
+ uint32_t temp = RLONG(offs & ~3);
int shift = 8 * (offs & 3);
WLONG(offs & ~3, (temp & (0xffffff00 << shift)) | (RTVAL >> (24 - shift)));
}