void LDSTBuffer::getStoreEntry(DInst *dinst) { I( dinst->getInst()->isStore() ); #ifdef LDSTBUFFER_IGNORE_DEPS return; #endif EntryType::iterator sit = stores.find(calcWord(dinst)); if (sit != stores.end()) { DInst *pdinst = sit->second; I(pdinst->getInst()->isStore()); if (!pdinst->hasPending() && dinst->getContextId() == pdinst->getContextId()) pdinst->setDeadStore(); } stores[calcWord(dinst)] = dinst; }
void LDSTBuffer::getLoadEntry(DInst *dinst) { I(dinst->getInst()->isLoad()); #ifdef LDSTBUFFER_IGNORE_DEPS return; #endif // LOAD EntryType::iterator sit = stores.find(calcWord(dinst)); if (sit == stores.end()) return; DInst *pdinst = sit->second; I(pdinst->getInst()->isStore()); #if defined(TASKSCALAR) && !defined(TS_CAVA) if (dinst->getVersionRef() != pdinst->getVersionRef()) return; #else if (dinst->getContextId() != pdinst->getContextId()) { // FIXME2: In a context switch the same processor may have two different // PIDs // Different processor or window. Queue the instruction even if executed dinst->setDepsAtRetire(); I(pdinst->getInst()->getAddr() != dinst->getInst()->getAddr()); pdinst->addFakeSrc(dinst); GLOG(DEBUG2, "FORWARD pc=0x%x [addr=0x%x] (%p)-> pc=0x%x [addr=0x%x] (%p)" ,(int)pdinst->getInst()->getAddr() , (int)pdinst->getVaddr(), pdinst ,(int)dinst->getInst()->getAddr() , (int)dinst->getVaddr(), dinst); return; } #endif #ifndef LDSTQ_FWD dinst->setLoadForwarded(); #endif if (!pdinst->isExecuted()) { I(pdinst->getInst()->getAddr() != dinst->getInst()->getAddr()); pdinst->addFakeSrc(dinst); } }