summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/e132xs/e132xs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/e132xs/e132xs.cpp')
-rw-r--r--src/devices/cpu/e132xs/e132xs.cpp421
1 files changed, 211 insertions, 210 deletions
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp
index 246093ba309..c5c8e7388a0 100644
--- a/src/devices/cpu/e132xs/e132xs.cpp
+++ b/src/devices/cpu/e132xs/e132xs.cpp
@@ -259,25 +259,25 @@
/* Internal registers */
-#define SREG (decode)->src_value
-#define SREGF (decode)->next_src_value
-#define DREG (decode)->dst_value
-#define DREGF (decode)->next_dst_value
-#define EXTRA_U (decode)->extra.u
-#define EXTRA_S (decode)->extra.s
-
-#define SET_SREG( _data_ ) ((decode)->src_is_local ? set_local_register((decode)->src, (uint32_t)_data_) : set_global_register((decode)->src, (uint32_t)_data_))
-#define SET_SREGF( _data_ ) ((decode)->src_is_local ? set_local_register((decode)->src + 1, (uint32_t)_data_) : set_global_register((decode)->src + 1, (uint32_t)_data_))
-#define SET_DREG( _data_ ) ((decode)->dst_is_local ? set_local_register((decode)->dst, (uint32_t)_data_) : set_global_register((decode)->dst, (uint32_t)_data_))
-#define SET_DREGF( _data_ ) ((decode)->dst_is_local ? set_local_register((decode)->dst + 1, (uint32_t)_data_) : set_global_register((decode)->dst + 1, (uint32_t)_data_))
-
-#define SRC_IS_PC (!(decode)->src_is_local && (decode)->src == PC_REGISTER)
-#define DST_IS_PC (!(decode)->dst_is_local && (decode)->dst == PC_REGISTER)
-#define SRC_IS_SR (!(decode)->src_is_local && (decode)->src == SR_REGISTER)
-#define DST_IS_SR (!(decode)->dst_is_local && (decode)->dst == SR_REGISTER)
-#define SAME_SRC_DST (decode)->same_src_dst
-#define SAME_SRC_DSTF (decode)->same_src_dstf
-#define SAME_SRCF_DST (decode)->same_srcf_dst
+#define SREG decode.src_value
+#define SREGF decode.next_src_value
+#define DREG decode.dst_value
+#define DREGF decode.next_dst_value
+#define EXTRA_U decode.extra.u
+#define EXTRA_S decode.extra.s
+
+#define SET_SREG( _data_ ) (decode.src_is_local ? set_local_register(decode.src, (uint32_t)_data_) : set_global_register(decode.src, (uint32_t)_data_))
+#define SET_SREGF( _data_ ) (decode.src_is_local ? set_local_register(decode.src + 1, (uint32_t)_data_) : set_global_register(decode.src + 1, (uint32_t)_data_))
+#define SET_DREG( _data_ ) (decode.dst_is_local ? set_local_register(decode.dst, (uint32_t)_data_) : set_global_register(decode.dst, (uint32_t)_data_))
+#define SET_DREGF( _data_ ) (decode.dst_is_local ? set_local_register(decode.dst + 1, (uint32_t)_data_) : set_global_register(decode.dst + 1, (uint32_t)_data_))
+
+#define SRC_IS_PC (!decode.src_is_local && decode.src == PC_REGISTER)
+#define DST_IS_PC (!decode.dst_is_local && decode.dst == PC_REGISTER)
+#define SRC_IS_SR (!decode.src_is_local && decode.src == SR_REGISTER)
+#define DST_IS_SR (!decode.dst_is_local && decode.dst == SR_REGISTER)
+#define SAME_SRC_DST decode.same_src_dst
+#define SAME_SRC_DSTF decode.same_src_dstf
+#define SAME_SRCF_DST decode.same_srcf_dst
/* Memory access */
@@ -900,38 +900,42 @@ do
{ \
if(local) \
{ \
- uint8_t code = (decode)->src; \
- (decode)->src_is_local = 1; \
- code = ((decode)->src + GET_FP) % 64; /* registers offset by frame pointer */\
+ uint8_t code = decode.src; \
+ decode.src_is_local = 1; \
+ code = (decode.src + GET_FP) % 64; /* registers offset by frame pointer */ \
SREG = m_local_regs[code]; \
- code = ((decode)->src + 1 + GET_FP) % 64; \
+ code = (decode.src + 1 + GET_FP) % 64; \
SREGF = m_local_regs[code]; \
} \
else \
{ \
- (decode)->src_is_local = 0; \
+ decode.src_is_local = 0; \
\
if (!hflag) \
{ \
- SREG = get_global_register((decode)->src); \
+ SREG = get_global_register(decode.src); \
\
/* bound safe */ \
- if ((decode)->src != 15) \
- SREGF = get_global_register((decode)->src + 1); \
+ if (decode.src != 15) \
+ SREGF = get_global_register(decode.src + 1); \
+ else \
+ SREGF = 0; \
} \
else \
{ \
- (decode)->src += 16; \
+ decode.src += 16; \
\
- SREG = get_global_register((decode)->src); \
- if ((WRITE_ONLY_REGMASK >> (decode)->src) & 1) \
+ SREG = get_global_register(decode.src); \
+ if ((WRITE_ONLY_REGMASK >> decode.src) & 1) \
SREG = 0; /* write-only registers */ \
- else if ((decode)->src == ISR_REGISTER) \
+ else if (decode.src == ISR_REGISTER) \
DEBUG_PRINTF(("read src ISR. PC = %08X\n",PPC)); \
\
/* bound safe */ \
- if ((decode)->src != 31) \
- SREGF = get_global_register((decode)->src + 1); \
+ if (decode.src != 31) \
+ SREGF = get_global_register(decode.src + 1); \
+ else \
+ SREGF = 0; \
} \
} \
} while (0)
@@ -941,36 +945,36 @@ do
{ \
if(local) \
{ \
- uint8_t code = (decode)->dst; \
- (decode)->dst_is_local = 1; \
- code = ((decode)->dst + GET_FP) % 64; /* registers offset by frame pointer */\
+ uint8_t code = decode.dst; \
+ decode.dst_is_local = 1; \
+ code = (decode.dst + GET_FP) % 64; /* registers offset by frame pointer */ \
DREG = m_local_regs[code]; \
- code = ((decode)->dst + 1 + GET_FP) % 64; \
+ code = (decode.dst + 1 + GET_FP) % 64; \
DREGF = m_local_regs[code]; \
} \
else \
{ \
- (decode)->dst_is_local = 0; \
+ decode.dst_is_local = 0; \
\
if (!hflag) \
{ \
- DREG = get_global_register((decode)->dst); \
+ DREG = get_global_register(decode.dst); \
\
/* bound safe */ \
- if ((decode)->dst != 15) \
- DREGF = get_global_register((decode)->dst + 1); \
+ if (decode.dst != 15) \
+ DREGF = get_global_register(decode.dst + 1); \
} \
else \
{ \
- (decode)->dst += 16; \
+ decode.dst += 16; \
\
- DREG = get_global_register((decode)->dst); \
- if( (decode)->dst == ISR_REGISTER ) \
+ DREG = get_global_register(decode.dst); \
+ if( decode.dst == ISR_REGISTER ) \
DEBUG_PRINTF(("read dst ISR. PC = %08X\n",PPC)); \
\
/* bound safe */ \
- if ((decode)->dst != 31) \
- DREGF = get_global_register((decode)->dst + 1); \
+ if (decode.dst != 31) \
+ DREGF = get_global_register(decode.dst + 1); \
} \
} \
} while (0)
@@ -978,57 +982,54 @@ do
#define decode_RR(decode, dlocal, slocal) \
do \
{ \
- (decode)->src = SRC_CODE; \
- (decode)->dst = DST_CODE; \
+ decode.src = SRC_CODE; \
+ decode.dst = DST_CODE; \
decode_source(decode, slocal, 0); \
decode_dest(decode, dlocal, 0); \
\
- if( (slocal) == (dlocal) && SRC_CODE == DST_CODE ) \
- SAME_SRC_DST = 1; \
+ SAME_SRC_DST = ((slocal) == (dlocal) && SRC_CODE == DST_CODE); \
\
- if( (slocal) == LOCAL && (dlocal) == LOCAL ) \
+ if ((slocal) && (dlocal)) \
{ \
- if( SRC_CODE == ((DST_CODE + 1) % 64) ) \
- SAME_SRC_DSTF = 1; \
- \
- if( ((SRC_CODE + 1) % 64) == DST_CODE ) \
- SAME_SRCF_DST = 1; \
+ SAME_SRC_DSTF = (SRC_CODE == ((DST_CODE + 1) % 64)); \
+ SAME_SRCF_DST = (((SRC_CODE + 1) % 64) == DST_CODE); \
} \
- else if( (slocal) == 0 && (dlocal) == 0 ) \
+ else if ((slocal) == 0 && (dlocal) == 0) \
{ \
- if( SRC_CODE == (DST_CODE + 1) ) \
- SAME_SRC_DSTF = 1; \
- \
- if( (SRC_CODE + 1) == DST_CODE ) \
- SAME_SRCF_DST = 1; \
+ SAME_SRC_DSTF = (SRC_CODE == (DST_CODE + 1)); \
+ SAME_SRCF_DST = ((SRC_CODE + 1) == DST_CODE); \
} \
+ else \
+ { \
+ SAME_SRC_DSTF = 0; \
+ SAME_SRCF_DST = 0; \
+ } \
} while (0)
#define decode_LL(decode) \
do \
{ \
- (decode)->src = SRC_CODE; \
- (decode)->dst = DST_CODE; \
+ decode.src = SRC_CODE; \
+ decode.dst = DST_CODE; \
decode_source(decode, LOCAL, 0); \
decode_dest(decode, LOCAL, 0); \
\
- if( SRC_CODE == DST_CODE ) \
- SAME_SRC_DST = 1; \
- \
- if( SRC_CODE == ((DST_CODE + 1) % 64) ) \
- SAME_SRC_DSTF = 1; \
+ SAME_SRC_DST = (SRC_CODE == DST_CODE); \
+ SAME_SRC_DSTF = (SRC_CODE == ((DST_CODE + 1) % 64)); \
+ SAME_SRCF_DST = 0; \
} while (0)
#define decode_LR(decode, slocal) \
do \
{ \
- (decode)->src = SRC_CODE; \
- (decode)->dst = DST_CODE; \
+ decode.src = SRC_CODE; \
+ decode.dst = DST_CODE; \
decode_source(decode, slocal, 0); \
decode_dest(decode, LOCAL, 0); \
\
- if( ((SRC_CODE + 1) % 64) == DST_CODE && slocal == LOCAL ) \
- SAME_SRCF_DST = 1; \
+ SAME_SRC_DST = 0; \
+ SAME_SRC_DSTF = 0; \
+ SAME_SRCF_DST = (((SRC_CODE + 1) % 64) == DST_CODE && slocal == LOCAL); \
} while (0)
#define check_delay_PC() \
@@ -1141,7 +1142,7 @@ do
PC += 2; \
m_instruction_length = (2<<19); \
\
- (decode)->sub_type = DD(next_1); \
+ decode.sub_type = DD(next_1); \
\
if( E_BIT(next_1) ) \
{ \
@@ -1176,7 +1177,7 @@ do
PC += 2; \
m_instruction_length = (2<<19); \
\
- (decode)->sub_type = X_CODE(next); \
+ decode.sub_type = X_CODE(next); \
\
if( E_BIT(next) ) \
{ \
@@ -1225,8 +1226,8 @@ do
do \
{ \
check_delay_PC(); \
- (decode)->src = SRC_CODE; \
- (decode)->dst = DST_CODE; \
+ decode.src = SRC_CODE; \
+ decode.dst = DST_CODE; \
decode_source(decode, slocal, GET_H); \
decode_dest(decode, dlocal, GET_H); \
\
@@ -1240,7 +1241,7 @@ do
{ \
decode_immediate(decode, nbit); \
check_delay_PC(); \
- (decode)->dst = DST_CODE; \
+ decode.dst = DST_CODE; \
decode_dest(decode, dlocal, 0); \
} while (0)
@@ -1248,7 +1249,7 @@ do
do \
{ \
check_delay_PC(); \
- (decode)->dst = DST_CODE; \
+ decode.dst = DST_CODE; \
decode_dest(decode, dlocal, 0); \
} while (0)
@@ -1257,7 +1258,7 @@ do
{ \
decode_immediate(decode, nbit); \
check_delay_PC(); \
- (decode)->dst = DST_CODE; \
+ decode.dst = DST_CODE; \
decode_dest(decode, dlocal, GET_H); \
} while (0)
@@ -1265,7 +1266,7 @@ do
do \
{ \
check_delay_PC(); \
- (decode)->dst = DST_CODE; \
+ decode.dst = DST_CODE; \
decode_dest(decode, LOCAL, 0); \
} while (0)
@@ -1320,7 +1321,7 @@ do
} while (0)
-void hyperstone_device::execute_br(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::execute_br(regs_decode &decode)
{
PPC = PC;
PC += EXTRA_S;
@@ -1329,7 +1330,7 @@ void hyperstone_device::execute_br(struct hyperstone_device::regs_decode *decode
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::execute_dbr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::execute_dbr(regs_decode &decode)
{
m_delay.delay_cmd = DELAY_EXECUTE;
m_delay.delay_pc = PC + EXTRA_S;
@@ -1423,7 +1424,7 @@ void hyperstone_device::execute_exception(uint32_t addr)
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::execute_software(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::execute_software(regs_decode &decode)
{
uint8_t reg;
uint32_t oldSR;
@@ -1438,7 +1439,7 @@ void hyperstone_device::execute_software(struct hyperstone_device::regs_decode *
//since it's sure the register is in the register part of the stack,
//set the stack address to a value above the highest address
//that can be set by a following frame instruction
- stack_of_dst = (SP & ~0xff) + 64*4 + (((GET_FP + decode->dst) % 64) * 4); //converted to 32bits offset
+ stack_of_dst = (SP & ~0xff) + 64*4 + (((GET_FP + decode.dst) % 64) * 4); //converted to 32bits offset
oldSR = SR;
@@ -1960,7 +1961,7 @@ offs_t hyperstone_device::disasm_disassemble(std::ostream &stream, offs_t pc, co
/* Opcodes */
-void hyperstone_device::hyperstone_chk(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_chk(regs_decode &decode)
{
uint32_t addr = get_trap_addr(TRAPNO_RANGE_ERROR);
@@ -1986,7 +1987,7 @@ void hyperstone_device::hyperstone_chk(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_movd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_movd(regs_decode &decode)
{
if( DST_IS_PC ) // Rd denotes PC
{
@@ -2065,7 +2066,7 @@ void hyperstone_device::hyperstone_movd(struct hyperstone_device::regs_decode *d
}
}
-void hyperstone_device::hyperstone_divu(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_divu(regs_decode &decode)
{
if( SAME_SRC_DST || SAME_SRC_DSTF )
{
@@ -2114,7 +2115,7 @@ void hyperstone_device::hyperstone_divu(struct hyperstone_device::regs_decode *d
m_icount -= 36 << m_clck_scale;
}
-void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_divs(regs_decode &decode)
{
if( SAME_SRC_DST || SAME_SRC_DSTF )
{
@@ -2163,7 +2164,7 @@ void hyperstone_device::hyperstone_divs(struct hyperstone_device::regs_decode *d
m_icount -= 36 << m_clck_scale;
}
-void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_xm(regs_decode &decode)
{
if( SRC_IS_SR || DST_IS_SR || DST_IS_PC )
{
@@ -2171,7 +2172,7 @@ void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *dec
}
else
{
- switch( decode->sub_type ) // x_code
+ switch( decode.sub_type ) // x_code
{
case 0:
case 1:
@@ -2189,7 +2190,7 @@ void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *dec
}
else
{
- SREG <<= decode->sub_type;
+ SREG <<= decode.sub_type;
}
break;
@@ -2198,8 +2199,8 @@ void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *dec
case 5:
case 6:
case 7:
- decode->sub_type -= 4;
- SREG <<= decode->sub_type;
+ decode.sub_type -= 4;
+ SREG <<= decode.sub_type;
break;
}
@@ -2210,7 +2211,7 @@ void hyperstone_device::hyperstone_xm(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_mask(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_mask(regs_decode &decode)
{
DREG = SREG & EXTRA_U;
@@ -2220,7 +2221,7 @@ void hyperstone_device::hyperstone_mask(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_sum(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sum(regs_decode &decode)
{
uint64_t tmp;
@@ -2244,7 +2245,7 @@ void hyperstone_device::hyperstone_sum(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_sums(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sums(regs_decode &decode)
{
int32_t res;
int64_t tmp;
@@ -2275,7 +2276,7 @@ void hyperstone_device::hyperstone_sums(struct hyperstone_device::regs_decode *d
}
}
-void hyperstone_device::hyperstone_cmp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_cmp(regs_decode &decode)
{
uint64_t tmp;
@@ -2303,9 +2304,9 @@ void hyperstone_device::hyperstone_cmp(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_mov(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_mov(regs_decode &decode)
{
- if( !GET_S && decode->dst >= 16 )
+ if( !GET_S && decode.dst >= 16 )
{
uint32_t addr = get_trap_addr(TRAPNO_PRIVILEGE_ERROR);
execute_exception(addr);
@@ -2323,7 +2324,7 @@ void hyperstone_device::hyperstone_mov(struct hyperstone_device::regs_decode *de
}
-void hyperstone_device::hyperstone_add(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_add(regs_decode &decode)
{
uint64_t tmp;
@@ -2346,7 +2347,7 @@ void hyperstone_device::hyperstone_add(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_adds(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_adds(regs_decode &decode)
{
int32_t res;
int64_t tmp;
@@ -2377,14 +2378,14 @@ void hyperstone_device::hyperstone_adds(struct hyperstone_device::regs_decode *d
}
}
-void hyperstone_device::hyperstone_cmpb(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_cmpb(regs_decode &decode)
{
SET_Z( (DREG & SREG) == 0 ? 1 : 0 );
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_andn(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_andn(regs_decode &decode)
{
DREG = DREG & ~SREG;
@@ -2394,7 +2395,7 @@ void hyperstone_device::hyperstone_andn(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_or(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_or(regs_decode &decode)
{
DREG = DREG | SREG;
@@ -2404,7 +2405,7 @@ void hyperstone_device::hyperstone_or(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_xor(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_xor(regs_decode &decode)
{
DREG = DREG ^ SREG;
@@ -2414,7 +2415,7 @@ void hyperstone_device::hyperstone_xor(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_subc(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_subc(regs_decode &decode)
{
uint64_t tmp;
@@ -2450,7 +2451,7 @@ void hyperstone_device::hyperstone_subc(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_not(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_not(regs_decode &decode)
{
SET_DREG(~SREG);
SET_Z( ~SREG == 0 ? 1 : 0 );
@@ -2458,7 +2459,7 @@ void hyperstone_device::hyperstone_not(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_sub(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sub(regs_decode &decode)
{
uint64_t tmp;
@@ -2481,7 +2482,7 @@ void hyperstone_device::hyperstone_sub(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_subs(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_subs(regs_decode &decode)
{
int32_t res;
int64_t tmp;
@@ -2513,7 +2514,7 @@ void hyperstone_device::hyperstone_subs(struct hyperstone_device::regs_decode *d
}
}
-void hyperstone_device::hyperstone_addc(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_addc(regs_decode &decode)
{
uint64_t tmp;
@@ -2554,7 +2555,7 @@ void hyperstone_device::hyperstone_addc(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_and(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_and(regs_decode &decode)
{
DREG = DREG & SREG;
@@ -2564,7 +2565,7 @@ void hyperstone_device::hyperstone_and(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_neg(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_neg(regs_decode &decode)
{
uint64_t tmp;
@@ -2585,7 +2586,7 @@ void hyperstone_device::hyperstone_neg(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_negs(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_negs(regs_decode &decode)
{
int32_t res;
int64_t tmp;
@@ -2617,7 +2618,7 @@ void hyperstone_device::hyperstone_negs(struct hyperstone_device::regs_decode *d
}
}
-void hyperstone_device::hyperstone_cmpi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_cmpi(regs_decode &decode)
{
uint64_t tmp;
@@ -2642,9 +2643,9 @@ void hyperstone_device::hyperstone_cmpi(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_movi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_movi(regs_decode &decode)
{
- if( !GET_S && decode->dst >= 16 )
+ if( !GET_S && decode.dst >= 16 )
{
uint32_t addr = get_trap_addr(TRAPNO_PRIVILEGE_ERROR);
execute_exception(addr);
@@ -2665,7 +2666,7 @@ void hyperstone_device::hyperstone_movi(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_addi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_addi(regs_decode &decode)
{
uint32_t imm;
uint64_t tmp;
@@ -2692,7 +2693,7 @@ void hyperstone_device::hyperstone_addi(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_addsi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_addsi(regs_decode &decode)
{
int32_t imm, res;
int64_t tmp;
@@ -2725,7 +2726,7 @@ void hyperstone_device::hyperstone_addsi(struct hyperstone_device::regs_decode *
}
}
-void hyperstone_device::hyperstone_cmpbi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_cmpbi(regs_decode &decode)
{
uint32_t imm;
@@ -2754,7 +2755,7 @@ void hyperstone_device::hyperstone_cmpbi(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_andni(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_andni(regs_decode &decode)
{
uint32_t imm;
@@ -2771,7 +2772,7 @@ void hyperstone_device::hyperstone_andni(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_ori(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ori(regs_decode &decode)
{
DREG = DREG | EXTRA_U;
@@ -2781,7 +2782,7 @@ void hyperstone_device::hyperstone_ori(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_xori(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_xori(regs_decode &decode)
{
DREG = DREG ^ EXTRA_U;
@@ -2791,7 +2792,7 @@ void hyperstone_device::hyperstone_xori(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_shrdi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shrdi(regs_decode &decode)
{
uint32_t low_order, high_order;
uint64_t val;
@@ -2819,7 +2820,7 @@ void hyperstone_device::hyperstone_shrdi(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_shrd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shrd(regs_decode &decode)
{
uint32_t low_order, high_order;
uint64_t val;
@@ -2857,7 +2858,7 @@ void hyperstone_device::hyperstone_shrd(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_shr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shr(regs_decode &decode)
{
uint32_t ret;
uint8_t n;
@@ -2879,7 +2880,7 @@ void hyperstone_device::hyperstone_shr(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_sardi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sardi(regs_decode &decode)
{
uint32_t low_order, high_order;
uint64_t val;
@@ -2919,7 +2920,7 @@ void hyperstone_device::hyperstone_sardi(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_sard(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sard(regs_decode &decode)
{
uint32_t low_order, high_order;
uint64_t val;
@@ -2969,7 +2970,7 @@ void hyperstone_device::hyperstone_sard(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_sar(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sar(regs_decode &decode)
{
uint32_t ret;
uint8_t n, sign_bit;
@@ -3001,7 +3002,7 @@ void hyperstone_device::hyperstone_sar(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_shldi(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shldi(regs_decode &decode)
{
uint32_t low_order, high_order, tmp;
uint64_t val, mask;
@@ -3034,7 +3035,7 @@ void hyperstone_device::hyperstone_shldi(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_shld(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shld(regs_decode &decode)
{
uint32_t low_order, high_order, tmp, n;
uint64_t val, mask;
@@ -3078,7 +3079,7 @@ void hyperstone_device::hyperstone_shld(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_shl(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shl(regs_decode &decode)
{
uint32_t base, ret, n;
uint64_t mask;
@@ -3102,12 +3103,12 @@ void hyperstone_device::hyperstone_shl(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::reserved(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::reserved(regs_decode &decode)
{
DEBUG_PRINTF(("Executed Reserved opcode. PC = %08X OP = %04X\n", PC, OP));
}
-void hyperstone_device::hyperstone_testlz(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_testlz(regs_decode &decode)
{
uint8_t zeros = 0;
uint32_t mask;
@@ -3128,7 +3129,7 @@ void hyperstone_device::hyperstone_testlz(struct hyperstone_device::regs_decode
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_rol(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_rol(regs_decode &decode)
{
uint32_t val, base;
uint8_t n;
@@ -3165,13 +3166,13 @@ void hyperstone_device::hyperstone_rol(struct hyperstone_device::regs_decode *de
}
//TODO: add trap error
-void hyperstone_device::hyperstone_ldxx1(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ldxx1(regs_decode &decode)
{
uint32_t load;
if( DST_IS_SR )
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // LDBS.A
@@ -3245,7 +3246,7 @@ void hyperstone_device::hyperstone_ldxx1(struct hyperstone_device::regs_decode *
}
else
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // LDBS.D
@@ -3321,7 +3322,7 @@ void hyperstone_device::hyperstone_ldxx1(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_ldxx2(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ldxx2(regs_decode &decode)
{
uint32_t load;
@@ -3331,7 +3332,7 @@ void hyperstone_device::hyperstone_ldxx2(struct hyperstone_device::regs_decode *
}
else
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // LDBS.N
@@ -3442,14 +3443,14 @@ void hyperstone_device::hyperstone_ldxx2(struct hyperstone_device::regs_decode *
}
//TODO: add trap error
-void hyperstone_device::hyperstone_stxx1(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stxx1(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = SREGF = 0;
if( DST_IS_SR )
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // STBS.A
@@ -3511,7 +3512,7 @@ void hyperstone_device::hyperstone_stxx1(struct hyperstone_device::regs_decode *
}
else
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // STBS.D
@@ -3575,7 +3576,7 @@ void hyperstone_device::hyperstone_stxx1(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_stxx2(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stxx2(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = SREGF = 0;
@@ -3586,7 +3587,7 @@ void hyperstone_device::hyperstone_stxx2(struct hyperstone_device::regs_decode *
}
else
{
- switch( decode->sub_type )
+ switch( decode.sub_type )
{
case 0: // STBS.N
@@ -3629,7 +3630,7 @@ void hyperstone_device::hyperstone_stxx2(struct hyperstone_device::regs_decode *
WRITE_W(DREG, SREG);
else
{
- if(((DREG & 0xfc) >> 2) == ((decode->src + GET_FP) % 64) && S_BIT == LOCAL)
+ if(((DREG & 0xfc) >> 2) == ((decode.src + GET_FP) % 64) && S_BIT == LOCAL)
DEBUG_PRINTF(("STW.S denoted the same local register @ %08X\n",PPC));
SET_ABS_L_REG((DREG & 0xfc) >> 2,SREG);
@@ -3669,7 +3670,7 @@ void hyperstone_device::hyperstone_stxx2(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_shri(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shri(regs_decode &decode)
{
uint32_t val;
@@ -3689,7 +3690,7 @@ void hyperstone_device::hyperstone_shri(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_sari(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_sari(regs_decode &decode)
{
uint32_t val;
uint8_t sign_bit;
@@ -3720,7 +3721,7 @@ void hyperstone_device::hyperstone_sari(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_shli(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_shli(regs_decode &decode)
{
uint32_t val, val2;
uint64_t mask;
@@ -3743,7 +3744,7 @@ void hyperstone_device::hyperstone_shli(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_mulu(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_mulu(regs_decode &decode)
{
uint32_t low_order, high_order;
uint64_t double_word;
@@ -3773,7 +3774,7 @@ void hyperstone_device::hyperstone_mulu(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_muls(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_muls(regs_decode &decode)
{
uint32_t low_order, high_order;
int64_t double_word;
@@ -3802,7 +3803,7 @@ void hyperstone_device::hyperstone_muls(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_set(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_set(regs_decode &decode)
{
int n = N_VALUE;
@@ -4148,7 +4149,7 @@ void hyperstone_device::hyperstone_set(struct hyperstone_device::regs_decode *de
}
}
-void hyperstone_device::hyperstone_mul(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_mul(regs_decode &decode)
{
uint32_t single_word;
@@ -4173,91 +4174,91 @@ void hyperstone_device::hyperstone_mul(struct hyperstone_device::regs_decode *de
m_icount -= 5 << m_clck_scale;
}
-void hyperstone_device::hyperstone_fadd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fadd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_faddd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_faddd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fsub(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fsub(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fsubd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fsubd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fmul(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fmul(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fmuld(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fmuld(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fdiv(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fdiv(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fdivd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fdivd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcmp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcmp(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcmpd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcmpd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcmpu(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcmpu(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcmpud(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcmpud(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcvt(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcvt(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_fcvtd(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_fcvtd(regs_decode &decode)
{
execute_software(decode);
m_icount -= m_clock_cycles_6;
}
-void hyperstone_device::hyperstone_extend(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_extend(regs_decode &decode)
{
//TODO: add locks, overflow error and other things
uint32_t vals, vald;
@@ -4458,19 +4459,19 @@ void hyperstone_device::hyperstone_extend(struct hyperstone_device::regs_decode
m_icount -= m_clock_cycles_1; //TODO: with the latency it can change
}
-void hyperstone_device::hyperstone_do(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_do(regs_decode &decode)
{
fatalerror("Executed hyperstone_do instruction. PC = %08X\n", PPC);
}
-void hyperstone_device::hyperstone_ldwr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ldwr(regs_decode &decode)
{
SET_SREG(READ_W(DREG));
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_lddr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_lddr(regs_decode &decode)
{
SET_SREG(READ_W(DREG));
SET_SREGF(READ_W(DREG + 4));
@@ -4478,26 +4479,26 @@ void hyperstone_device::hyperstone_lddr(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_ldwp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ldwp(regs_decode &decode)
{
SET_SREG(READ_W(DREG));
// post increment the destination register if it's different from the source one
// (needed by Hidden Catch)
- if(!(decode->src == decode->dst && S_BIT == LOCAL))
+ if(!(decode.src == decode.dst && S_BIT == LOCAL))
SET_DREG(DREG + 4);
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_lddp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_lddp(regs_decode &decode)
{
SET_SREG(READ_W(DREG));
SET_SREGF(READ_W(DREG + 4));
// post increment the destination register if it's different from the source one
// and from the "next source" one
- if(!(decode->src == decode->dst && S_BIT == LOCAL) && !SAME_SRCF_DST )
+ if(!(decode.src == decode.dst && S_BIT == LOCAL) && !SAME_SRCF_DST )
{
SET_DREG(DREG + 8);
}
@@ -4509,7 +4510,7 @@ void hyperstone_device::hyperstone_lddp(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_stwr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stwr(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = 0;
@@ -4519,7 +4520,7 @@ void hyperstone_device::hyperstone_stwr(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_stdr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stdr(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = SREGF = 0;
@@ -4530,7 +4531,7 @@ void hyperstone_device::hyperstone_stdr(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_stwp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stwp(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = 0;
@@ -4541,7 +4542,7 @@ void hyperstone_device::hyperstone_stwp(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_stdp(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_stdp(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = SREGF = 0;
@@ -4557,7 +4558,7 @@ void hyperstone_device::hyperstone_stdp(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_2;
}
-void hyperstone_device::hyperstone_dbv(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbv(regs_decode &decode)
{
if( GET_V )
execute_dbr(decode);
@@ -4565,7 +4566,7 @@ void hyperstone_device::hyperstone_dbv(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbnv(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbnv(regs_decode &decode)
{
if( !GET_V )
execute_dbr(decode);
@@ -4573,7 +4574,7 @@ void hyperstone_device::hyperstone_dbnv(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbe(struct hyperstone_device::regs_decode *decode) //or DBZ
+void hyperstone_device::hyperstone_dbe(regs_decode &decode) //or DBZ
{
if( GET_Z )
execute_dbr(decode);
@@ -4581,7 +4582,7 @@ void hyperstone_device::hyperstone_dbe(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbne(struct hyperstone_device::regs_decode *decode) //or DBNZ
+void hyperstone_device::hyperstone_dbne(regs_decode &decode) //or DBNZ
{
if( !GET_Z )
execute_dbr(decode);
@@ -4589,7 +4590,7 @@ void hyperstone_device::hyperstone_dbne(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbc(struct hyperstone_device::regs_decode *decode) //or DBST
+void hyperstone_device::hyperstone_dbc(regs_decode &decode) //or DBST
{
if( GET_C )
execute_dbr(decode);
@@ -4597,7 +4598,7 @@ void hyperstone_device::hyperstone_dbc(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbnc(struct hyperstone_device::regs_decode *decode) //or DBHE
+void hyperstone_device::hyperstone_dbnc(regs_decode &decode) //or DBHE
{
if( !GET_C )
execute_dbr(decode);
@@ -4605,7 +4606,7 @@ void hyperstone_device::hyperstone_dbnc(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbse(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbse(regs_decode &decode)
{
if( GET_C || GET_Z )
execute_dbr(decode);
@@ -4613,7 +4614,7 @@ void hyperstone_device::hyperstone_dbse(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbht(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbht(regs_decode &decode)
{
if( !GET_C && !GET_Z )
execute_dbr(decode);
@@ -4621,7 +4622,7 @@ void hyperstone_device::hyperstone_dbht(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbn(struct hyperstone_device::regs_decode *decode) //or DBLT
+void hyperstone_device::hyperstone_dbn(regs_decode &decode) //or DBLT
{
if( GET_N )
execute_dbr(decode);
@@ -4629,7 +4630,7 @@ void hyperstone_device::hyperstone_dbn(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbnn(struct hyperstone_device::regs_decode *decode) //or DBGE
+void hyperstone_device::hyperstone_dbnn(regs_decode &decode) //or DBGE
{
if( !GET_N )
execute_dbr(decode);
@@ -4637,7 +4638,7 @@ void hyperstone_device::hyperstone_dbnn(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dble(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dble(regs_decode &decode)
{
if( GET_N || GET_Z )
execute_dbr(decode);
@@ -4645,7 +4646,7 @@ void hyperstone_device::hyperstone_dble(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbgt(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbgt(regs_decode &decode)
{
if( !GET_N && !GET_Z )
execute_dbr(decode);
@@ -4653,12 +4654,12 @@ void hyperstone_device::hyperstone_dbgt(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_dbr(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_dbr(regs_decode &decode)
{
execute_dbr(decode);
}
-void hyperstone_device::hyperstone_frame(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_frame(regs_decode &decode)
{
int8_t difference; // really it's 7 bits
uint8_t realfp = GET_FP - SRC_CODE;
@@ -4700,13 +4701,13 @@ void hyperstone_device::hyperstone_frame(struct hyperstone_device::regs_decode *
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_call(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_call(regs_decode &decode)
{
if( SRC_IS_SR )
SREG = 0;
if( !DST_CODE )
- decode->dst = 16;
+ decode.dst = 16;
EXTRA_S = (EXTRA_S & ~1) + SREG;
@@ -4715,7 +4716,7 @@ void hyperstone_device::hyperstone_call(struct hyperstone_device::regs_decode *d
SET_DREG((PC & 0xfffffffe) | GET_S);
SET_DREGF(SR);
- SET_FP(GET_FP + decode->dst);
+ SET_FP(GET_FP + decode.dst);
SET_FL(6); //default value for call
SET_M(0);
@@ -4731,7 +4732,7 @@ void hyperstone_device::hyperstone_call(struct hyperstone_device::regs_decode *d
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bv(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_bv(regs_decode &decode)
{
if( GET_V )
execute_br(decode);
@@ -4739,7 +4740,7 @@ void hyperstone_device::hyperstone_bv(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bnv(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_bnv(regs_decode &decode)
{
if( !GET_V )
execute_br(decode);
@@ -4747,7 +4748,7 @@ void hyperstone_device::hyperstone_bnv(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_be(struct hyperstone_device::regs_decode *decode) //or BZ
+void hyperstone_device::hyperstone_be(regs_decode &decode) //or BZ
{
if( GET_Z )
execute_br(decode);
@@ -4755,7 +4756,7 @@ void hyperstone_device::hyperstone_be(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bne(struct hyperstone_device::regs_decode *decode) //or BNZ
+void hyperstone_device::hyperstone_bne(regs_decode &decode) //or BNZ
{
if( !GET_Z )
execute_br(decode);
@@ -4763,7 +4764,7 @@ void hyperstone_device::hyperstone_bne(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bc(struct hyperstone_device::regs_decode *decode) //or BST
+void hyperstone_device::hyperstone_bc(regs_decode &decode) //or BST
{
if( GET_C )
execute_br(decode);
@@ -4771,7 +4772,7 @@ void hyperstone_device::hyperstone_bc(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bnc(struct hyperstone_device::regs_decode *decode) //or BHE
+void hyperstone_device::hyperstone_bnc(regs_decode &decode) //or BHE
{
if( !GET_C )
execute_br(decode);
@@ -4779,7 +4780,7 @@ void hyperstone_device::hyperstone_bnc(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bse(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_bse(regs_decode &decode)
{
if( GET_C || GET_Z )
execute_br(decode);
@@ -4787,7 +4788,7 @@ void hyperstone_device::hyperstone_bse(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bht(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_bht(regs_decode &decode)
{
if( !GET_C && !GET_Z )
execute_br(decode);
@@ -4795,7 +4796,7 @@ void hyperstone_device::hyperstone_bht(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bn(struct hyperstone_device::regs_decode *decode) //or BLT
+void hyperstone_device::hyperstone_bn(regs_decode &decode) //or BLT
{
if( GET_N )
execute_br(decode);
@@ -4803,7 +4804,7 @@ void hyperstone_device::hyperstone_bn(struct hyperstone_device::regs_decode *dec
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bnn(struct hyperstone_device::regs_decode *decode) //or BGE
+void hyperstone_device::hyperstone_bnn(regs_decode &decode) //or BGE
{
if( !GET_N )
execute_br(decode);
@@ -4811,7 +4812,7 @@ void hyperstone_device::hyperstone_bnn(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_ble(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_ble(regs_decode &decode)
{
if( GET_N || GET_Z )
execute_br(decode);
@@ -4819,7 +4820,7 @@ void hyperstone_device::hyperstone_ble(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_bgt(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_bgt(regs_decode &decode)
{
if( !GET_N && !GET_Z )
execute_br(decode);
@@ -4827,12 +4828,12 @@ void hyperstone_device::hyperstone_bgt(struct hyperstone_device::regs_decode *de
m_icount -= m_clock_cycles_1;
}
-void hyperstone_device::hyperstone_br(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_br(regs_decode &decode)
{
execute_br(decode);
}
-void hyperstone_device::hyperstone_trap(struct hyperstone_device::regs_decode *decode)
+void hyperstone_device::hyperstone_trap(regs_decode &decode)
{
uint8_t code, trapno;
uint32_t addr;