summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/score/score.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/score/score.cpp')
-rw-r--r--src/devices/cpu/score/score.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp
index 4d7ed757c11..f541c27a0fe 100644
--- a/src/devices/cpu/score/score.cpp
+++ b/src/devices/cpu/score/score.cpp
@@ -112,7 +112,6 @@ void score7_cpu_device::device_start()
save_item(NAME(m_sr));
save_item(NAME(m_ce));
save_item(NAME(m_pending_interrupt));
- save_item(NAME(m_has_pending_interrupt));
}
@@ -127,8 +126,7 @@ void score7_cpu_device::device_reset()
memset(m_cr, 0, sizeof(m_cr));
memset(m_sr, 0, sizeof(m_sr));
memset(m_ce, 0, sizeof(m_ce));
- memset(m_pending_interrupt, 0, sizeof(m_pending_interrupt));
- m_has_pending_interrupt = false;
+ m_pending_interrupt = 0;
REG_EXCPVEC = m_pc = 0x9f000000;
}
@@ -182,7 +180,7 @@ void score7_cpu_device::execute_run()
m_ppc = m_pc;
debugger_instruction_hook(m_pc);
- if (m_has_pending_interrupt)
+ if (m_pending_interrupt)
check_irq();
uint32_t op = fetch();
@@ -226,10 +224,7 @@ void score7_cpu_device::execute_set_input(int inputnum, int state)
{
standard_irq_callback(inputnum);
if (inputnum > 0 && inputnum < 64)
- {
- m_pending_interrupt[inputnum] = true;
- m_has_pending_interrupt = true;
- }
+ m_pending_interrupt |= 1ULL << inputnum;
}
}
@@ -326,16 +321,14 @@ void score7_cpu_device::check_irq()
{
for (int i=63; i>0; i--)
{
- if (m_pending_interrupt[i])
+ if (m_pending_interrupt & (1ULL << i))
{
- m_pending_interrupt[i] = false;
+ m_pending_interrupt &= ~(1ULL << i);
standard_irq_callback(i);
gen_exception(EXCEPTION_INTERRUPT, i);
return;
}
}
-
- m_has_pending_interrupt = false;
}
}
@@ -1327,6 +1320,11 @@ void score7_cpu_device::op_iform1a()
CHECK_N(m_gpr[rd]);
CHECK_Z(m_gpr[rd] & (1 << imm5));
break;
+ case 0x07: // bittgl!
+ m_gpr[rd] ^= (1 << imm5);
+ CHECK_Z(m_gpr[rd]);
+ CHECK_N(m_gpr[rd]);
+ break;
default:
op_undef();
}