diff options
author | 2010-06-09 15:32:01 +0000 | |
---|---|---|
committer | 2010-06-09 15:32:01 +0000 | |
commit | ebdc4525f96f465a61acb76c728de48b3a89800c (patch) | |
tree | 93331b1f0dbf2646d6308550f774588a414b4197 /src/emu/diexec.c | |
parent | d4e1e8c26622305f4ad0d2c7a58a9f8e3262d370 (diff) |
Tweak to s2650 IRQ cycle handling to fix gcc codegen bug.
Added asserts to catch other unexpected situations.
Diffstat (limited to 'src/emu/diexec.c')
-rw-r--r-- | src/emu/diexec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emu/diexec.c b/src/emu/diexec.c index 02766c063b6..47fb9f0e826 100644 --- a/src/emu/diexec.c +++ b/src/emu/diexec.c @@ -476,6 +476,7 @@ attotime device_execute_interface::local_time() const attotime result = m_localtime; if (is_executing()) { + assert(m_cycles_running >= *m_icount); int cycles = m_cycles_running - *m_icount; result = attotime_add(result, m_device.clocks_to_attotime(cycles)); } @@ -491,7 +492,10 @@ attotime device_execute_interface::local_time() const UINT64 device_execute_interface::total_cycles() const { if (is_executing()) + { + assert(m_cycles_running >= *m_icount); return m_totalcycles + m_cycles_running - *m_icount; + } else return m_totalcycles; } |