diff options
Diffstat (limited to 'src/devices/cpu/e132xs/e132xsdrc_ops.hxx')
-rw-r--r-- | src/devices/cpu/e132xs/e132xsdrc_ops.hxx | 318 |
1 files changed, 159 insertions, 159 deletions
diff --git a/src/devices/cpu/e132xs/e132xsdrc_ops.hxx b/src/devices/cpu/e132xs/e132xsdrc_ops.hxx index c35a129f369..01ba2347b4d 100644 --- a/src/devices/cpu/e132xs/e132xsdrc_ops.hxx +++ b/src/devices/cpu/e132xs/e132xsdrc_ops.hxx @@ -5,7 +5,7 @@ constexpr uint32_t WRITE_ONLY_REGMASK = (1 << BCR_REGISTER) | (1 << TPR_REGISTER) | (1 << FCR_REGISTER) | (1 << MCR_REGISTER); -void hyperstone_device::generate_check_delay_pc(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_check_delay_pc(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { /* if PC is used in a delay instruction, the delayed PC should be used */ UML_TEST(block, mem(&m_core->delay_slot), 1); @@ -14,7 +14,7 @@ void hyperstone_device::generate_check_delay_pc(drcuml_block *block, compiler_st UML_SETc(block, uml::COND_NZ, mem(&m_core->delay_slot_taken)); } -void hyperstone_device::generate_decode_const(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_decode_const(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t imm_1 = READ_OP(desc->pc + 2); @@ -45,7 +45,7 @@ void hyperstone_device::generate_decode_const(drcuml_block *block, compiler_stat } } -void hyperstone_device::generate_decode_immediate_s(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_decode_immediate_s(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { uint16_t op = desc->opptr.w[0]; @@ -84,7 +84,7 @@ void hyperstone_device::generate_decode_immediate_s(drcuml_block *block, compile } } -void hyperstone_device::generate_ignore_immediate_s(drcuml_block *block, const opcode_desc *desc) +void hyperstone_device::generate_ignore_immediate_s(drcuml_block &block, const opcode_desc *desc) { uint16_t op = desc->opptr.w[0]; @@ -96,7 +96,7 @@ void hyperstone_device::generate_ignore_immediate_s(drcuml_block *block, const o UML_ADD(block, DRC_PC, DRC_PC, offsets[nybble]); } -void hyperstone_device::generate_decode_pcrel(drcuml_block *block, const opcode_desc *desc) +void hyperstone_device::generate_decode_pcrel(drcuml_block &block, const opcode_desc *desc) { uint16_t op = desc->opptr.w[0]; @@ -125,7 +125,7 @@ void hyperstone_device::generate_decode_pcrel(drcuml_block *block, const opcode_ UML_MOV(block, I1, offset); } -void hyperstone_device::generate_ignore_pcrel(drcuml_block *block, const opcode_desc *desc) +void hyperstone_device::generate_ignore_pcrel(drcuml_block &block, const opcode_desc *desc) { uint16_t op = desc->opptr.w[0]; @@ -136,19 +136,19 @@ void hyperstone_device::generate_ignore_pcrel(drcuml_block *block, const opcode_ } } -void hyperstone_device::generate_set_global_register(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_set_global_register(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { // Expects register index in I4, value in I5, clobbers I6 int extended; UML_CMP(block, I4, 16); - UML_JMPc(block, uml::COND_AE, extended = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_AE, extended = compiler.m_labelnum++); int generic_store, set_sr, done; UML_CMP(block, I4, 1); - UML_JMPc(block, uml::COND_A, generic_store = compiler->m_labelnum++); - UML_JMPc(block, uml::COND_E, set_sr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_A, generic_store = compiler.m_labelnum++); + UML_JMPc(block, uml::COND_E, set_sr = compiler.m_labelnum++); UML_AND(block, DRC_PC, I5, ~1); - UML_JMP(block, done = compiler->m_labelnum++); + UML_JMP(block, done = compiler.m_labelnum++); UML_LABEL(block, set_sr); UML_ROLINS(block, DRC_SR, I5, 0, 0x0000ffff); @@ -168,7 +168,7 @@ void hyperstone_device::generate_set_global_register(drcuml_block *block, compil UML_CMP(block, I4, 17); UML_JMPc(block, uml::COND_BE, generic_store); UML_CMP(block, I4, BCR_REGISTER); - UML_JMPc(block, uml::COND_A, above_bcr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_A, above_bcr = compiler.m_labelnum++); UML_JMPc(block, uml::COND_E, generic_store); // SP or UB @@ -178,16 +178,16 @@ void hyperstone_device::generate_set_global_register(drcuml_block *block, compil int set_tpr, set_tcr, set_tr, set_fcr; UML_LABEL(block, above_bcr); UML_CMP(block, I4, TCR_REGISTER); - UML_JMPc(block, uml::COND_B, set_tpr = compiler->m_labelnum++); - UML_JMPc(block, uml::COND_E, set_tcr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_B, set_tpr = compiler.m_labelnum++); + UML_JMPc(block, uml::COND_E, set_tcr = compiler.m_labelnum++); // Above TCR UML_CMP(block, I4, WCR_REGISTER); - UML_JMPc(block, uml::COND_B, set_tr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_B, set_tr = compiler.m_labelnum++); UML_JMPc(block, uml::COND_E, generic_store); // WCR // Above WCR UML_CMP(block, I4, FCR_REGISTER); UML_JMPc(block, uml::COND_B, done); // ISR - read only - UML_JMPc(block, uml::COND_E, set_fcr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_E, set_fcr = compiler.m_labelnum++); UML_CMP(block, I4, MCR_REGISTER); UML_JMPc(block, uml::COND_A, generic_store); // regs 28..31 // Set MCR @@ -200,7 +200,7 @@ void hyperstone_device::generate_set_global_register(drcuml_block *block, compil UML_LABEL(block, set_tpr); UML_STORE(block, (void *)m_core->global_regs, I4, I5, SIZE_DWORD, SCALE_x4); UML_TEST(block, I5, 0x80000000); - UML_JMPc(block, uml::COND_NZ, skip_compute_tr = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_NZ, skip_compute_tr = compiler.m_labelnum++); UML_CALLC(block, cfunc_compute_tr, this); UML_CALLC(block, cfunc_update_timer_prescale, this); UML_LABEL(block, skip_compute_tr); @@ -230,7 +230,7 @@ void hyperstone_device::generate_set_global_register(drcuml_block *block, compil UML_LOAD(block, I6, (void *)m_core->global_regs, I4, SIZE_DWORD, SCALE_x4); UML_XOR(block, I6, I6, I5); UML_TEST(block, I6, 0x80000000); - UML_JMPc(block, uml::COND_Z, skip_adjust_timer = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, skip_adjust_timer = compiler.m_labelnum++); UML_CALLC(block, cfunc_adjust_timer_interrupt, this); UML_LABEL(block, skip_adjust_timer); UML_STORE(block, (void *)m_core->global_regs, I4, I5, SIZE_DWORD, SCALE_x4); @@ -242,7 +242,7 @@ void hyperstone_device::generate_set_global_register(drcuml_block *block, compil } template <hyperstone_device::trap_exception_or_int TYPE> -void hyperstone_device::generate_trap_exception_or_int(drcuml_block *block) +void hyperstone_device::generate_trap_exception_or_int(drcuml_block &block) { UML_ADD(block, I7, I7, mem(&m_core->clock_cycles_2)); @@ -278,21 +278,21 @@ void hyperstone_device::generate_trap_exception_or_int(drcuml_block *block) generate_branch(block, DRC_PC, true); } -void hyperstone_device::generate_int(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, uint32_t addr) +void hyperstone_device::generate_int(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc, uint32_t addr) { printf("Unimplemented: generate_int (%08x)\n", desc->pc); fflush(stdout); fatalerror(" "); } -void hyperstone_device::generate_exception(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc, uint32_t addr) +void hyperstone_device::generate_exception(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc, uint32_t addr) { printf("Unimplemented: generate_exception (%08x)\n", desc->pc); fflush(stdout); fatalerror(" "); } -void hyperstone_device::generate_software(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_software(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_6)); @@ -316,8 +316,8 @@ void hyperstone_device::generate_software(drcuml_block *block, compiler_state *c UML_ROLINS(block, DRC_SR, 1, 19, 0x00180000); uint32_t num = op >> 8; - int mem3 = compiler->m_labelnum++; - int have_code_addr = compiler->m_labelnum++; + int mem3 = compiler.m_labelnum++; + int have_code_addr = compiler.m_labelnum++; UML_MOV(block, I4, mem(&m_core->trap_entry)); UML_CMP(block, I4, 0xffffff00); UML_JMPc(block, uml::COND_E, mem3); @@ -373,7 +373,7 @@ void hyperstone_device::generate_software(drcuml_block *block, compiler_state *c template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_chk(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_chk(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -428,7 +428,7 @@ void hyperstone_device::generate_chk(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_movd(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_movd(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -480,7 +480,7 @@ void hyperstone_device::generate_movd(drcuml_block *block, compiler_state *compi UML_AND(block, I2, DRC_SR, (S_MASK | L_MASK)); UML_AND(block, I3, I1, I2); UML_TEST(block, I3, S_MASK); - UML_JMPc(block, uml::COND_NZ, no_exception = compiler->m_labelnum++); // If S is set and unchanged, there won't be an exception. + UML_JMPc(block, uml::COND_NZ, no_exception = compiler.m_labelnum++); // If S is set and unchanged, there won't be an exception. UML_XOR(block, I3, I1, I2); UML_AND(block, I4, I3, I2); @@ -501,15 +501,15 @@ void hyperstone_device::generate_movd(drcuml_block *block, compiler_state *compi UML_ROLAND(block, I2, DRC_SR, 7, 0x7f); UML_SUB(block, I3, I2, I1); UML_CMP(block, I3, -64); - UML_JMPc(block, uml::COND_L, done_ret = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_L, done_ret = compiler.m_labelnum++); UML_CMP(block, I3, 64); - UML_JMPc(block, uml::COND_L, diff_in_range = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_L, diff_in_range = compiler.m_labelnum++); UML_OR(block, I3, I3, 0x80); UML_SEXT(block, I3, I3, SIZE_BYTE); UML_LABEL(block, diff_in_range); int pop_next; - UML_LABEL(block, pop_next = compiler->m_labelnum++); + UML_LABEL(block, pop_next = compiler.m_labelnum++); UML_CMP(block, I3, 0); UML_JMPc(block, uml::COND_GE, done_ret); UML_SUB(block, I0, I0, 4); @@ -609,7 +609,7 @@ void hyperstone_device::generate_movd(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL, hyperstone_device::sign_mode SIGNED> -void hyperstone_device::generate_divsu(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_divsu(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_36)); @@ -663,8 +663,8 @@ void hyperstone_device::generate_divsu(drcuml_block *block, compiler_state *comp UML_DSHL(block, I1, I1, 32); UML_DOR(block, I1, I1, I2); - int no_result = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int no_result = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_TEST(block, I0, ~0); UML_JMPc(block, uml::COND_Z, no_result); if (SIGNED) @@ -707,7 +707,7 @@ void hyperstone_device::generate_divsu(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_xm(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_xm(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -763,15 +763,15 @@ void hyperstone_device::generate_xm(drcuml_block *block, compiler_state *compile int skip, done; if (SRC_GLOBAL && (src_code == PC_REGISTER)) { - UML_JMPc(block, uml::COND_B, skip = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_B, skip = compiler.m_labelnum++); UML_EXH(block, *m_exception[EXCEPTION_RANGE_ERROR], 0); - UML_JMP(block, done = compiler->m_labelnum++); + UML_JMP(block, done = compiler.m_labelnum++); } else { - UML_JMPc(block, uml::COND_BE, skip = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_BE, skip = compiler.m_labelnum++); UML_EXH(block, *m_exception[EXCEPTION_RANGE_ERROR], 0); - UML_JMP(block, done = compiler->m_labelnum++); + UML_JMP(block, done = compiler.m_labelnum++); } UML_LABEL(block, skip); @@ -798,7 +798,7 @@ void hyperstone_device::generate_xm(drcuml_block *block, compiler_state *compile template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_mask(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_mask(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -828,7 +828,7 @@ void hyperstone_device::generate_mask(drcuml_block *block, compiler_state *compi int skip_mask; UML_AND(block, DRC_SR, DRC_SR, ~Z_MASK); UML_TEST(block, I1, ~0); - UML_JMPc(block, uml::COND_NZ, skip_mask = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_NZ, skip_mask = compiler.m_labelnum++); UML_OR(block, DRC_SR, DRC_SR, Z_MASK); UML_LABEL(block, skip_mask); @@ -857,7 +857,7 @@ void hyperstone_device::generate_mask(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_sum(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sum(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -932,7 +932,7 @@ void hyperstone_device::generate_sum(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_sums(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sums(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_sums (%08x)\n", desc->pc); fflush(stdout); @@ -941,7 +941,7 @@ void hyperstone_device::generate_sums(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_cmp(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_cmp(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1006,13 +1006,13 @@ void hyperstone_device::generate_cmp(drcuml_block *block, compiler_state *compil UML_ROLINS(block, DRC_SR, I3, 0, (V_MASK | N_MASK | Z_MASK | C_MASK)); } -void hyperstone_device::generate_get_global_register(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_get_global_register(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { uint16_t op = desc->opptr.w[0]; const uint32_t src_code = op & 0xf; - int regular_load = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int regular_load = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_TEST(block, DRC_SR, H_MASK); UML_MOVc(block, uml::COND_NZ, I1, 16 + src_code); UML_MOVc(block, uml::COND_Z, I1, src_code); @@ -1039,7 +1039,7 @@ void hyperstone_device::generate_get_global_register(drcuml_block *block, compil } template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_mov(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_mov(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1053,7 +1053,7 @@ void hyperstone_device::generate_mov(drcuml_block *block, compiler_state *compil { int no_exception; UML_TEST(block, DRC_SR, H_MASK); - UML_JMPc(block, uml::COND_Z, no_exception = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, no_exception = compiler.m_labelnum++); UML_TEST(block, DRC_SR, S_MASK); UML_JMPc(block, uml::COND_NZ, no_exception); UML_EXH(block, *m_exception[EXCEPTION_PRIVILEGE_ERROR], 0); @@ -1080,7 +1080,7 @@ void hyperstone_device::generate_mov(drcuml_block *block, compiler_state *compil UML_ROLINS(block, DRC_SR, I2, Z_SHIFT, Z_MASK); UML_ROLINS(block, DRC_SR, I5, 3, N_MASK); - int done = compiler->m_labelnum++; + int done = compiler.m_labelnum++; if (DST_GLOBAL) { UML_TEST(block, DRC_SR, H_MASK); @@ -1106,7 +1106,7 @@ void hyperstone_device::generate_mov(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_add(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_add(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1186,7 +1186,7 @@ void hyperstone_device::generate_add(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_adds(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_adds(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_adds (%08x)\n", desc->pc); fflush(stdout); @@ -1195,7 +1195,7 @@ void hyperstone_device::generate_adds(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_cmpb(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_cmpb(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1237,7 +1237,7 @@ void hyperstone_device::generate_cmpb(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_subc(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_subc(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1335,7 +1335,7 @@ void hyperstone_device::generate_subc(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_sub(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sub(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1427,7 +1427,7 @@ void hyperstone_device::generate_sub(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_subs(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_subs(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1506,7 +1506,7 @@ void hyperstone_device::generate_subs(drcuml_block *block, compiler_state *compi UML_STORE(block, (void *)m_core->local_regs, I5, I2, SIZE_DWORD, SCALE_x4); } - int no_exception = compiler->m_labelnum++; + int no_exception = compiler.m_labelnum++; UML_TEST(block, DRC_SR, V_MASK); UML_JMPc(block, uml::COND_Z, no_exception); generate_trap_exception_or_int<IS_EXCEPTION>(block); @@ -1515,7 +1515,7 @@ void hyperstone_device::generate_subs(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_addc(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_addc(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1614,7 +1614,7 @@ void hyperstone_device::generate_addc(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_neg(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_neg(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1680,7 +1680,7 @@ void hyperstone_device::generate_neg(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_negs(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_negs(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_negs (%08x)\n", desc->pc); fflush(stdout); @@ -1689,7 +1689,7 @@ void hyperstone_device::generate_negs(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_and(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_and(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1752,7 +1752,7 @@ void hyperstone_device::generate_and(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_andn(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_andn(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1816,7 +1816,7 @@ void hyperstone_device::generate_andn(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_or(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_or(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1879,7 +1879,7 @@ void hyperstone_device::generate_or(drcuml_block *block, compiler_state *compile template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_xor(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_xor(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1942,7 +1942,7 @@ void hyperstone_device::generate_xor(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_not(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_not(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -1994,7 +1994,7 @@ void hyperstone_device::generate_not(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_cmpi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_cmpi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2038,7 +2038,7 @@ void hyperstone_device::generate_cmpi(drcuml_block *block, compiler_state *compi UML_XOR(block, I3, I1, I2); UML_AND(block, I0, I0, I3); UML_TEST(block, I0, 0x80000000); - UML_JMPc(block, uml::COND_Z, no_v = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, no_v = compiler.m_labelnum++); UML_OR(block, DRC_SR, DRC_SR, V_MASK); UML_LABEL(block, no_v); @@ -2047,7 +2047,7 @@ void hyperstone_device::generate_cmpi(drcuml_block *block, compiler_state *compi UML_CMP(block, I2, I1); UML_MOVc(block, uml::COND_E, I3, Z_MASK); UML_MOVc(block, uml::COND_B, I3, C_MASK); - UML_JMPc(block, uml::COND_GE, no_n = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_GE, no_n = compiler.m_labelnum++); UML_OR(block, I3, I3, N_MASK); UML_LABEL(block, no_n); @@ -2056,7 +2056,7 @@ void hyperstone_device::generate_cmpi(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_movi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_movi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2075,11 +2075,11 @@ void hyperstone_device::generate_movi(drcuml_block *block, compiler_state *compi if (DST_GLOBAL) { UML_TEST(block, DRC_SR, H_MASK); - UML_JMPc(block, uml::COND_Z, no_exception = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, no_exception = compiler.m_labelnum++); UML_TEST(block, DRC_SR, S_MASK); UML_JMPc(block, uml::COND_NZ, no_exception); UML_EXH(block, *m_exception[EXCEPTION_PRIVILEGE_ERROR], 0); - UML_JMP(block, done = compiler->m_labelnum++); + UML_JMP(block, done = compiler.m_labelnum++); UML_LABEL(block, no_exception); } @@ -2087,13 +2087,13 @@ void hyperstone_device::generate_movi(drcuml_block *block, compiler_state *compi int no_z; UML_TEST(block, I1, ~0); - UML_JMPc(block, uml::COND_NZ, no_z = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_NZ, no_z = compiler.m_labelnum++); UML_OR(block, DRC_SR, DRC_SR, Z_MASK); UML_LABEL(block, no_z); int no_n; UML_TEST(block, I1, 0x80000000); - UML_JMPc(block, uml::COND_Z, no_n = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, no_n = compiler.m_labelnum++); UML_OR(block, DRC_SR, DRC_SR, N_MASK); UML_LABEL(block, no_n); @@ -2129,7 +2129,7 @@ void hyperstone_device::generate_movi(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_addi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_addi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2216,7 +2216,7 @@ void hyperstone_device::generate_addi(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_addsi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_addsi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_addsi (%08x)\n", desc->pc); fflush(stdout); @@ -2225,7 +2225,7 @@ void hyperstone_device::generate_addsi(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_cmpbi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_cmpbi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2287,7 +2287,7 @@ void hyperstone_device::generate_cmpbi(drcuml_block *block, compiler_state *comp int or_mask, done; UML_TEST(block, I2, 0xff000000); - UML_JMPc(block, uml::COND_Z, or_mask = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_Z, or_mask = compiler.m_labelnum++); UML_TEST(block, I2, 0x00ff0000); UML_JMPc(block, uml::COND_Z, or_mask); UML_TEST(block, I2, 0x0000ff00); @@ -2295,7 +2295,7 @@ void hyperstone_device::generate_cmpbi(drcuml_block *block, compiler_state *comp UML_TEST(block, I2, 0x000000ff); UML_JMPc(block, uml::COND_Z, or_mask); UML_AND(block, DRC_SR, DRC_SR, ~Z_MASK); - UML_JMP(block, done = compiler->m_labelnum++); + UML_JMP(block, done = compiler.m_labelnum++); UML_LABEL(block, or_mask); UML_OR(block, DRC_SR, DRC_SR, Z_MASK); @@ -2306,7 +2306,7 @@ void hyperstone_device::generate_cmpbi(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_andni(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_andni(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2368,7 +2368,7 @@ void hyperstone_device::generate_andni(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_ori(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_ori(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2431,7 +2431,7 @@ void hyperstone_device::generate_ori(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::imm_size IMM_LONG> -void hyperstone_device::generate_xori(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_xori(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2494,7 +2494,7 @@ void hyperstone_device::generate_xori(drcuml_block *block, compiler_state *compi template <hyperstone_device::shift_type HI_N> -void hyperstone_device::generate_shrdi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shrdi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -2526,7 +2526,7 @@ void hyperstone_device::generate_shrdi(drcuml_block *block, compiler_state *comp const uint32_t n = HI_N ? (0x10 | (op & 0xf)) : (op & 0xf); if (HI_N || n) { - int no_carry = compiler->m_labelnum++; + int no_carry = compiler.m_labelnum++; UML_DTEST(block, I2, (1 << (n - 1))); UML_JMPc(block, uml::COND_Z, no_carry); UML_OR(block, I4, I4, 1); @@ -2547,7 +2547,7 @@ void hyperstone_device::generate_shrdi(drcuml_block *block, compiler_state *comp } -void hyperstone_device::generate_shrd(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shrd(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -2586,7 +2586,7 @@ void hyperstone_device::generate_shrd(drcuml_block *block, compiler_state *compi UML_LOAD(block, I2, (void *)m_core->local_regs, I6, SIZE_DWORD, SCALE_x4); UML_AND(block, I6, I2, 0x1f); - int no_shift = compiler->m_labelnum++; + int no_shift = compiler.m_labelnum++; UML_TEST(block, I6, ~0); UML_JMPc(block, uml::COND_Z, no_shift); @@ -2609,7 +2609,7 @@ void hyperstone_device::generate_shrd(drcuml_block *block, compiler_state *compi } -void hyperstone_device::generate_shr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2633,8 +2633,8 @@ void hyperstone_device::generate_shr(drcuml_block *block, compiler_state *compil UML_AND(block, I6, DRC_SR, ~(C_MASK | Z_MASK | N_MASK)); - int no_shift = compiler->m_labelnum++; - int no_carry = compiler->m_labelnum++; + int no_shift = compiler.m_labelnum++; + int no_carry = compiler.m_labelnum++; UML_CMP(block, I1, 0); UML_JMPc(block, uml::COND_E, no_shift); UML_SUB(block, I2, I1, 1); @@ -2658,7 +2658,7 @@ void hyperstone_device::generate_shr(drcuml_block *block, compiler_state *compil template <hyperstone_device::shift_type HI_N, hyperstone_device::reg_bank DST_GLOBAL> -void hyperstone_device::generate_shri(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shri(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2713,7 +2713,7 @@ void hyperstone_device::generate_shri(drcuml_block *block, compiler_state *compi template <hyperstone_device::shift_type HI_N> -void hyperstone_device::generate_sardi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sardi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_sardi (%08x)\n", desc->pc); fflush(stdout); @@ -2721,7 +2721,7 @@ void hyperstone_device::generate_sardi(drcuml_block *block, compiler_state *comp } -void hyperstone_device::generate_sard(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sard(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -2760,7 +2760,7 @@ void hyperstone_device::generate_sard(drcuml_block *block, compiler_state *compi UML_LOAD(block, I2, (void *)m_core->local_regs, I6, SIZE_DWORD, SCALE_x4); UML_AND(block, I6, I2, 0x1f); - int no_shift = compiler->m_labelnum++; + int no_shift = compiler.m_labelnum++; UML_TEST(block, I6, ~0); UML_JMPc(block, uml::COND_Z, no_shift); @@ -2783,7 +2783,7 @@ void hyperstone_device::generate_sard(drcuml_block *block, compiler_state *compi } -void hyperstone_device::generate_sar(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sar(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2804,7 +2804,7 @@ void hyperstone_device::generate_sar(drcuml_block *block, compiler_state *compil UML_LOAD(block, I1, (void *)m_core->local_regs, I1, SIZE_DWORD, SCALE_x4); UML_AND(block, I1, I1, 0x1f); - int no_shift = compiler->m_labelnum++; + int no_shift = compiler.m_labelnum++; UML_MOV(block, I3, 0); UML_CMP(block, I1, 0); UML_JMPc(block, uml::COND_E, no_shift); @@ -2825,7 +2825,7 @@ void hyperstone_device::generate_sar(drcuml_block *block, compiler_state *compil template <hyperstone_device::shift_type HI_N, hyperstone_device::reg_bank DST_GLOBAL> -void hyperstone_device::generate_sari(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_sari(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -2885,7 +2885,7 @@ void hyperstone_device::generate_sari(drcuml_block *block, compiler_state *compi template <hyperstone_device::shift_type HI_N> -void hyperstone_device::generate_shldi(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shldi(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -2919,14 +2919,14 @@ void hyperstone_device::generate_shldi(drcuml_block *block, compiler_state *comp UML_AND(block, DRC_SR, DRC_SR, ~C_MASK); - int no_carry = compiler->m_labelnum++; + int no_carry = compiler.m_labelnum++; UML_TEST(block, I4, 0x1f); UML_JMPc(block, uml::COND_Z, no_carry); UML_DROLINS(block, DRC_SR, I0, I4, 1); // Insert carry flag UML_LABEL(block, no_carry); - int no_hi_bit = compiler->m_labelnum++; - int no_overflow = compiler->m_labelnum++; + int no_hi_bit = compiler.m_labelnum++; + int no_overflow = compiler.m_labelnum++; UML_AND(block, I5, I6, I1); // I5: high_order & mask UML_DSHL(block, I0, I0, I4); // I0: val << n @@ -2953,7 +2953,7 @@ void hyperstone_device::generate_shldi(drcuml_block *block, compiler_state *comp } -void hyperstone_device::generate_shld(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shld(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -2996,14 +2996,14 @@ void hyperstone_device::generate_shld(drcuml_block *block, compiler_state *compi UML_AND(block, DRC_SR, DRC_SR, ~C_MASK); - int no_carry = compiler->m_labelnum++; + int no_carry = compiler.m_labelnum++; UML_TEST(block, I4, 0x1f); UML_JMPc(block, uml::COND_Z, no_carry); UML_DROLINS(block, DRC_SR, I0, I4, 1); // Insert carry flag UML_LABEL(block, no_carry); - int no_hi_bit = compiler->m_labelnum++; - int no_overflow = compiler->m_labelnum++; + int no_hi_bit = compiler.m_labelnum++; + int no_overflow = compiler.m_labelnum++; UML_AND(block, I5, I6, I1); // I5: high_order & mask UML_DSHL(block, I0, I0, I4); // I0: val << n @@ -3030,7 +3030,7 @@ void hyperstone_device::generate_shld(drcuml_block *block, compiler_state *compi } -void hyperstone_device::generate_shl(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shl(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -3054,8 +3054,8 @@ void hyperstone_device::generate_shl(drcuml_block *block, compiler_state *compil UML_AND(block, I6, DRC_SR, ~(C_MASK | Z_MASK | N_MASK | V_MASK)); - int done_shift = compiler->m_labelnum++; - int no_carry = compiler->m_labelnum++; + int done_shift = compiler.m_labelnum++; + int no_carry = compiler.m_labelnum++; UML_CMP(block, I1, 0); UML_JMPc(block, uml::COND_E, done_shift); UML_SUB(block, I2, I1, 1); @@ -3070,7 +3070,7 @@ void hyperstone_device::generate_shl(drcuml_block *block, compiler_state *compil UML_SHL(block, I0, I0, I1); - int no_hi_bit = compiler->m_labelnum++; + int no_hi_bit = compiler.m_labelnum++; UML_TEST(block, I0, 0x80000000); UML_JMPc(block, uml::COND_Z, no_hi_bit); @@ -3093,7 +3093,7 @@ void hyperstone_device::generate_shl(drcuml_block *block, compiler_state *compil template <hyperstone_device::shift_type HI_N, hyperstone_device::reg_bank DST_GLOBAL> -void hyperstone_device::generate_shli(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_shli(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -3120,7 +3120,7 @@ void hyperstone_device::generate_shli(drcuml_block *block, compiler_state *compi if (HI_N || n) { - int skip_c = compiler->m_labelnum++; + int skip_c = compiler.m_labelnum++; UML_TEST(block, I4, (0x80000000 >> (n - 1))); UML_JMPc(block, uml::COND_Z, skip_c); UML_OR(block, I1, I1, 1); @@ -3129,10 +3129,10 @@ void hyperstone_device::generate_shli(drcuml_block *block, compiler_state *compi UML_SHL(block, I5, I4, n); - int done_v = compiler->m_labelnum++; + int done_v = compiler.m_labelnum++; uint32_t mask = (uint32_t)(0xffffffff00000000ULL >> n); - int no_high_bit = compiler->m_labelnum++; + int no_high_bit = compiler.m_labelnum++; UML_TEST(block, I5, 0x80000000); UML_JMPc(block, uml::COND_Z, no_high_bit); @@ -3174,7 +3174,7 @@ void hyperstone_device::generate_shli(drcuml_block *block, compiler_state *compi } -void hyperstone_device::generate_testlz(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_testlz(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -3198,7 +3198,7 @@ void hyperstone_device::generate_testlz(drcuml_block *block, compiler_state *com } -void hyperstone_device::generate_rol(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_rol(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -3220,7 +3220,7 @@ void hyperstone_device::generate_rol(drcuml_block *block, compiler_state *compil UML_LOAD(block, I5, (void *)m_core->local_regs, I1, SIZE_DWORD, SCALE_x4); UML_AND(block, I1, I5, 0x1f); // I1 = sreg & 0x1f - int no_shift = compiler->m_labelnum++; + int no_shift = compiler.m_labelnum++; UML_CMP(block, I1, 0); UML_JMPc(block, uml::COND_E, no_shift); UML_ROL(block, I2, I0, I1); @@ -3231,13 +3231,13 @@ void hyperstone_device::generate_rol(drcuml_block *block, compiler_state *compil UML_MOV(block, I6, 0); - int no_hi_bit = compiler->m_labelnum++; + int no_hi_bit = compiler.m_labelnum++; UML_TEST(block, I0, 0x80000000); UML_JMPc(block, uml::COND_Z, no_hi_bit); UML_XOR(block, I3, I3, I5); - int done_shift = compiler->m_labelnum++; + int done_shift = compiler.m_labelnum++; UML_LABEL(block, no_hi_bit); UML_TEST(block, I3, ~0); UML_JMPc(block, uml::COND_Z, done_shift); @@ -3256,7 +3256,7 @@ void hyperstone_device::generate_rol(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_ldxx1(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_ldxx1(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t op = desc->opptr.w[0]; uint16_t next_1 = READ_OP(desc->pc + 2); @@ -3516,7 +3516,7 @@ void hyperstone_device::generate_ldxx1(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_ldxx2(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_ldxx2(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t op = desc->opptr.w[0]; uint16_t next_1 = READ_OP(desc->pc + 2); @@ -3730,8 +3730,8 @@ void hyperstone_device::generate_ldxx2(drcuml_block *block, compiler_state *comp { UML_MOV(block, I7, mem(&m_core->clock_cycles_3)); - int below_sp = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int below_sp = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_MOV(block, I2, mem(&m_core->global_regs[SP_REGISTER])); UML_CMP(block, I6, I2); @@ -3784,7 +3784,7 @@ void hyperstone_device::generate_ldxx2(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stxx1(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stxx1(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t op = desc->opptr.w[0]; @@ -3941,7 +3941,7 @@ void hyperstone_device::generate_stxx1(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stxx2(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stxx2(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t op = desc->opptr.w[0]; @@ -4088,8 +4088,8 @@ void hyperstone_device::generate_stxx2(drcuml_block *block, compiler_state *comp { UML_MOV(block, I7, mem(&m_core->clock_cycles_3)); - int less_than_sp = compiler->m_labelnum++; - int store_done = compiler->m_labelnum++; + int less_than_sp = compiler.m_labelnum++; + int store_done = compiler.m_labelnum++; UML_MOV(block, I5, I0); UML_CMP(block, I5, mem(&SP)); @@ -4118,7 +4118,7 @@ void hyperstone_device::generate_stxx2(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL, hyperstone_device::sign_mode SIGNED> -void hyperstone_device::generate_mulsu(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_mulsu(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_36)); @@ -4182,7 +4182,7 @@ void hyperstone_device::generate_mulsu(drcuml_block *block, compiler_state *comp UML_STORE(block, (void *)m_core->local_regs, I5, I4, SIZE_DWORD, SCALE_x4); } - int done = compiler->m_labelnum++; + int done = compiler.m_labelnum++; UML_MOV(block, I7, mem(&m_core->clock_cycles_6)); if (SIGNED == IS_SIGNED) { @@ -4209,7 +4209,7 @@ void hyperstone_device::generate_mulsu(drcuml_block *block, compiler_state *comp template <hyperstone_device::reg_bank DST_GLOBAL, hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_mul(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_mul(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { const uint16_t op = desc->opptr.w[0]; @@ -4260,8 +4260,8 @@ void hyperstone_device::generate_mul(drcuml_block *block, compiler_state *compil UML_STORE(block, (void *)m_core->local_regs, I6, I2, SIZE_DWORD, SCALE_x4); UML_MOV(block, I7, mem(&m_core->clock_cycles_3)); - int add_cycles = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int add_cycles = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_CMP(block, I0, 0xffff8000); UML_JMPc(block, uml::COND_B, add_cycles); UML_CMP(block, I0, 0x8000); @@ -4281,7 +4281,7 @@ void hyperstone_device::generate_mul(drcuml_block *block, compiler_state *compil template <hyperstone_device::shift_type HI_N, hyperstone_device::reg_bank DST_GLOBAL> -void hyperstone_device::generate_set(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_set(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4320,7 +4320,7 @@ void hyperstone_device::generate_set(drcuml_block *block, compiler_state *compil { if (n == 0) { - int no_low_bit = compiler->m_labelnum++; + int no_low_bit = compiler.m_labelnum++; UML_MOV(block, I1, mem(&m_core->global_regs[SP_REGISTER])); UML_AND(block, I0, I1, 0xfffffe00); UML_ROLINS(block, I0, DRC_SR, 9, 0x000001fc); @@ -4364,7 +4364,7 @@ void hyperstone_device::generate_set(drcuml_block *block, compiler_state *compil template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_ldwr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_ldwr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4409,7 +4409,7 @@ void hyperstone_device::generate_ldwr(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_lddr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_lddr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4457,7 +4457,7 @@ void hyperstone_device::generate_lddr(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_ldwp(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_ldwp(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4509,7 +4509,7 @@ void hyperstone_device::generate_ldwp(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_lddp(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_lddp(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4570,7 +4570,7 @@ void hyperstone_device::generate_lddp(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stwr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stwr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4606,7 +4606,7 @@ void hyperstone_device::generate_stwr(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stdr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stdr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4654,7 +4654,7 @@ void hyperstone_device::generate_stdr(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stwp(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stwp(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4692,7 +4692,7 @@ void hyperstone_device::generate_stwp(drcuml_block *block, compiler_state *compi template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_stdp(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_stdp(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4730,8 +4730,8 @@ void hyperstone_device::generate_stdp(drcuml_block *block, compiler_state *compi } else { - int srcf_dst_equal = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int srcf_dst_equal = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_MOV(block, I6, I0); UML_AND(block, I0, I0, ~3); @@ -4761,16 +4761,16 @@ void hyperstone_device::generate_stdp(drcuml_block *block, compiler_state *compi template <hyperstone_device::branch_condition CONDITION, hyperstone_device::condition_set COND_SET> -void hyperstone_device::generate_b(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_b(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { static const uint32_t condition_masks[6] = { V_MASK, Z_MASK, C_MASK, C_MASK | Z_MASK, N_MASK, N_MASK | Z_MASK }; - int done = compiler->m_labelnum++; + int done = compiler.m_labelnum++; uml::condition_t condition = COND_SET ? uml::COND_Z : uml::COND_NZ; int skip; UML_TEST(block, DRC_SR, condition_masks[CONDITION]); - UML_JMPc(block, condition, skip = compiler->m_labelnum++); + UML_JMPc(block, condition, skip = compiler.m_labelnum++); generate_br(block, compiler, desc); UML_JMP(block, done); @@ -4784,7 +4784,7 @@ void hyperstone_device::generate_b(drcuml_block *block, compiler_state *compiler } -void hyperstone_device::generate_br(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_br(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4800,11 +4800,11 @@ void hyperstone_device::generate_br(drcuml_block *block, compiler_state *compile template <hyperstone_device::branch_condition CONDITION, hyperstone_device::condition_set COND_SET> -void hyperstone_device::generate_db(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_db(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { static const uint32_t condition_masks[6] = { V_MASK, Z_MASK, C_MASK, C_MASK | Z_MASK, N_MASK, N_MASK | Z_MASK }; - int skip_jump = compiler->m_labelnum++; - int done = compiler->m_labelnum++; + int skip_jump = compiler.m_labelnum++; + int done = compiler.m_labelnum++; UML_TEST(block, DRC_SR, condition_masks[CONDITION]); if (COND_SET) @@ -4824,7 +4824,7 @@ void hyperstone_device::generate_db(drcuml_block *block, compiler_state *compile } -void hyperstone_device::generate_dbr(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_dbr(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_2)); @@ -4837,7 +4837,7 @@ void hyperstone_device::generate_dbr(drcuml_block *block, compiler_state *compil } -void hyperstone_device::generate_frame(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_frame(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4863,9 +4863,9 @@ void hyperstone_device::generate_frame(drcuml_block *block, compiler_state *comp int diff_in_range, done; UML_CMP(block, I3, -64); - UML_JMPc(block, uml::COND_L, done = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_L, done = compiler.m_labelnum++); UML_CMP(block, I3, 64); - UML_JMPc(block, uml::COND_L, diff_in_range = compiler->m_labelnum++); + UML_JMPc(block, uml::COND_L, diff_in_range = compiler.m_labelnum++); UML_OR(block, I3, I3, 0xffffff80); UML_LABEL(block, diff_in_range); @@ -4875,7 +4875,7 @@ void hyperstone_device::generate_frame(drcuml_block *block, compiler_state *comp UML_JMPc(block, uml::COND_GE, done); int push_next; - UML_LABEL(block, push_next = compiler->m_labelnum++); + UML_LABEL(block, push_next = compiler.m_labelnum++); UML_ROLAND(block, I2, I0, 30, 0x3f); UML_LOAD(block, I1, (void *)m_core->local_regs, I2, SIZE_DWORD, SCALE_x4); UML_CALLH(block, *m_mem_write32); @@ -4895,7 +4895,7 @@ void hyperstone_device::generate_frame(drcuml_block *block, compiler_state *comp } template <hyperstone_device::reg_bank SRC_GLOBAL> -void hyperstone_device::generate_call(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_call(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -4979,7 +4979,7 @@ void hyperstone_device::generate_call(drcuml_block *block, compiler_state *compi -void hyperstone_device::generate_trap_op(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_trap_op(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); // TODO: with the latency it can change @@ -5000,19 +5000,19 @@ void hyperstone_device::generate_trap_op(drcuml_block *block, compiler_state *co UML_ROLINS(block, DRC_SR, (1<<19), 0, ILC_MASK); UML_TEST(block, DRC_SR, conditions[code]); - int skip_trap = compiler->m_labelnum++; + int skip_trap = compiler.m_labelnum++; if (trap_if_set[code]) UML_JMPc(block, uml::COND_Z, skip_trap); else UML_JMPc(block, uml::COND_NZ, skip_trap); - generate_get_trap_addr(block, compiler->m_labelnum, trapno); + generate_get_trap_addr(block, compiler.m_labelnum, trapno); generate_trap_exception_or_int<IS_TRAP>(block); UML_LABEL(block, skip_trap); } -void hyperstone_device::generate_extend(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_extend(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { UML_MOV(block, I7, mem(&m_core->clock_cycles_1)); @@ -5168,14 +5168,14 @@ void hyperstone_device::generate_extend(drcuml_block *block, compiler_state *com } -void hyperstone_device::generate_reserved(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_reserved(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_reserved (%08x)\n", desc->pc); fflush(stdout); fatalerror(" "); } -void hyperstone_device::generate_do(drcuml_block *block, compiler_state *compiler, const opcode_desc *desc) +void hyperstone_device::generate_do(drcuml_block &block, compiler_state &compiler, const opcode_desc *desc) { printf("Unimplemented: generate_do (%08x)\n", desc->pc); fflush(stdout); |