inorder: make marking of dest. regs an explicit request
formerly, this was implicit when you accessed the execution unit or the use-def unit but it's better that this just be something that a user can specify.
This commit is contained in:
parent
946b0ed4f4
commit
4f34bc8b7b
4 changed files with 10 additions and 19 deletions
|
@ -419,6 +419,7 @@ InOrderCPU::createBackEndSked(DynInstPtr inst)
|
|||
}
|
||||
|
||||
// EXECUTE
|
||||
X.needs(RegManager, UseDefUnit::MarkDestRegs);
|
||||
for (int idx=0; idx < inst->numSrcRegs(); idx++) {
|
||||
if (!idx || !inst->isStore()) {
|
||||
X.needs(RegManager, UseDefUnit::ReadSrcReg, idx);
|
||||
|
|
|
@ -99,18 +99,6 @@ ExecutionUnit::execute(int slot_num)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
//@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:
|
||||
|
|
|
@ -172,12 +172,6 @@ UseDefUnit::execute(int slot_idx)
|
|||
*nonSpecSeqNum[tid] = seq_num;
|
||||
}
|
||||
|
||||
//@todo: may want to make a separate schedule entry for setting
|
||||
// destination register dependencies
|
||||
if (!inst->isRegDepEntry()) {
|
||||
regDepMap[tid]->insert(inst);
|
||||
}
|
||||
|
||||
switch (ud_req->cmd)
|
||||
{
|
||||
case ReadSrcReg:
|
||||
|
@ -446,6 +440,13 @@ UseDefUnit::execute(int slot_idx)
|
|||
}
|
||||
break;
|
||||
|
||||
case MarkDestRegs:
|
||||
{
|
||||
regDepMap[tid]->insert(inst);
|
||||
ud_req->done();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
fatal("Unrecognized command to %s", resName);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ class UseDefUnit : public Resource {
|
|||
|
||||
enum Command {
|
||||
ReadSrcReg,
|
||||
WriteDestReg
|
||||
WriteDestReg,
|
||||
MarkDestRegs
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in a new issue