diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:33 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:33 -0400 |
commit | 19e3eb29154ad17664bfe239423f6ba64c77cf05 (patch) | |
tree | 09a44df5a2e149eee37c2985278abf747ce64d58 /src/cpu/inorder/reg_dep_map.cc | |
parent | b2e5152e164d3d470e2887c9c4d0b17b0c3946cc (diff) | |
download | gem5-19e3eb29154ad17664bfe239423f6ba64c77cf05.tar.xz |
inorder: use flattenIdx for reg indexing
- also use "threadId()" instead of readTid() everywhere
- this will help support more complex ISA indexing
Diffstat (limited to 'src/cpu/inorder/reg_dep_map.cc')
-rw-r--r-- | src/cpu/inorder/reg_dep_map.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cpu/inorder/reg_dep_map.cc b/src/cpu/inorder/reg_dep_map.cc index cf66f42c2..9f2a8a02a 100644 --- a/src/cpu/inorder/reg_dep_map.cc +++ b/src/cpu/inorder/reg_dep_map.cc @@ -64,6 +64,7 @@ void RegDepMap::setCPU(InOrderCPU *_cpu) { cpu = _cpu; + } void @@ -97,10 +98,12 @@ RegDepMap::insert(DynInstPtr inst) void RegDepMap::insert(unsigned idx, DynInstPtr inst) { - DPRINTF(RegDepMap, "Inserting [sn:%i] onto dep. list for reg. idx %i.\n", - inst->seqNum, idx); + TheISA::RegIndex flat_idx = cpu->flattenRegIdx(idx, inst->threadNumber); + + DPRINTF(RegDepMap, "Inserting [sn:%i] onto dep. list for reg. idx %i (%i).\n", + inst->seqNum, idx, flat_idx); - regMap[idx].push_back(inst); + regMap[flat_idx].push_back(inst); inst->setRegDepEntry(); } @@ -171,7 +174,7 @@ RegDepMap::canRead(unsigned idx, DynInstPtr inst) } ThePipeline::DynInstPtr -RegDepMap::canForward(unsigned reg_idx, DynInstPtr inst) +RegDepMap::canForward(unsigned reg_idx, DynInstPtr inst, unsigned clean_idx) { std::list<DynInstPtr>::iterator list_it = regMap[reg_idx].begin(); std::list<DynInstPtr>::iterator list_end = regMap[reg_idx].end(); @@ -184,9 +187,12 @@ RegDepMap::canForward(unsigned reg_idx, DynInstPtr inst) forward_inst = (*list_it); list_it++; } + DPRINTF(RegDepMap, "[sn:%i] Found potential forwarding value for reg %i (%i)" + " w/ [sn:%i]\n", + inst->seqNum, reg_idx, clean_idx, inst->seqNum); if (forward_inst) { - int dest_reg_idx = forward_inst->getDestIdxNum(reg_idx); + int dest_reg_idx = forward_inst->getDestIdxNum(clean_idx); assert(dest_reg_idx != -1); if (forward_inst->isExecuted() && |