summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources/execution_unit.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:34 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:34 -0400
commit3c417ea23a7b87d3a01a1820c1f00645bb76eeb7 (patch)
tree93f3d5aa762e9d0a0c3d592b671ffec0c4e7ed9e /src/cpu/inorder/resources/execution_unit.cc
parentbd67ee9852b885108670febb617b72311fd81e0c (diff)
downloadgem5-3c417ea23a7b87d3a01a1820c1f00645bb76eeb7.tar.xz
inorder: find register dependencies "lazily"
Architectures like SPARC need to read the window pointer in order to figure out it's register dependence. However, this may not get updated until after an instruction gets executed, so now we lazily detect the register dependence in the EXE stage (execution unit or use_def). This makes sure we get the mapping after the most current change.
Diffstat (limited to 'src/cpu/inorder/resources/execution_unit.cc')
-rw-r--r--src/cpu/inorder/resources/execution_unit.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cpu/inorder/resources/execution_unit.cc b/src/cpu/inorder/resources/execution_unit.cc
index 2e52c5ac5..8ea320b6b 100644
--- a/src/cpu/inorder/resources/execution_unit.cc
+++ b/src/cpu/inorder/resources/execution_unit.cc
@@ -100,6 +100,17 @@ ExecutionUnit::execute(int slot_num)
}
+ //@todo: may want to make a separate schedule entry for setting
+ // destination register dependencies
+ //@note: typically want to set the output dependencies right
+ // before we do any reading or writing of registers
+ // (in RegFile Manager(use_def.cc)) but there are some
+ // instructions that dont have src regs, so just in case
+ // take care of reg. dep. map stuff here
+ if (!inst->isRegDepEntry()) {
+ regDepMap[tid]->insert(inst);
+ }
+
switch (exec_req->cmd)
{
case ExecuteInst:
@@ -139,11 +150,9 @@ ExecutionUnit::execute(int slot_num)
lastControlTick = curTick();
// Evaluate Branch
- DPRINTF(IEW, "Pre-Execute %s PC:%s nextPC:%s predPC:%s\n", inst->instName(), inst->pcState(), inst->readPredTarg());
fault = inst->execute();
executions++;
inst->setExecuted();
- DPRINTF(IEW, "Post-Execute %s PC:%s nextPC:%s predPC:%s\n", inst->instName(), inst->pcState(), inst->readPredTarg());
if (fault == NoFault) {
// If branch is mispredicted, then signal squash