void h8s2000_device::ldm_l_spp_r32n2l_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } r32_w(m_IR[1], m_TMP2); if((m_IR[1] & 7) == 7) m_TMP1 = m_TMP2; m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); } void h8s2000_device::ldm_l_spp_r32n2l_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); [[fallthrough]]; case 3:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; r32_w(m_IR[1], m_TMP2); if((m_IR[1] & 7) == 7) m_TMP1 = m_TMP2; m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 7:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::stm_l_r32n2l_psp_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } prefetch_done(); } void h8s2000_device::stm_l_r32n2l_psp_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); [[fallthrough]]; case 3:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); [[fallthrough]]; case 7:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldm_l_spp_r32n3l_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } r32_w(m_IR[1], m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } r32_w(m_IR[1]-2, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); } void h8s2000_device::ldm_l_spp_r32n3l_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); [[fallthrough]]; case 3:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; r32_w(m_IR[1], m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 7:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 11:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; r32_w(m_IR[1]-2, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::stm_l_r32n3l_psp_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+2); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } prefetch_done(); } void h8s2000_device::stm_l_r32n3l_psp_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); [[fallthrough]]; case 3:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); [[fallthrough]]; case 7:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+2); [[fallthrough]]; case 11:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldm_l_spp_r32n4l_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } r32_w(m_IR[1], m_TMP2); if((m_IR[1] & 7) == 7) m_TMP1 = m_TMP2; m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } r32_w(m_IR[1]-2, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 17; } else m_inst_substate = 18; return; } r32_w(m_IR[1]-3, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); } void h8s2000_device::ldm_l_spp_r32n4l_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); [[fallthrough]]; case 3:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; r32_w(m_IR[1], m_TMP2); if((m_IR[1] & 7) == 7) m_TMP1 = m_TMP2; m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 7:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; r32_w(m_IR[1]-1, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 11:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; r32_w(m_IR[1]-2, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); [[fallthrough]]; case 15:; m_TMP2 = read16(m_TMP1) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } [[fallthrough]]; case 16:; [[fallthrough]]; case 17:; m_TMP2 |= read16(m_TMP1+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 17; } else m_inst_substate = 18; return; } [[fallthrough]]; case 18:; r32_w(m_IR[1]-3, m_TMP2); m_TMP1 += 4; r32_w(7, m_TMP1); prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::stm_l_r32n4l_psp_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+2); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+3); write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 17; } else m_inst_substate = 18; return; } prefetch_done(); } void h8s2000_device::stm_l_r32n4l_psp_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(7); m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]); [[fallthrough]]; case 3:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+1); [[fallthrough]]; case 7:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+2); [[fallthrough]]; case 11:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; m_TMP1 -= 4; r32_w(7, m_TMP1); m_TMP2 = r32_r(m_IR[1]+3); [[fallthrough]]; case 15:; write16(m_TMP1, m_TMP2 >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } [[fallthrough]]; case 16:; [[fallthrough]]; case 17:; write16(m_TMP1+2, m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 17; } else m_inst_substate = 18; return; } [[fallthrough]]; case 18:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::orc_imm8_exr_full() { m_EXR |= m_IR[1]; update_irq_filter(); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::orc_imm8_exr_partial() { switch(m_inst_substate) { case 0: m_EXR |= m_IR[1]; update_irq_filter(); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::xorc_imm8_exr_full() { m_EXR ^= m_IR[1] & ~EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::xorc_imm8_exr_partial() { switch(m_inst_substate) { case 0: m_EXR ^= m_IR[1] & ~EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::andc_imm8_exr_full() { m_EXR &= m_IR[1] | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::andc_imm8_exr_partial() { switch(m_inst_substate) { case 0: m_EXR &= m_IR[1] | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_imm8_exr_full() { m_EXR = m_IR[1] | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::ldc_imm8_exr_partial() { switch(m_inst_substate) { case 0: m_EXR = m_IR[1] | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_r32ih_exr_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_r32ih_exr_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); [[fallthrough]]; case 3:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_r32ih_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_r32ih_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); [[fallthrough]]; case 3:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_abs16_exr_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 = s16(m_IR[2]); m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_abs16_exr_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 = s16(m_IR[2]); [[fallthrough]]; case 5:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_abs32_exr_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_PC += 2; m_TMP1 = (m_IR[2] << 16) | m_IR[3]; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_abs32_exr_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; [[fallthrough]]; case 3:; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 5:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_PC += 2; m_TMP1 = (m_IR[2] << 16) | m_IR[3]; [[fallthrough]]; case 7:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_abs16_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 = s16(m_IR[2]); write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_abs16_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 = s16(m_IR[2]); [[fallthrough]]; case 5:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_abs32_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_PC += 2; m_TMP1 = (m_IR[2] << 16) | m_IR[3]; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_abs32_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; [[fallthrough]]; case 3:; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 5:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_PC += 2; m_TMP1 = (m_IR[2] << 16) | m_IR[3]; [[fallthrough]]; case 7:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_r32ph_exr_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(m_IR[1] >> 4); r32_w(m_IR[1] >> 4, m_TMP1+2); m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_r32ph_exr_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(m_IR[1] >> 4); r32_w(m_IR[1] >> 4, m_TMP1+2); [[fallthrough]]; case 3:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_pr32h_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; internal(1); m_TMP1 = r32_r(m_IR[1] >> 4) - 2; r32_w(m_IR[1] >> 4, m_TMP1); write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_pr32h_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; internal(1); m_TMP1 = r32_r(m_IR[1] >> 4) - 2; r32_w(m_IR[1] >> 4, m_TMP1); [[fallthrough]]; case 3:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_r32d16h_exr_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + s16(m_IR[2]); m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_r32d16h_exr_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + s16(m_IR[2]); [[fallthrough]]; case 5:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_r32d16h_full() { m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + s16(m_IR[2]); write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_r32d16h_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[2] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + s16(m_IR[2]); [[fallthrough]]; case 5:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_w_r32d32hh_exr_full() { m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_IR[4] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + (m_IR[3] << 16) + m_IR[4]; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } update_irq_filter(); prefetch_done_noirq(); } void h8s2000_device::ldc_w_r32d32hh_exr_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; [[fallthrough]]; case 3:; m_IR[4] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 5:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + (m_IR[3] << 16) + m_IR[4]; [[fallthrough]]; case 7:; m_EXR = (read16(m_TMP1) >> 8) | EXR_NC; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; update_irq_filter(); prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::stc_w_exr_r32d32hh_full() { m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_IR[4] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + (m_IR[3] << 16) + m_IR[4]; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } prefetch_done(); } void h8s2000_device::stc_w_exr_r32d32hh_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_IR[3] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; [[fallthrough]]; case 3:; m_IR[4] = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 5:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4) + (m_IR[3] << 16) + m_IR[4]; [[fallthrough]]; case 7:; write16(m_TMP1, (m_EXR << 8) | m_EXR); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::tas_r32ih_full() { m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); m_TMP2 = read8(m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } set_nzv8(m_TMP2); write8(m_TMP1, m_TMP2 | 0x80); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::tas_r32ih_partial() { switch(m_inst_substate) { case 0: m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; m_TMP1 = r32_r(m_IR[1] >> 4); [[fallthrough]]; case 3:; m_TMP2 = read8(m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; set_nzv8(m_TMP2); [[fallthrough]]; case 5:; write8(m_TMP1, m_TMP2 | 0x80); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::stc_exr_r8l_full() { r8_w(m_IR[0], m_EXR); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::stc_exr_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], m_EXR); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::ldc_r8l_exr_full() { m_EXR = r8_r(m_IR[0]) | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::ldc_r8l_exr_partial() { switch(m_inst_substate) { case 0: m_EXR = r8_r(m_IR[0]) | EXR_NC; update_irq_filter(); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::shll_b_two_r8l_full() { r8_w(m_IR[0], do_shll2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shll_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_shll2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shll_w_two_r16l_full() { r16_w(m_IR[0], do_shll2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shll_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_shll2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shll_l_two_r32l_full() { r32_w(m_IR[0], do_shll2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shll_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_shll2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shal_b_two_r8l_full() { r8_w(m_IR[0], do_shal2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shal_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_shal2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shal_w_two_r16l_full() { r16_w(m_IR[0], do_shal2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shal_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_shal2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shal_l_two_r32l_full() { r32_w(m_IR[0], do_shal2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shal_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_shal2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shlr_b_two_r8l_full() { r8_w(m_IR[0], do_shlr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shlr_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_shlr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shlr_w_two_r16l_full() { r16_w(m_IR[0], do_shlr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shlr_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_shlr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shlr_l_two_r32l_full() { r32_w(m_IR[0], do_shlr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shlr_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_shlr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shar_b_two_r8l_full() { r8_w(m_IR[0], do_shar2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shar_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_shar2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shar_w_two_r16l_full() { r16_w(m_IR[0], do_shar2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shar_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_shar2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::shar_l_two_r32l_full() { r32_w(m_IR[0], do_shar2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::shar_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_shar2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxl_b_two_r8l_full() { r8_w(m_IR[0], do_rotxl2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxl_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_rotxl2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxl_w_two_r16l_full() { r16_w(m_IR[0], do_rotxl2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxl_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_rotxl2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxl_l_two_r32l_full() { r32_w(m_IR[0], do_rotxl2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxl_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_rotxl2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotl_b_two_r8l_full() { r8_w(m_IR[0], do_rotl2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotl_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_rotl2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotl_w_two_r16l_full() { r16_w(m_IR[0], do_rotl2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotl_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_rotl2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotl_l_two_r32l_full() { r32_w(m_IR[0], do_rotl2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotl_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_rotl2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxr_b_two_r8l_full() { r8_w(m_IR[0], do_rotxr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxr_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_rotxr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxr_w_two_r16l_full() { r16_w(m_IR[0], do_rotxr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxr_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_rotxr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotxr_l_two_r32l_full() { r32_w(m_IR[0], do_rotxr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotxr_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_rotxr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotr_b_two_r8l_full() { r8_w(m_IR[0], do_rotr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotr_b_two_r8l_partial() { switch(m_inst_substate) { case 0: r8_w(m_IR[0], do_rotr2_8(r8_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotr_w_two_r16l_full() { r16_w(m_IR[0], do_rotr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotr_w_two_r16l_partial() { switch(m_inst_substate) { case 0: r16_w(m_IR[0], do_rotr2_16(r16_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::rotr_l_two_r32l_full() { r32_w(m_IR[0], do_rotr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::rotr_l_two_r32l_partial() { switch(m_inst_substate) { case 0: r32_w(m_IR[0], do_rotr2_32(r32_r(m_IR[0]))); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 1:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::btst_r8h_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((r8_r(m_IR[2] >> 4)) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::btst_r8h_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((r8_r(m_IR[2] >> 4)) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::btst_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::btst_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bor_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bor_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bior_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bior_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bxor_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bxor_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bixor_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bixor_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::band_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::band_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::biand_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::biand_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bld_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bld_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bild_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bild_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[2] >> 4) & 7)))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bset_r8h_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 |= 1 << ((r8_r(m_IR[2] >> 4)) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bset_r8h_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 |= 1 << ((r8_r(m_IR[2] >> 4)) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bnot_r8h_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 ^= 1 << ((r8_r(m_IR[2] >> 4)) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bnot_r8h_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 ^= 1 << ((r8_r(m_IR[2] >> 4)) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bclr_r8h_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 &= ~(1 << ((r8_r(m_IR[2] >> 4)) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bclr_r8h_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 &= ~(1 << ((r8_r(m_IR[2] >> 4)) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bst_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; if(m_CCR & F_C) m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bst_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; if(m_CCR & F_C) m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bist_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; if(!(m_CCR & F_C)) m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bist_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; if(!(m_CCR & F_C)) m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bset_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bset_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 |= 1 << ((m_IR[2] >> 4) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bnot_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 ^= 1 << ((m_IR[2] >> 4) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bnot_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 ^= 1 << ((m_IR[2] >> 4) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bclr_imm3_abs16_full() { m_TMP2 = s16(m_IR[1]); m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bclr_imm3_abs16_partial() { switch(m_inst_substate) { case 0: m_TMP2 = s16(m_IR[1]); [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 &= ~(1 << ((m_IR[2] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::btst_r8h_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((r8_r(m_IR[3] >> 4)) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::btst_r8h_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((r8_r(m_IR[3] >> 4)) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::btst_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::btst_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR &= ~F_Z; else m_CCR |= F_Z; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bor_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bor_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bior_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bior_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR |= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bxor_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bxor_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bixor_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bixor_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR ^= F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::band_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::band_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::biand_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::biand_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bld_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bld_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bild_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; prefetch_done(); } void h8s2000_device::bild_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; if(!(m_TMP1 & (1 << ((m_IR[3] >> 4) & 7)))) m_CCR |= F_C; else m_CCR &= ~F_C; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bset_r8h_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 |= 1 << ((r8_r(m_IR[3] >> 4)) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bset_r8h_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 |= 1 << ((r8_r(m_IR[3] >> 4)) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bnot_r8h_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 ^= 1 << ((r8_r(m_IR[3] >> 4)) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bnot_r8h_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 ^= 1 << ((r8_r(m_IR[3] >> 4)) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bclr_r8h_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 &= ~(1 << ((r8_r(m_IR[3] >> 4)) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bclr_r8h_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 &= ~(1 << ((r8_r(m_IR[3] >> 4)) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bst_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; if(m_CCR & F_C) m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bst_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; if(m_CCR & F_C) m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bist_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; if(!(m_CCR & F_C)) m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bist_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; if(!(m_CCR & F_C)) m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); else m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bset_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bset_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 |= 1 << ((m_IR[3] >> 4) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bnot_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 ^= 1 << ((m_IR[3] >> 4) & 7); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bnot_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 ^= 1 << ((m_IR[3] >> 4) & 7); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::bclr_imm3_abs32_full() { m_TMP2 = (m_IR[1] << 16) | m_IR[2]; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_PC += 2; m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } prefetch_done(); } void h8s2000_device::bclr_imm3_abs32_partial() { switch(m_inst_substate) { case 0: m_TMP2 = (m_IR[1] << 16) | m_IR[2]; [[fallthrough]]; case 1:; m_TMP1 = read8(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 3:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_PC += 2; m_TMP1 &= ~(1 << ((m_IR[3] >> 4) & 7)); [[fallthrough]]; case 5:; write8(m_TMP2, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::state_trace_full() { internal(1); m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); write16(m_TMP1, m_NPC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); write16(m_TMP1, (m_CCR << 8) | ((m_NPC >> 16) & 0xff)); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); write16(m_TMP1, m_EXR << 8); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_taken_irq_vector = trace_setup(); debugger_exception_hook(m_taken_irq_vector); if(m_mode_advanced) { m_IR[0] = read16i(4*m_taken_irq_vector); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } m_IR[1] = read16i(4*m_taken_irq_vector+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } m_PC = (m_IR[0] << 16) | m_IR[1]; } else { m_PC = read16i(2*m_taken_irq_vector); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } } internal(1); m_NPC = m_PC & 0xffffff; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } m_PC += 2; prefetch_done_noirq(); } void h8s2000_device::state_trace_partial() { switch(m_inst_substate) { case 0: internal(1); m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); [[fallthrough]]; case 1:; write16(m_TMP1, m_NPC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); [[fallthrough]]; case 3:; write16(m_TMP1, (m_CCR << 8) | ((m_NPC >> 16) & 0xff)); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; m_TMP1 = r32_r(7) - 2; r32_w(7, m_TMP1); [[fallthrough]]; case 5:; write16(m_TMP1, m_EXR << 8); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; m_taken_irq_vector = trace_setup(); debugger_exception_hook(m_taken_irq_vector); if(m_mode_advanced) { [[fallthrough]]; case 7:; m_IR[0] = read16i(4*m_taken_irq_vector); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; m_IR[1] = read16i(4*m_taken_irq_vector+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; m_PC = (m_IR[0] << 16) | m_IR[1]; } else { [[fallthrough]]; case 11:; m_PC = read16i(2*m_taken_irq_vector); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; } internal(1); m_NPC = m_PC & 0xffffff; [[fallthrough]]; case 13:; m_PIR = read16i(m_PC); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; m_PC += 2; prefetch_done_noirq(); break; } m_inst_substate = 0; } void h8s2000_device::state_dtc_full() { if(m_current_dtc->m_sra & 0x01000000) { m_TMP1 = read16(m_current_dtc->m_sra & 0xffffff); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } write16(m_current_dtc->m_dar & 0xffffff, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } } else { m_TMP1 = read8(m_current_dtc->m_sra & 0xffffff); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } write8(m_current_dtc->m_dar & 0xffffff, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } } m_current_dtc->m_sra = (m_current_dtc->m_sra & 0xff000000) | ((m_current_dtc->m_sra + m_current_dtc->m_incs) & 0x00ffffff); m_current_dtc->m_dar = (m_current_dtc->m_dar & 0xff000000) | ((m_current_dtc->m_dar + m_current_dtc->m_incd) & 0x00ffffff); m_current_dtc->m_count--; if(!m_current_dtc->m_count) { u8 id = m_current_dtc->m_id; m_current_dtc = nullptr; m_dtc_device->count_done(id); } prefetch_done(); } void h8s2000_device::state_dtc_partial() { switch(m_inst_substate) { case 0: if(m_current_dtc->m_sra & 0x01000000) { [[fallthrough]]; case 1:; m_TMP1 = read16(m_current_dtc->m_sra & 0xffffff); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; [[fallthrough]]; case 3:; write16(m_current_dtc->m_dar & 0xffffff, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; } else { [[fallthrough]]; case 5:; m_TMP1 = read8(m_current_dtc->m_sra & 0xffffff); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; [[fallthrough]]; case 7:; write8(m_current_dtc->m_dar & 0xffffff, m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; } m_current_dtc->m_sra = (m_current_dtc->m_sra & 0xff000000) | ((m_current_dtc->m_sra + m_current_dtc->m_incs) & 0x00ffffff); m_current_dtc->m_dar = (m_current_dtc->m_dar & 0xff000000) | ((m_current_dtc->m_dar + m_current_dtc->m_incd) & 0x00ffffff); m_current_dtc->m_count--; if(!m_current_dtc->m_count) { u8 id = m_current_dtc->m_id; m_current_dtc = nullptr; m_dtc_device->count_done(id); } prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::state_dtc_vector_full() { m_TMP1 = m_dtc_device->get_waiting_vector(); if(m_TMP1 < h8_dtc_device::DTC_CHAINED) { m_TMP2 = m_dtc_device->get_vector_address(m_TMP1); m_TMP2 = read16(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_TMP2 |= 0xff0000; } else { m_TMP1 -= h8_dtc_device::DTC_CHAINED; m_TMP2 = m_dtc_device->get_object(m_TMP1)->m_base + 12; } m_dtc_device->get_object(m_TMP1)->m_base = m_TMP2; m_dtc_device->get_object(m_TMP1)->m_sra = read16(m_TMP2) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } m_dtc_device->get_object(m_TMP1)->m_sra |= read16(m_TMP2+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } m_dtc_device->get_object(m_TMP1)->m_dar = read16(m_TMP2+4) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } m_dtc_device->get_object(m_TMP1)->m_dar |= read16(m_TMP2+6); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } m_dtc_device->get_object(m_TMP1)->m_cr = read16(m_TMP2+8) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } m_dtc_device->get_object(m_TMP1)->m_cr |= read16(m_TMP2+10); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } m_dtc_device->vector_done(m_TMP1); prefetch_done(); } void h8s2000_device::state_dtc_vector_partial() { switch(m_inst_substate) { case 0: m_TMP1 = m_dtc_device->get_waiting_vector(); if(m_TMP1 < h8_dtc_device::DTC_CHAINED) { m_TMP2 = m_dtc_device->get_vector_address(m_TMP1); [[fallthrough]]; case 1:; m_TMP2 = read16(m_TMP2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_TMP2 |= 0xff0000; } else { m_TMP1 -= h8_dtc_device::DTC_CHAINED; m_TMP2 = m_dtc_device->get_object(m_TMP1)->m_base + 12; } m_dtc_device->get_object(m_TMP1)->m_base = m_TMP2; [[fallthrough]]; case 3:; m_dtc_device->get_object(m_TMP1)->m_sra = read16(m_TMP2) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; m_dtc_device->get_object(m_TMP1)->m_sra |= read16(m_TMP2+2); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; [[fallthrough]]; case 7:; m_dtc_device->get_object(m_TMP1)->m_dar = read16(m_TMP2+4) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; m_dtc_device->get_object(m_TMP1)->m_dar |= read16(m_TMP2+6); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; [[fallthrough]]; case 11:; m_dtc_device->get_object(m_TMP1)->m_cr = read16(m_TMP2+8) << 16; if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; m_dtc_device->get_object(m_TMP1)->m_cr |= read16(m_TMP2+10); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; m_dtc_device->vector_done(m_TMP1); prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::state_dtc_writeback_full() { m_TMP1 = m_dtc_device->get_waiting_writeback(); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } m_TMP2 = m_dtc_device->get_object(m_TMP1)->m_base; write16(m_TMP2, m_dtc_device->get_object(m_TMP1)->m_sra >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } write16(m_TMP2+2, m_dtc_device->get_object(m_TMP1)->m_sra); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } write16(m_TMP2+4, m_dtc_device->get_object(m_TMP1)->m_dar >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } write16(m_TMP2+6, m_dtc_device->get_object(m_TMP1)->m_dar); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } write16(m_TMP2+8, m_dtc_device->get_object(m_TMP1)->m_cr >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } write16(m_TMP2+10, m_dtc_device->get_object(m_TMP1)->m_cr); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } m_dtc_device->writeback_done(m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } prefetch_done(); } void h8s2000_device::state_dtc_writeback_partial() { switch(m_inst_substate) { case 0: [[fallthrough]]; case 1:; m_TMP1 = m_dtc_device->get_waiting_writeback(); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 1; } else m_inst_substate = 2; return; } [[fallthrough]]; case 2:; m_TMP2 = m_dtc_device->get_object(m_TMP1)->m_base; [[fallthrough]]; case 3:; write16(m_TMP2, m_dtc_device->get_object(m_TMP1)->m_sra >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 3; } else m_inst_substate = 4; return; } [[fallthrough]]; case 4:; [[fallthrough]]; case 5:; write16(m_TMP2+2, m_dtc_device->get_object(m_TMP1)->m_sra); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 5; } else m_inst_substate = 6; return; } [[fallthrough]]; case 6:; [[fallthrough]]; case 7:; write16(m_TMP2+4, m_dtc_device->get_object(m_TMP1)->m_dar >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 7; } else m_inst_substate = 8; return; } [[fallthrough]]; case 8:; [[fallthrough]]; case 9:; write16(m_TMP2+6, m_dtc_device->get_object(m_TMP1)->m_dar); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 9; } else m_inst_substate = 10; return; } [[fallthrough]]; case 10:; [[fallthrough]]; case 11:; write16(m_TMP2+8, m_dtc_device->get_object(m_TMP1)->m_cr >> 16); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 11; } else m_inst_substate = 12; return; } [[fallthrough]]; case 12:; [[fallthrough]]; case 13:; write16(m_TMP2+10, m_dtc_device->get_object(m_TMP1)->m_cr); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 13; } else m_inst_substate = 14; return; } [[fallthrough]]; case 14:; [[fallthrough]]; case 15:; m_dtc_device->writeback_done(m_TMP1); if(m_icount <= m_bcount) { if(access_to_be_redone()) { m_icount++; m_inst_substate = 15; } else m_inst_substate = 16; return; } [[fallthrough]]; case 16:; prefetch_done(); break; } m_inst_substate = 0; } void h8s2000_device::do_exec_full() { switch(m_inst_state >> 16) { case 0x00: { switch((m_inst_state >> 8) & 0xff) { case 0x00: { switch(m_inst_state & 0xff) { case 0x00: nop_full(); break; default: illegal(); break; } break; } case 0x01: { switch(m_inst_state & 0xff) { case 0x00: dispatch_0100_full(); break; case 0x10: dispatch_0110_full(); break; case 0x20: dispatch_0120_full(); break; case 0x30: dispatch_0130_full(); break; case 0x40: dispatch_0140_full(); break; case 0x41: dispatch_0141_full(); break; case 0x80: sleep_full(); break; case 0xc0: dispatch_01c0_full(); break; case 0xd0: dispatch_01d0_full(); break; case 0xe0: dispatch_01e0_full(); break; case 0xf0: dispatch_01f0_full(); break; default: illegal(); break; } break; } case 0x02: { switch(m_inst_state & 0xf0) { case 0x00: stc_ccr_r8l_full(); break; case 0x10: stc_exr_r8l_full(); break; default: illegal(); break; } break; } case 0x03: { switch(m_inst_state & 0xf0) { case 0x00: ldc_r8l_ccr_full(); break; case 0x10: ldc_r8l_exr_full(); break; default: illegal(); break; } break; } case 0x04: { orc_imm8_ccr_full(); break; } case 0x05: { xorc_imm8_ccr_full(); break; } case 0x06: { andc_imm8_ccr_full(); break; } case 0x07: { ldc_imm8_ccr_full(); break; } case 0x08: { add_b_r8h_r8l_full(); break; } case 0x09: { add_w_r16h_r16l_full(); break; } case 0x0a: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: inc_b_one_r8l_full(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: add_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x0b: { switch(m_inst_state & 0xf8) { case 0x00: adds_l_one_r32l_full(); break; case 0x50: case 0x58: inc_w_one_r16l_full(); break; case 0x70: inc_l_one_r32l_full(); break; case 0x80: adds_l_two_r32l_full(); break; case 0x90: adds_l_four_r32l_full(); break; case 0xd0: case 0xd8: inc_w_two_r16l_full(); break; case 0xf0: inc_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x0c: { mov_b_r8h_r8l_full(); break; } case 0x0d: { mov_w_r16h_r16l_full(); break; } case 0x0e: { addx_b_r8h_r8l_full(); break; } case 0x0f: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: daa_b_r8l_full(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: mov_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x10: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: shll_b_r8l_full(); break; case 0x10: case 0x18: shll_w_r16l_full(); break; case 0x30: shll_l_r32l_full(); break; case 0x40: case 0x48: shll_b_two_r8l_full(); break; case 0x50: case 0x58: shll_w_two_r16l_full(); break; case 0x70: shll_l_two_r32l_full(); break; case 0x80: case 0x88: shal_b_r8l_full(); break; case 0x90: case 0x98: shal_w_r16l_full(); break; case 0xb0: shal_l_r32l_full(); break; case 0xc0: case 0xc8: shal_b_two_r8l_full(); break; case 0xd0: case 0xd8: shal_w_two_r16l_full(); break; case 0xf0: shal_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x11: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: shlr_b_r8l_full(); break; case 0x10: case 0x18: shlr_w_r16l_full(); break; case 0x30: shlr_l_r32l_full(); break; case 0x40: case 0x48: shlr_b_two_r8l_full(); break; case 0x50: case 0x58: shlr_w_two_r16l_full(); break; case 0x70: shlr_l_two_r32l_full(); break; case 0x80: case 0x88: shar_b_r8l_full(); break; case 0x90: case 0x98: shar_w_r16l_full(); break; case 0xb0: shar_l_r32l_full(); break; case 0xc0: case 0xc8: shar_b_two_r8l_full(); break; case 0xd0: case 0xd8: shar_w_two_r16l_full(); break; case 0xf0: shar_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x12: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: rotxl_b_r8l_full(); break; case 0x10: case 0x18: rotxl_w_r16l_full(); break; case 0x30: rotxl_l_r32l_full(); break; case 0x40: case 0x48: rotxl_b_two_r8l_full(); break; case 0x50: case 0x58: rotxl_w_two_r16l_full(); break; case 0x70: rotxl_l_two_r32l_full(); break; case 0x80: case 0x88: rotl_b_r8l_full(); break; case 0x90: case 0x98: rotl_w_r16l_full(); break; case 0xb0: rotl_l_r32l_full(); break; case 0xc0: case 0xc8: rotl_b_two_r8l_full(); break; case 0xd0: case 0xd8: rotl_w_two_r16l_full(); break; case 0xf0: rotl_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x13: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: rotxr_b_r8l_full(); break; case 0x10: case 0x18: rotxr_w_r16l_full(); break; case 0x30: rotxr_l_r32l_full(); break; case 0x40: case 0x48: rotxr_b_two_r8l_full(); break; case 0x50: case 0x58: rotxr_w_two_r16l_full(); break; case 0x70: rotxr_l_two_r32l_full(); break; case 0x80: case 0x88: rotr_b_r8l_full(); break; case 0x90: case 0x98: rotr_w_r16l_full(); break; case 0xb0: rotr_l_r32l_full(); break; case 0xc0: case 0xc8: rotr_b_two_r8l_full(); break; case 0xd0: case 0xd8: rotr_w_two_r16l_full(); break; case 0xf0: rotr_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x14: { or_b_r8h_r8l_full(); break; } case 0x15: { xor_b_r8h_r8l_full(); break; } case 0x16: { and_b_r8h_r8l_full(); break; } case 0x17: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: not_b_r8l_full(); break; case 0x10: case 0x18: not_w_r16l_full(); break; case 0x30: not_l_r32l_full(); break; case 0x50: case 0x58: extu_w_r16l_full(); break; case 0x70: extu_l_r32l_full(); break; case 0x80: case 0x88: neg_b_r8l_full(); break; case 0x90: case 0x98: neg_w_r16l_full(); break; case 0xb0: neg_l_r32l_full(); break; case 0xd0: case 0xd8: exts_w_r16l_full(); break; case 0xf0: exts_l_r32l_full(); break; default: illegal(); break; } break; } case 0x18: { sub_b_r8h_r8l_full(); break; } case 0x19: { sub_w_r16h_r16l_full(); break; } case 0x1a: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: dec_b_one_r8l_full(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: sub_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x1b: { switch(m_inst_state & 0xf8) { case 0x00: subs_l_one_r32l_full(); break; case 0x50: case 0x58: dec_w_one_r16l_full(); break; case 0x70: dec_l_one_r32l_full(); break; case 0x80: subs_l_two_r32l_full(); break; case 0x90: subs_l_four_r32l_full(); break; case 0xd0: case 0xd8: dec_w_two_r16l_full(); break; case 0xf0: dec_l_two_r32l_full(); break; default: illegal(); break; } break; } case 0x1c: { cmp_b_r8h_r8l_full(); break; } case 0x1d: { cmp_w_r16h_r16l_full(); break; } case 0x1e: { subx_b_r8h_r8l_full(); break; } case 0x1f: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: das_b_r8l_full(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: cmp_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: { mov_b_abs8_r8u_full(); break; } case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: { mov_b_r8u_abs8_full(); break; } case 0x40: { bt_rel8_full(); break; } case 0x41: { bf_rel8_full(); break; } case 0x42: { bhi_rel8_full(); break; } case 0x43: { bls_rel8_full(); break; } case 0x44: { bcc_rel8_full(); break; } case 0x45: { bcs_rel8_full(); break; } case 0x46: { bne_rel8_full(); break; } case 0x47: { beq_rel8_full(); break; } case 0x48: { bvc_rel8_full(); break; } case 0x49: { bvs_rel8_full(); break; } case 0x4a: { bpl_rel8_full(); break; } case 0x4b: { bmi_rel8_full(); break; } case 0x4c: { bge_rel8_full(); break; } case 0x4d: { blt_rel8_full(); break; } case 0x4e: { bgt_rel8_full(); break; } case 0x4f: { ble_rel8_full(); break; } case 0x50: { mulxu_b_r8h_r16l_full(); break; } case 0x51: { divxu_b_r8h_r16l_full(); break; } case 0x52: { switch(m_inst_state & 0x08) { case 0x00: mulxu_w_r16h_r32l_full(); break; default: illegal(); break; } break; } case 0x53: { switch(m_inst_state & 0x08) { case 0x00: divxu_w_r16h_r32l_full(); break; default: illegal(); break; } break; } case 0x54: { switch(m_inst_state & 0xff) { case 0x70: rts_full(); break; default: illegal(); break; } break; } case 0x55: { bsr_rel8_full(); break; } case 0x56: { switch(m_inst_state & 0xff) { case 0x70: rte_full(); break; default: illegal(); break; } break; } case 0x57: { switch(m_inst_state & 0xcf) { case 0x00: trapa_imm2_full(); break; default: illegal(); break; } break; } case 0x58: { switch(m_inst_state & 0xff) { case 0x00: bt_rel16_full(); break; case 0x10: bf_rel16_full(); break; case 0x20: bhi_rel16_full(); break; case 0x30: bls_rel16_full(); break; case 0x40: bcc_rel16_full(); break; case 0x50: bcs_rel16_full(); break; case 0x60: bne_rel16_full(); break; case 0x70: beq_rel16_full(); break; case 0x80: bvc_rel16_full(); break; case 0x90: bvs_rel16_full(); break; case 0xa0: bpl_rel16_full(); break; case 0xb0: bmi_rel16_full(); break; case 0xc0: bge_rel16_full(); break; case 0xd0: blt_rel16_full(); break; case 0xe0: bgt_rel16_full(); break; case 0xf0: ble_rel16_full(); break; default: illegal(); break; } break; } case 0x59: { switch(m_inst_state & 0x8f) { case 0x00: jmp_r32h_full(); break; default: illegal(); break; } break; } case 0x5a: { jmp_abs24e_full(); break; } case 0x5b: { jmp_abs8i_full(); break; } case 0x5c: { switch(m_inst_state & 0xff) { case 0x00: bsr_rel16_full(); break; default: illegal(); break; } break; } case 0x5d: { switch(m_inst_state & 0x8f) { case 0x00: jsr_r32h_full(); break; default: illegal(); break; } break; } case 0x5e: { jsr_abs24e_full(); break; } case 0x5f: { jsr_abs8i_full(); break; } case 0x60: { bset_r8h_r8l_full(); break; } case 0x61: { bnot_r8h_r8l_full(); break; } case 0x62: { bclr_r8h_r8l_full(); break; } case 0x63: { btst_r8h_r8l_full(); break; } case 0x64: { or_w_r16h_r16l_full(); break; } case 0x65: { xor_w_r16h_r16l_full(); break; } case 0x66: { and_w_r16h_r16l_full(); break; } case 0x67: { switch(m_inst_state & 0x80) { case 0x00: bst_imm3_r8l_full(); break; case 0x80: bist_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x68: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32ih_r8l_full(); break; case 0x80: mov_b_r8l_r32ih_full(); break; default: illegal(); break; } break; } case 0x69: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32ih_r16l_full(); break; case 0x80: mov_w_r16l_r32ih_full(); break; default: illegal(); break; } break; } case 0x6a: { switch(m_inst_state & 0xff) { case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: mov_b_abs16_r8l_full(); break; case 0x10: dispatch_6a10_full(); break; case 0x18: dispatch_6a18_full(); break; case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: mov_b_abs32_r8l_full(); break; case 0x30: dispatch_6a30_full(); break; case 0x38: dispatch_6a38_full(); break; case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: movfpe_abs16_r8l_full(); break; case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: mov_b_r8l_abs16_full(); break; case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: mov_b_r8l_abs32_full(); break; case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: movtpe_r8l_abs16_full(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf0) { case 0x00: mov_w_abs16_r16l_full(); break; case 0x20: mov_w_abs32_r16l_full(); break; case 0x80: mov_w_r16l_abs16_full(); break; case 0xa0: mov_w_r16l_abs32_full(); break; default: illegal(); break; } break; } case 0x6c: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32ph_r8l_full(); break; case 0x80: mov_b_r8l_pr32h_full(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32ph_r16l_full(); break; case 0x80: mov_w_r16l_pr32h_full(); break; default: illegal(); break; } break; } case 0x6e: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32d16h_r8l_full(); break; case 0x80: mov_b_r8l_r32d16h_full(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32d16h_r16l_full(); break; case 0x80: mov_w_r16l_r32d16h_full(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x80) { case 0x00: bset_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x80) { case 0x00: bnot_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x80) { case 0x00: bclr_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x80) { case 0x00: btst_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x80) { case 0x00: bor_imm3_r8l_full(); break; case 0x80: bior_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x80) { case 0x00: bxor_imm3_r8l_full(); break; case 0x80: bixor_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x80) { case 0x00: band_imm3_r8l_full(); break; case 0x80: biand_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x80) { case 0x00: bld_imm3_r8l_full(); break; case 0x80: bild_imm3_r8l_full(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7800_full(); break; default: illegal(); break; } break; } case 0x79: { switch(m_inst_state & 0xf0) { case 0x00: mov_w_imm16_r16l_full(); break; case 0x10: add_w_imm16_r16l_full(); break; case 0x20: cmp_w_imm16_r16l_full(); break; case 0x30: sub_w_imm16_r16l_full(); break; case 0x40: or_w_imm16_r16l_full(); break; case 0x50: xor_w_imm16_r16l_full(); break; case 0x60: and_w_imm16_r16l_full(); break; default: illegal(); break; } break; } case 0x7a: { switch(m_inst_state & 0xf8) { case 0x00: mov_l_imm32_r32l_full(); break; case 0x10: add_l_imm32_r32l_full(); break; case 0x20: cmp_l_imm32_r32l_full(); break; case 0x30: sub_l_imm32_r32l_full(); break; case 0x40: or_l_imm32_r32l_full(); break; case 0x50: xor_l_imm32_r32l_full(); break; case 0x60: and_l_imm32_r32l_full(); break; default: illegal(); break; } break; } case 0x7b: { switch(m_inst_state & 0xff) { case 0x5c: dispatch_7b5c_full(); break; case 0xd4: dispatch_7bd4_full(); break; default: illegal(); break; } break; } case 0x7c: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7c00_full(); break; default: illegal(); break; } break; } case 0x7d: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7d00_full(); break; default: illegal(); break; } break; } case 0x7e: { dispatch_7e00_full(); break; } case 0x7f: { dispatch_7f00_full(); break; } case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: { add_b_imm8_r8u_full(); break; } case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: { addx_b_imm8_r8u_full(); break; } case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: { cmp_b_imm8_r8u_full(); break; } case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: { subx_b_imm8_r8u_full(); break; } case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: { or_b_imm8_r8u_full(); break; } case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: { xor_b_imm8_r8u_full(); break; } case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef: { and_b_imm8_r8u_full(); break; } case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: { mov_b_imm8_r8u_full(); break; } default: illegal(); break; } break; } case 0x01: { switch(m_inst_state & 0xffff) { case 0x00: state_reset_full(); break; case 0x01: state_irq_full(); break; case 0x02: state_trace_full(); break; case 0x03: state_dma_full(); break; case 0x04: state_dtc_full(); break; case 0x05: state_dtc_vector_full(); break; case 0x06: state_dtc_writeback_full(); break; } break; } case 0x02: { switch((m_inst_state >> 8) & 0xff) { case 0x69: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32ih_r32l_full(); break; case 0x80: mov_l_r32l_r32ih_full(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf8) { case 0x00: mov_l_abs16_r32l_full(); break; case 0x20: mov_l_abs32_r32l_full(); break; case 0x80: mov_l_r32l_abs16_full(); break; case 0xa0: mov_l_r32l_abs32_full(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32ph_r32l_full(); break; case 0x80: mov_l_r32l_pr32h_full(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32d16h_r32l_full(); break; case 0x80: mov_l_r32l_r32d16h_full(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x0f) { case 0x00: dispatch_01007800_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x03: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xf8) { case 0x20: mov_l_r32d32hh_r32l_full(); break; case 0xa0: mov_l_r32l_r32d32hh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x04: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xf9) { case 0x71: ldm_l_spp_r32n2l_full(); break; case 0xf0: stm_l_r32n2l_psp_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x05: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xfb) { case 0x72: ldm_l_spp_r32n3l_full(); break; case 0xf0: stm_l_r32n3l_psp_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x06: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xfb) { case 0x73: ldm_l_spp_r32n4l_full(); break; case 0xf0: stm_l_r32n4l_psp_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x07: { switch((m_inst_state >> 8) & 0xff) { case 0x69: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ih_ccr_full(); break; case 0x80: stc_w_ccr_r32ih_full(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xff) { case 0x00: ldc_w_abs16_ccr_full(); break; case 0x20: ldc_w_abs32_ccr_full(); break; case 0x80: stc_w_ccr_abs16_full(); break; case 0xa0: stc_w_ccr_abs32_full(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ph_ccr_full(); break; case 0x80: stc_w_ccr_pr32h_full(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32d16h_ccr_full(); break; case 0x80: stc_w_ccr_r32d16h_full(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_01407800_full(); break; case 0x80: dispatch_01407880_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x08: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0x20: ldc_w_r32d32hh_ccr_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x09: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0xa0: stc_w_ccr_r32d32hh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0a: { switch((m_inst_state >> 8) & 0xff) { case 0x04: { orc_imm8_exr_full(); break; } case 0x05: { xorc_imm8_exr_full(); break; } case 0x06: { andc_imm8_exr_full(); break; } case 0x07: { ldc_imm8_exr_full(); break; } case 0x69: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ih_exr_full(); break; case 0x80: stc_w_exr_r32ih_full(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xff) { case 0x00: ldc_w_abs16_exr_full(); break; case 0x20: ldc_w_abs32_exr_full(); break; case 0x80: stc_w_exr_abs16_full(); break; case 0xa0: stc_w_exr_abs32_full(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ph_exr_full(); break; case 0x80: stc_w_exr_pr32h_full(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32d16h_exr_full(); break; case 0x80: stc_w_exr_r32d16h_full(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_01417800_full(); break; case 0x80: dispatch_01417880_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0b: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0x20: ldc_w_r32d32hh_exr_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0c: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0xa0: stc_w_exr_r32d32hh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0e: { switch((m_inst_state >> 8) & 0xff) { case 0x50: { mulxs_b_r8h_r16l_full(); break; } case 0x52: { switch(m_inst_state & 0x08) { case 0x00: mulxs_w_r16h_r32l_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0f: { switch((m_inst_state >> 8) & 0xff) { case 0x51: { divxs_b_r8h_r16l_full(); break; } case 0x53: { switch(m_inst_state & 0x08) { case 0x00: divxs_w_r16h_r32l_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x10: { switch((m_inst_state >> 8) & 0xff) { case 0x7b: { switch(m_inst_state & 0xaf) { case 0x0c: tas_r32ih_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x11: { switch((m_inst_state >> 8) & 0xff) { case 0x64: { switch(m_inst_state & 0x88) { case 0x00: or_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x65: { switch(m_inst_state & 0x88) { case 0x00: xor_l_r32h_r32l_full(); break; default: illegal(); break; } break; } case 0x66: { switch(m_inst_state & 0x88) { case 0x00: and_l_r32h_r32l_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x12: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs16_full(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs16_full(); break; case 0x80: bior_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs16_full(); break; case 0x80: bixor_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs16_full(); break; case 0x80: biand_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs16_full(); break; case 0x80: bild_imm3_abs16_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x13: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs16_full(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs16_full(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs16_full(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs16_full(); break; case 0x80: bist_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs16_full(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs16_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x14: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs32_full(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs32_full(); break; case 0x80: bior_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs32_full(); break; case 0x80: bixor_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs32_full(); break; case 0x80: biand_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs32_full(); break; case 0x80: bild_imm3_abs32_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x15: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs32_full(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs32_full(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs32_full(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs32_full(); break; case 0x80: bist_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs32_full(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs32_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x16: { switch((m_inst_state >> 8) & 0xff) { case 0x6a: { switch(m_inst_state & 0xf0) { case 0x20: mov_b_r32d32hh_r8l_full(); break; case 0xa0: mov_b_r8l_r32d32hh_full(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf0) { case 0x20: mov_w_r32d32hh_r16l_full(); break; case 0xa0: mov_w_r16l_r32d32hh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x17: { switch((m_inst_state >> 8) & 0xff) { case 0x59: { switch(m_inst_state & 0xff) { case 0x8f: eepmov_b_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x18: { switch((m_inst_state >> 8) & 0xff) { case 0x59: { switch(m_inst_state & 0xff) { case 0x8f: eepmov_w_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x19: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_r32ihh_full(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_r32ihh_full(); break; case 0x80: bior_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_r32ihh_full(); break; case 0x80: bixor_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_r32ihh_full(); break; case 0x80: biand_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_r32ihh_full(); break; case 0x80: bild_imm3_r32ihh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1a: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_r32ihh_full(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_r32ihh_full(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_r32ihh_full(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_r32ihh_full(); break; case 0x80: bist_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_r32ihh_full(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_r32ihh_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1b: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs8_full(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs8_full(); break; case 0x80: bior_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs8_full(); break; case 0x80: bixor_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs8_full(); break; case 0x80: biand_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs8_full(); break; case 0x80: bild_imm3_abs8_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1c: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs8_full(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs8_full(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs8_full(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs8_full(); break; case 0x80: bist_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs8_full(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs8_full(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } } } void h8s2000_device::do_exec_partial() { switch(m_inst_state >> 16) { case 0x00: { switch((m_inst_state >> 8) & 0xff) { case 0x00: { switch(m_inst_state & 0xff) { case 0x00: nop_partial(); break; default: illegal(); break; } break; } case 0x01: { switch(m_inst_state & 0xff) { case 0x00: dispatch_0100_partial(); break; case 0x10: dispatch_0110_partial(); break; case 0x20: dispatch_0120_partial(); break; case 0x30: dispatch_0130_partial(); break; case 0x40: dispatch_0140_partial(); break; case 0x41: dispatch_0141_partial(); break; case 0x80: sleep_partial(); break; case 0xc0: dispatch_01c0_partial(); break; case 0xd0: dispatch_01d0_partial(); break; case 0xe0: dispatch_01e0_partial(); break; case 0xf0: dispatch_01f0_partial(); break; default: illegal(); break; } break; } case 0x02: { switch(m_inst_state & 0xf0) { case 0x00: stc_ccr_r8l_partial(); break; case 0x10: stc_exr_r8l_partial(); break; default: illegal(); break; } break; } case 0x03: { switch(m_inst_state & 0xf0) { case 0x00: ldc_r8l_ccr_partial(); break; case 0x10: ldc_r8l_exr_partial(); break; default: illegal(); break; } break; } case 0x04: { orc_imm8_ccr_partial(); break; } case 0x05: { xorc_imm8_ccr_partial(); break; } case 0x06: { andc_imm8_ccr_partial(); break; } case 0x07: { ldc_imm8_ccr_partial(); break; } case 0x08: { add_b_r8h_r8l_partial(); break; } case 0x09: { add_w_r16h_r16l_partial(); break; } case 0x0a: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: inc_b_one_r8l_partial(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: add_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x0b: { switch(m_inst_state & 0xf8) { case 0x00: adds_l_one_r32l_partial(); break; case 0x50: case 0x58: inc_w_one_r16l_partial(); break; case 0x70: inc_l_one_r32l_partial(); break; case 0x80: adds_l_two_r32l_partial(); break; case 0x90: adds_l_four_r32l_partial(); break; case 0xd0: case 0xd8: inc_w_two_r16l_partial(); break; case 0xf0: inc_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x0c: { mov_b_r8h_r8l_partial(); break; } case 0x0d: { mov_w_r16h_r16l_partial(); break; } case 0x0e: { addx_b_r8h_r8l_partial(); break; } case 0x0f: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: daa_b_r8l_partial(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: mov_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x10: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: shll_b_r8l_partial(); break; case 0x10: case 0x18: shll_w_r16l_partial(); break; case 0x30: shll_l_r32l_partial(); break; case 0x40: case 0x48: shll_b_two_r8l_partial(); break; case 0x50: case 0x58: shll_w_two_r16l_partial(); break; case 0x70: shll_l_two_r32l_partial(); break; case 0x80: case 0x88: shal_b_r8l_partial(); break; case 0x90: case 0x98: shal_w_r16l_partial(); break; case 0xb0: shal_l_r32l_partial(); break; case 0xc0: case 0xc8: shal_b_two_r8l_partial(); break; case 0xd0: case 0xd8: shal_w_two_r16l_partial(); break; case 0xf0: shal_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x11: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: shlr_b_r8l_partial(); break; case 0x10: case 0x18: shlr_w_r16l_partial(); break; case 0x30: shlr_l_r32l_partial(); break; case 0x40: case 0x48: shlr_b_two_r8l_partial(); break; case 0x50: case 0x58: shlr_w_two_r16l_partial(); break; case 0x70: shlr_l_two_r32l_partial(); break; case 0x80: case 0x88: shar_b_r8l_partial(); break; case 0x90: case 0x98: shar_w_r16l_partial(); break; case 0xb0: shar_l_r32l_partial(); break; case 0xc0: case 0xc8: shar_b_two_r8l_partial(); break; case 0xd0: case 0xd8: shar_w_two_r16l_partial(); break; case 0xf0: shar_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x12: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: rotxl_b_r8l_partial(); break; case 0x10: case 0x18: rotxl_w_r16l_partial(); break; case 0x30: rotxl_l_r32l_partial(); break; case 0x40: case 0x48: rotxl_b_two_r8l_partial(); break; case 0x50: case 0x58: rotxl_w_two_r16l_partial(); break; case 0x70: rotxl_l_two_r32l_partial(); break; case 0x80: case 0x88: rotl_b_r8l_partial(); break; case 0x90: case 0x98: rotl_w_r16l_partial(); break; case 0xb0: rotl_l_r32l_partial(); break; case 0xc0: case 0xc8: rotl_b_two_r8l_partial(); break; case 0xd0: case 0xd8: rotl_w_two_r16l_partial(); break; case 0xf0: rotl_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x13: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: rotxr_b_r8l_partial(); break; case 0x10: case 0x18: rotxr_w_r16l_partial(); break; case 0x30: rotxr_l_r32l_partial(); break; case 0x40: case 0x48: rotxr_b_two_r8l_partial(); break; case 0x50: case 0x58: rotxr_w_two_r16l_partial(); break; case 0x70: rotxr_l_two_r32l_partial(); break; case 0x80: case 0x88: rotr_b_r8l_partial(); break; case 0x90: case 0x98: rotr_w_r16l_partial(); break; case 0xb0: rotr_l_r32l_partial(); break; case 0xc0: case 0xc8: rotr_b_two_r8l_partial(); break; case 0xd0: case 0xd8: rotr_w_two_r16l_partial(); break; case 0xf0: rotr_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x14: { or_b_r8h_r8l_partial(); break; } case 0x15: { xor_b_r8h_r8l_partial(); break; } case 0x16: { and_b_r8h_r8l_partial(); break; } case 0x17: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: not_b_r8l_partial(); break; case 0x10: case 0x18: not_w_r16l_partial(); break; case 0x30: not_l_r32l_partial(); break; case 0x50: case 0x58: extu_w_r16l_partial(); break; case 0x70: extu_l_r32l_partial(); break; case 0x80: case 0x88: neg_b_r8l_partial(); break; case 0x90: case 0x98: neg_w_r16l_partial(); break; case 0xb0: neg_l_r32l_partial(); break; case 0xd0: case 0xd8: exts_w_r16l_partial(); break; case 0xf0: exts_l_r32l_partial(); break; default: illegal(); break; } break; } case 0x18: { sub_b_r8h_r8l_partial(); break; } case 0x19: { sub_w_r16h_r16l_partial(); break; } case 0x1a: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: dec_b_one_r8l_partial(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: sub_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x1b: { switch(m_inst_state & 0xf8) { case 0x00: subs_l_one_r32l_partial(); break; case 0x50: case 0x58: dec_w_one_r16l_partial(); break; case 0x70: dec_l_one_r32l_partial(); break; case 0x80: subs_l_two_r32l_partial(); break; case 0x90: subs_l_four_r32l_partial(); break; case 0xd0: case 0xd8: dec_w_two_r16l_partial(); break; case 0xf0: dec_l_two_r32l_partial(); break; default: illegal(); break; } break; } case 0x1c: { cmp_b_r8h_r8l_partial(); break; } case 0x1d: { cmp_w_r16h_r16l_partial(); break; } case 0x1e: { subx_b_r8h_r8l_partial(); break; } case 0x1f: { switch(m_inst_state & 0xf8) { case 0x00: case 0x08: das_b_r8l_partial(); break; case 0x80: case 0x90: case 0xa0: case 0xb0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: cmp_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: { mov_b_abs8_r8u_partial(); break; } case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: case 0x3a: case 0x3b: case 0x3c: case 0x3d: case 0x3e: case 0x3f: { mov_b_r8u_abs8_partial(); break; } case 0x40: { bt_rel8_partial(); break; } case 0x41: { bf_rel8_partial(); break; } case 0x42: { bhi_rel8_partial(); break; } case 0x43: { bls_rel8_partial(); break; } case 0x44: { bcc_rel8_partial(); break; } case 0x45: { bcs_rel8_partial(); break; } case 0x46: { bne_rel8_partial(); break; } case 0x47: { beq_rel8_partial(); break; } case 0x48: { bvc_rel8_partial(); break; } case 0x49: { bvs_rel8_partial(); break; } case 0x4a: { bpl_rel8_partial(); break; } case 0x4b: { bmi_rel8_partial(); break; } case 0x4c: { bge_rel8_partial(); break; } case 0x4d: { blt_rel8_partial(); break; } case 0x4e: { bgt_rel8_partial(); break; } case 0x4f: { ble_rel8_partial(); break; } case 0x50: { mulxu_b_r8h_r16l_partial(); break; } case 0x51: { divxu_b_r8h_r16l_partial(); break; } case 0x52: { switch(m_inst_state & 0x08) { case 0x00: mulxu_w_r16h_r32l_partial(); break; default: illegal(); break; } break; } case 0x53: { switch(m_inst_state & 0x08) { case 0x00: divxu_w_r16h_r32l_partial(); break; default: illegal(); break; } break; } case 0x54: { switch(m_inst_state & 0xff) { case 0x70: rts_partial(); break; default: illegal(); break; } break; } case 0x55: { bsr_rel8_partial(); break; } case 0x56: { switch(m_inst_state & 0xff) { case 0x70: rte_partial(); break; default: illegal(); break; } break; } case 0x57: { switch(m_inst_state & 0xcf) { case 0x00: trapa_imm2_partial(); break; default: illegal(); break; } break; } case 0x58: { switch(m_inst_state & 0xff) { case 0x00: bt_rel16_partial(); break; case 0x10: bf_rel16_partial(); break; case 0x20: bhi_rel16_partial(); break; case 0x30: bls_rel16_partial(); break; case 0x40: bcc_rel16_partial(); break; case 0x50: bcs_rel16_partial(); break; case 0x60: bne_rel16_partial(); break; case 0x70: beq_rel16_partial(); break; case 0x80: bvc_rel16_partial(); break; case 0x90: bvs_rel16_partial(); break; case 0xa0: bpl_rel16_partial(); break; case 0xb0: bmi_rel16_partial(); break; case 0xc0: bge_rel16_partial(); break; case 0xd0: blt_rel16_partial(); break; case 0xe0: bgt_rel16_partial(); break; case 0xf0: ble_rel16_partial(); break; default: illegal(); break; } break; } case 0x59: { switch(m_inst_state & 0x8f) { case 0x00: jmp_r32h_partial(); break; default: illegal(); break; } break; } case 0x5a: { jmp_abs24e_partial(); break; } case 0x5b: { jmp_abs8i_partial(); break; } case 0x5c: { switch(m_inst_state & 0xff) { case 0x00: bsr_rel16_partial(); break; default: illegal(); break; } break; } case 0x5d: { switch(m_inst_state & 0x8f) { case 0x00: jsr_r32h_partial(); break; default: illegal(); break; } break; } case 0x5e: { jsr_abs24e_partial(); break; } case 0x5f: { jsr_abs8i_partial(); break; } case 0x60: { bset_r8h_r8l_partial(); break; } case 0x61: { bnot_r8h_r8l_partial(); break; } case 0x62: { bclr_r8h_r8l_partial(); break; } case 0x63: { btst_r8h_r8l_partial(); break; } case 0x64: { or_w_r16h_r16l_partial(); break; } case 0x65: { xor_w_r16h_r16l_partial(); break; } case 0x66: { and_w_r16h_r16l_partial(); break; } case 0x67: { switch(m_inst_state & 0x80) { case 0x00: bst_imm3_r8l_partial(); break; case 0x80: bist_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x68: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32ih_r8l_partial(); break; case 0x80: mov_b_r8l_r32ih_partial(); break; default: illegal(); break; } break; } case 0x69: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32ih_r16l_partial(); break; case 0x80: mov_w_r16l_r32ih_partial(); break; default: illegal(); break; } break; } case 0x6a: { switch(m_inst_state & 0xff) { case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07: case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f: mov_b_abs16_r8l_partial(); break; case 0x10: dispatch_6a10_partial(); break; case 0x18: dispatch_6a18_partial(); break; case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f: mov_b_abs32_r8l_partial(); break; case 0x30: dispatch_6a30_partial(); break; case 0x38: dispatch_6a38_partial(); break; case 0x40: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: movfpe_abs16_r8l_partial(); break; case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: mov_b_r8l_abs16_partial(); break; case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: mov_b_r8l_abs32_partial(); break; case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: movtpe_r8l_abs16_partial(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf0) { case 0x00: mov_w_abs16_r16l_partial(); break; case 0x20: mov_w_abs32_r16l_partial(); break; case 0x80: mov_w_r16l_abs16_partial(); break; case 0xa0: mov_w_r16l_abs32_partial(); break; default: illegal(); break; } break; } case 0x6c: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32ph_r8l_partial(); break; case 0x80: mov_b_r8l_pr32h_partial(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32ph_r16l_partial(); break; case 0x80: mov_w_r16l_pr32h_partial(); break; default: illegal(); break; } break; } case 0x6e: { switch(m_inst_state & 0x80) { case 0x00: mov_b_r32d16h_r8l_partial(); break; case 0x80: mov_b_r8l_r32d16h_partial(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x80) { case 0x00: mov_w_r32d16h_r16l_partial(); break; case 0x80: mov_w_r16l_r32d16h_partial(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x80) { case 0x00: bset_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x80) { case 0x00: bnot_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x80) { case 0x00: bclr_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x80) { case 0x00: btst_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x80) { case 0x00: bor_imm3_r8l_partial(); break; case 0x80: bior_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x80) { case 0x00: bxor_imm3_r8l_partial(); break; case 0x80: bixor_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x80) { case 0x00: band_imm3_r8l_partial(); break; case 0x80: biand_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x80) { case 0x00: bld_imm3_r8l_partial(); break; case 0x80: bild_imm3_r8l_partial(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7800_partial(); break; default: illegal(); break; } break; } case 0x79: { switch(m_inst_state & 0xf0) { case 0x00: mov_w_imm16_r16l_partial(); break; case 0x10: add_w_imm16_r16l_partial(); break; case 0x20: cmp_w_imm16_r16l_partial(); break; case 0x30: sub_w_imm16_r16l_partial(); break; case 0x40: or_w_imm16_r16l_partial(); break; case 0x50: xor_w_imm16_r16l_partial(); break; case 0x60: and_w_imm16_r16l_partial(); break; default: illegal(); break; } break; } case 0x7a: { switch(m_inst_state & 0xf8) { case 0x00: mov_l_imm32_r32l_partial(); break; case 0x10: add_l_imm32_r32l_partial(); break; case 0x20: cmp_l_imm32_r32l_partial(); break; case 0x30: sub_l_imm32_r32l_partial(); break; case 0x40: or_l_imm32_r32l_partial(); break; case 0x50: xor_l_imm32_r32l_partial(); break; case 0x60: and_l_imm32_r32l_partial(); break; default: illegal(); break; } break; } case 0x7b: { switch(m_inst_state & 0xff) { case 0x5c: dispatch_7b5c_partial(); break; case 0xd4: dispatch_7bd4_partial(); break; default: illegal(); break; } break; } case 0x7c: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7c00_partial(); break; default: illegal(); break; } break; } case 0x7d: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_7d00_partial(); break; default: illegal(); break; } break; } case 0x7e: { dispatch_7e00_partial(); break; } case 0x7f: { dispatch_7f00_partial(); break; } case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: { add_b_imm8_r8u_partial(); break; } case 0x90: case 0x91: case 0x92: case 0x93: case 0x94: case 0x95: case 0x96: case 0x97: case 0x98: case 0x99: case 0x9a: case 0x9b: case 0x9c: case 0x9d: case 0x9e: case 0x9f: { addx_b_imm8_r8u_partial(); break; } case 0xa0: case 0xa1: case 0xa2: case 0xa3: case 0xa4: case 0xa5: case 0xa6: case 0xa7: case 0xa8: case 0xa9: case 0xaa: case 0xab: case 0xac: case 0xad: case 0xae: case 0xaf: { cmp_b_imm8_r8u_partial(); break; } case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: { subx_b_imm8_r8u_partial(); break; } case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: case 0xc8: case 0xc9: case 0xca: case 0xcb: case 0xcc: case 0xcd: case 0xce: case 0xcf: { or_b_imm8_r8u_partial(); break; } case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: case 0xd8: case 0xd9: case 0xda: case 0xdb: case 0xdc: case 0xdd: case 0xde: case 0xdf: { xor_b_imm8_r8u_partial(); break; } case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef: { and_b_imm8_r8u_partial(); break; } case 0xf0: case 0xf1: case 0xf2: case 0xf3: case 0xf4: case 0xf5: case 0xf6: case 0xf7: case 0xf8: case 0xf9: case 0xfa: case 0xfb: case 0xfc: case 0xfd: case 0xfe: case 0xff: { mov_b_imm8_r8u_partial(); break; } default: illegal(); break; } break; } case 0x01: { switch(m_inst_state & 0xffff) { case 0x00: state_reset_partial(); break; case 0x01: state_irq_partial(); break; case 0x02: state_trace_partial(); break; case 0x03: state_dma_partial(); break; case 0x04: state_dtc_partial(); break; case 0x05: state_dtc_vector_partial(); break; case 0x06: state_dtc_writeback_partial(); break; } break; } case 0x02: { switch((m_inst_state >> 8) & 0xff) { case 0x69: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32ih_r32l_partial(); break; case 0x80: mov_l_r32l_r32ih_partial(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf8) { case 0x00: mov_l_abs16_r32l_partial(); break; case 0x20: mov_l_abs32_r32l_partial(); break; case 0x80: mov_l_r32l_abs16_partial(); break; case 0xa0: mov_l_r32l_abs32_partial(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32ph_r32l_partial(); break; case 0x80: mov_l_r32l_pr32h_partial(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x88) { case 0x00: mov_l_r32d16h_r32l_partial(); break; case 0x80: mov_l_r32l_r32d16h_partial(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x0f) { case 0x00: dispatch_01007800_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x03: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xf8) { case 0x20: mov_l_r32d32hh_r32l_partial(); break; case 0xa0: mov_l_r32l_r32d32hh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x04: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xf9) { case 0x71: ldm_l_spp_r32n2l_partial(); break; case 0xf0: stm_l_r32n2l_psp_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x05: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xfb) { case 0x72: ldm_l_spp_r32n3l_partial(); break; case 0xf0: stm_l_r32n3l_psp_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x06: { switch((m_inst_state >> 8) & 0xff) { case 0x6d: { switch(m_inst_state & 0xfb) { case 0x73: ldm_l_spp_r32n4l_partial(); break; case 0xf0: stm_l_r32n4l_psp_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x07: { switch((m_inst_state >> 8) & 0xff) { case 0x69: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ih_ccr_partial(); break; case 0x80: stc_w_ccr_r32ih_partial(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xff) { case 0x00: ldc_w_abs16_ccr_partial(); break; case 0x20: ldc_w_abs32_ccr_partial(); break; case 0x80: stc_w_ccr_abs16_partial(); break; case 0xa0: stc_w_ccr_abs32_partial(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ph_ccr_partial(); break; case 0x80: stc_w_ccr_pr32h_partial(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32d16h_ccr_partial(); break; case 0x80: stc_w_ccr_r32d16h_partial(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_01407800_partial(); break; case 0x80: dispatch_01407880_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x08: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0x20: ldc_w_r32d32hh_ccr_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x09: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0xa0: stc_w_ccr_r32d32hh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0a: { switch((m_inst_state >> 8) & 0xff) { case 0x04: { orc_imm8_exr_partial(); break; } case 0x05: { xorc_imm8_exr_partial(); break; } case 0x06: { andc_imm8_exr_partial(); break; } case 0x07: { ldc_imm8_exr_partial(); break; } case 0x69: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ih_exr_partial(); break; case 0x80: stc_w_exr_r32ih_partial(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xff) { case 0x00: ldc_w_abs16_exr_partial(); break; case 0x20: ldc_w_abs32_exr_partial(); break; case 0x80: stc_w_exr_abs16_partial(); break; case 0xa0: stc_w_exr_abs32_partial(); break; default: illegal(); break; } break; } case 0x6d: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32ph_exr_partial(); break; case 0x80: stc_w_exr_pr32h_partial(); break; default: illegal(); break; } break; } case 0x6f: { switch(m_inst_state & 0x8f) { case 0x00: ldc_w_r32d16h_exr_partial(); break; case 0x80: stc_w_exr_r32d16h_partial(); break; default: illegal(); break; } break; } case 0x78: { switch(m_inst_state & 0x8f) { case 0x00: dispatch_01417800_partial(); break; case 0x80: dispatch_01417880_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0b: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0x20: ldc_w_r32d32hh_exr_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0c: { switch((m_inst_state >> 8) & 0xff) { case 0x6b: { switch(m_inst_state & 0xff) { case 0xa0: stc_w_exr_r32d32hh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0e: { switch((m_inst_state >> 8) & 0xff) { case 0x50: { mulxs_b_r8h_r16l_partial(); break; } case 0x52: { switch(m_inst_state & 0x08) { case 0x00: mulxs_w_r16h_r32l_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x0f: { switch((m_inst_state >> 8) & 0xff) { case 0x51: { divxs_b_r8h_r16l_partial(); break; } case 0x53: { switch(m_inst_state & 0x08) { case 0x00: divxs_w_r16h_r32l_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x10: { switch((m_inst_state >> 8) & 0xff) { case 0x7b: { switch(m_inst_state & 0xaf) { case 0x0c: tas_r32ih_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x11: { switch((m_inst_state >> 8) & 0xff) { case 0x64: { switch(m_inst_state & 0x88) { case 0x00: or_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x65: { switch(m_inst_state & 0x88) { case 0x00: xor_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } case 0x66: { switch(m_inst_state & 0x88) { case 0x00: and_l_r32h_r32l_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x12: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs16_partial(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs16_partial(); break; case 0x80: bior_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs16_partial(); break; case 0x80: bixor_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs16_partial(); break; case 0x80: biand_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs16_partial(); break; case 0x80: bild_imm3_abs16_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x13: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs16_partial(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs16_partial(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs16_partial(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs16_partial(); break; case 0x80: bist_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs16_partial(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs16_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x14: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs32_partial(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs32_partial(); break; case 0x80: bior_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs32_partial(); break; case 0x80: bixor_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs32_partial(); break; case 0x80: biand_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs32_partial(); break; case 0x80: bild_imm3_abs32_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x15: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs32_partial(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs32_partial(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs32_partial(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs32_partial(); break; case 0x80: bist_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs32_partial(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs32_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x16: { switch((m_inst_state >> 8) & 0xff) { case 0x6a: { switch(m_inst_state & 0xf0) { case 0x20: mov_b_r32d32hh_r8l_partial(); break; case 0xa0: mov_b_r8l_r32d32hh_partial(); break; default: illegal(); break; } break; } case 0x6b: { switch(m_inst_state & 0xf0) { case 0x20: mov_w_r32d32hh_r16l_partial(); break; case 0xa0: mov_w_r16l_r32d32hh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x17: { switch((m_inst_state >> 8) & 0xff) { case 0x59: { switch(m_inst_state & 0xff) { case 0x8f: eepmov_b_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x18: { switch((m_inst_state >> 8) & 0xff) { case 0x59: { switch(m_inst_state & 0xff) { case 0x8f: eepmov_w_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x19: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_r32ihh_partial(); break; case 0x80: bior_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_r32ihh_partial(); break; case 0x80: bixor_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_r32ihh_partial(); break; case 0x80: biand_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_r32ihh_partial(); break; case 0x80: bild_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1a: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_r32ihh_partial(); break; case 0x80: bist_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_r32ihh_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1b: { switch((m_inst_state >> 8) & 0xff) { case 0x63: { switch(m_inst_state & 0x0f) { case 0x00: btst_r8h_abs8_partial(); break; default: illegal(); break; } break; } case 0x73: { switch(m_inst_state & 0x8f) { case 0x00: btst_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x74: { switch(m_inst_state & 0x8f) { case 0x00: bor_imm3_abs8_partial(); break; case 0x80: bior_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x75: { switch(m_inst_state & 0x8f) { case 0x00: bxor_imm3_abs8_partial(); break; case 0x80: bixor_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x76: { switch(m_inst_state & 0x8f) { case 0x00: band_imm3_abs8_partial(); break; case 0x80: biand_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x77: { switch(m_inst_state & 0x8f) { case 0x00: bld_imm3_abs8_partial(); break; case 0x80: bild_imm3_abs8_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } case 0x1c: { switch((m_inst_state >> 8) & 0xff) { case 0x60: { switch(m_inst_state & 0x0f) { case 0x00: bset_r8h_abs8_partial(); break; default: illegal(); break; } break; } case 0x61: { switch(m_inst_state & 0x0f) { case 0x00: bnot_r8h_abs8_partial(); break; default: illegal(); break; } break; } case 0x62: { switch(m_inst_state & 0x0f) { case 0x00: bclr_r8h_abs8_partial(); break; default: illegal(); break; } break; } case 0x67: { switch(m_inst_state & 0x8f) { case 0x00: bst_imm3_abs8_partial(); break; case 0x80: bist_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x70: { switch(m_inst_state & 0x8f) { case 0x00: bset_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x71: { switch(m_inst_state & 0x8f) { case 0x00: bnot_imm3_abs8_partial(); break; default: illegal(); break; } break; } case 0x72: { switch(m_inst_state & 0x8f) { case 0x00: bclr_imm3_abs8_partial(); break; default: illegal(); break; } break; } default: illegal(); break; } break; } } }