summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-06-20 19:04:37 +0000
committerGabe Black <gblack@eecs.umich.edu>2007-06-20 19:04:37 +0000
commit0a971cc0c9a6302afb6da5d561b7df24f443eca4 (patch)
tree4a56e8a6ee996bdf2381be4cbaf5f7c540d3af8e /src/cpu/base.cc
parenta68ddf685c739220d09fdc44000dd217d0707f8e (diff)
parent4a7bc06553577f25e8dc895fa20506c62455a4b6 (diff)
downloadgem5-0a971cc0c9a6302afb6da5d561b7df24f443eca4.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86 --HG-- extra : convert_revision : f2fac2b1a09e709021cd8382a9fbe805df2177ef
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 078ae1283..f86313da0 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -269,12 +269,10 @@ Tick
BaseCPU::nextCycle(Tick begin_tick)
{
Tick next_tick = begin_tick;
- next_tick -= (next_tick % clock);
+ if (next_tick % clock != 0)
+ next_tick = next_tick - (next_tick % clock) + clock;
next_tick += phase;
- while (next_tick < curTick)
- next_tick += clock;
-
assert(next_tick >= curTick);
return next_tick;
}