summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/sh2
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-06-09 16:20:50 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-06-09 16:20:50 +0000
commiteba2c140607c146d368e48539bd11e87fdfbeed6 (patch)
treeac3fa335cf9f364420c435ee2eeaf44173dab0e7 /src/emu/cpu/sh2
parentebdc4525f96f465a61acb76c728de48b3a89800c (diff)
Change cpu execute function to just use the icount stuffed by
the scheduler, rather than manging an incoming cycle count. It was confusing to have multiple sources of cycle counts.
Diffstat (limited to 'src/emu/cpu/sh2')
-rw-r--r--src/emu/cpu/sh2/sh2.c9
-rw-r--r--src/emu/cpu/sh2/sh2drc.c4
2 files changed, 4 insertions, 9 deletions
diff --git a/src/emu/cpu/sh2/sh2.c b/src/emu/cpu/sh2/sh2.c
index 8e8ba0d5e3c..1bacc091a98 100644
--- a/src/emu/cpu/sh2/sh2.c
+++ b/src/emu/cpu/sh2/sh2.c
@@ -2188,10 +2188,11 @@ static CPU_RESET( sh1 )
/* Execute cycles - returns number of cycles actually run */
static CPU_EXECUTE( sh2 )
{
- sh2_icount = cycles;
-
if (sh2->cpu_off)
- return 0;
+ {
+ sh2->icount = 0;
+ return;
+ }
do
{
@@ -2238,8 +2239,6 @@ static CPU_EXECUTE( sh2 )
}
sh2_icount--;
} while( sh2_icount > 0 );
-
- return cycles - sh2_icount;
}
static CPU_INIT( sh2 )
diff --git a/src/emu/cpu/sh2/sh2drc.c b/src/emu/cpu/sh2/sh2drc.c
index 22473a91ec5..97e0e609b46 100644
--- a/src/emu/cpu/sh2/sh2drc.c
+++ b/src/emu/cpu/sh2/sh2drc.c
@@ -890,7 +890,6 @@ static CPU_EXECUTE( sh2 )
code_flush_cache(sh2);
/* execute */
- sh2->icount = cycles;
do
{
/* run as much as we can */
@@ -910,9 +909,6 @@ static CPU_EXECUTE( sh2 )
code_flush_cache(sh2);
}
} while (execute_result != EXECUTE_OUT_OF_CYCLES);
-
- /* return the number of cycles executed */
- return cycles - sh2->icount;
}
/*-------------------------------------------------