summaryrefslogtreecommitdiff
path: root/cpu/simple/cpu.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-03-09 15:10:55 -0500
committerKevin Lim <ktlim@umich.edu>2006-03-09 15:10:55 -0500
commite30bce8f8e4fdb3dbf4f8161f496c94c85d3d8cf (patch)
tree807b9c63a4bb6a1712acbe53419a3726dce3ada7 /cpu/simple/cpu.cc
parenta3aae21d031c93ab1b9a90d435d9590dad2482c4 (diff)
downloadgem5-e30bce8f8e4fdb3dbf4f8161f496c94c85d3d8cf.tar.xz
Use functions to access XC.
cpu/exec_context.hh: Include readNextNPC function. cpu/simple/cpu.cc: Use functions to set and access nextPC, nextNPC. --HG-- extra : convert_revision : 22622b9c110e1d99cc9106a2a27c479579d7e1ad
Diffstat (limited to 'cpu/simple/cpu.cc')
-rw-r--r--cpu/simple/cpu.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc
index f1a3ebd0b..c85154521 100644
--- a/cpu/simple/cpu.cc
+++ b/cpu/simple/cpu.cc
@@ -825,8 +825,8 @@ SimpleCPU::tick()
#else
// go to the next instruction
xc->regs.pc = xc->regs.npc;
- xc->regs.npc = xc->regs.nnpc;
- xc->regs.nnpc += sizeof(MachInst);
+ xc->setNextPC(xc->readNextNPC());
+ xc->setNextNPC(xc->readNextNPC() + sizeof(MachInst));
#endif
}