summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorVincentius Robby <acolyte@umich.edu>2007-06-20 14:54:17 -0400
committerVincentius Robby <acolyte@umich.edu>2007-06-20 14:54:17 -0400
commitd540dde5b4ed38c5aec846282082dd04fce24b78 (patch)
tree38d1ad4e76ddeacc556449f8e8d85d8fe1c13050 /src/cpu
parentf65e2710ecb725f9f44e0e9edd8389f39720cd64 (diff)
downloadgem5-d540dde5b4ed38c5aec846282082dd04fce24b78.tar.xz
Removed "adding instead of dividing" trick.
Caused slowdown in performance instead of speeding up. src/cpu/base.cc: Removed "adding instead of dividing" trick. src/mem/bus.cc: Fixed spelling in comments. Removed "adding instead of dividing" trick. --HG-- extra : convert_revision : 65a736f4f09a64e737dc7aeee53b117976330488
Diffstat (limited to 'src/cpu')
-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;
}