mirror of
https://github.com/holub/mame
synced 2025-04-20 15:32:45 +03:00
cpu/score: performance optimization.
This commit is contained in:
parent
eca0324682
commit
92213dbdab
@ -112,6 +112,7 @@ 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,6 +128,7 @@ void score7_cpu_device::device_reset()
|
||||
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;
|
||||
|
||||
REG_EXCPVEC = m_pc = 0x9f000000;
|
||||
}
|
||||
@ -180,7 +182,8 @@ void score7_cpu_device::execute_run()
|
||||
m_ppc = m_pc;
|
||||
debugger_instruction_hook(m_pc);
|
||||
|
||||
check_irq();
|
||||
if (m_has_pending_interrupt)
|
||||
check_irq();
|
||||
|
||||
uint32_t op = fetch();
|
||||
|
||||
@ -225,6 +228,7 @@ void score7_cpu_device::execute_set_input(int inputnum, int state)
|
||||
if (inputnum > 0 && inputnum < 64)
|
||||
{
|
||||
m_pending_interrupt[inputnum] = true;
|
||||
m_has_pending_interrupt = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -330,6 +334,8 @@ void score7_cpu_device::check_irq()
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
m_has_pending_interrupt = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ private:
|
||||
memory_access<32, 2, 0, ENDIANNESS_LITTLE>::specific m_program;
|
||||
|
||||
// internal state
|
||||
int m_icount;
|
||||
int m_icount;
|
||||
uint32_t m_pc;
|
||||
uint32_t m_ppc;
|
||||
uint32_t m_op;
|
||||
@ -119,7 +119,8 @@ private:
|
||||
uint32_t m_cr[0x20];
|
||||
uint32_t m_sr[3];
|
||||
uint32_t m_ce[2];
|
||||
bool m_pending_interrupt[64];
|
||||
bool m_has_pending_interrupt;
|
||||
bool m_pending_interrupt[64];
|
||||
|
||||
// opcodes tables
|
||||
typedef void (score7_cpu_device::*op_handler)();
|
||||
|
Loading…
Reference in New Issue
Block a user