void setIntReg(const StaticInst *si, int idx, uint64_t val)
{
this->cpu->setIntReg(_destRegIdx[idx], val);
- this->instResult.integer = val;
+ BaseDynInst<Impl>::setIntReg(si, idx, val);
}
void setFloatRegSingle(const StaticInst *si, int idx, float val)
{
this->cpu->setFloatRegSingle(_destRegIdx[idx], val);
- this->instResult.fp = val;
+ BaseDynInst<Impl>::setFloatRegSingle(si, idx, val);
}
void setFloatRegDouble(const StaticInst *si, int idx, double val)
{
this->cpu->setFloatRegDouble(_destRegIdx[idx], val);
- this->instResult.dbl = val;
+ BaseDynInst<Impl>::setFloatRegDouble(si, idx, val);
}
void setFloatRegInt(const StaticInst *si, int idx, uint64_t val)
{
this->cpu->setFloatRegInt(_destRegIdx[idx], val);
- this->instResult.integer = val;
+ BaseDynInst<Impl>::setFloatRegInt(si, idx, val);
}
/** Returns the physical register index of the i'th destination
panic("Barrier instructions are not handled yet.\n");
}
+ if (!head_inst->isStore()) {
+ head_inst->setCompleted();
+ }
+
// Check if the instruction caused a fault. If so, trap.
Fault inst_fault = head_inst->getFault();
DPRINTF(Commit, "Inst [sn:%lli] PC %#x has a fault\n",
head_inst->seqNum, head_inst->readPC());
+ if (iewStage->hasStoresToWB()) {
+ DPRINTF(Commit, "Stores outstanding, fault must wait.\n");
+ return false;
+ }
+
assert(!thread[tid]->inSyscall);
thread[tid]->inSyscall = true;
req->paddr, *(req->data),
storeQueue[storeWBIdx].inst->seqNum);
-// if (fault != NoFault) {
- //What should we do if there is a fault???
- //for now panic
-// panic("Page Table Fault!!!!!\n");
-// }
switch(storeQueue[storeWBIdx].size) {
case 1:
cpu->write(req, (uint8_t &)storeQueue[storeWBIdx].data);
default:
panic("Unexpected store size!\n");
}
+ if (!(req->flags & LOCKED)) {
+ storeQueue[storeWBIdx].inst->setCompleted();
+ }
if (dcacheInterface) {
+ assert(!req->completionEvent);
+ StoreCompletionEvent *store_event = new
+ StoreCompletionEvent(storeWBIdx, NULL, this);
+ req->completionEvent = store_event;
+
MemAccessResult result = dcacheInterface->access(req);
if (isStalled() &&
if (result != MA_HIT && dcacheInterface->doEvents()) {
typename IEW::LdWritebackEvent *wb = NULL;
if (req->flags & LOCKED) {
- // Stx_C does not generate a system port transaction.
-/*
- if (cpu->lockFlag && cpu->lockAddr == req->paddr) {
- req->result=1;
- } else {
- req->result = 0;
- }
-*/
- wb = new typename IEW::LdWritebackEvent(storeQueue[storeWBIdx].inst,
- iewStage);
+ // Stx_C should not generate a system port transaction,
+ // but that might be hard to accomplish.
+ wb = new typename
+ IEW::LdWritebackEvent(storeQueue[storeWBIdx].inst,
+ iewStage);
+ store_event->wbEvent = wb;
}
DPRINTF(LSQUnit,"D-Cache Write Miss!\n");
DPRINTF(Activity, "Active st accessing mem miss [sn:%lli]\n",
storeQueue[storeWBIdx].inst->seqNum);
- // Will stores need their own kind of writeback events?
- // Do stores even need writeback events?
- assert(!req->completionEvent);
- req->completionEvent = new
- StoreCompletionEvent(storeWBIdx, wb, this);
-
lastDcacheStall = curTick;
// _status = DcacheMissStall;
typename IEW::LdWritebackEvent *wb =
new typename IEW::LdWritebackEvent(storeQueue[storeWBIdx].inst,
iewStage);
- wb->schedule(curTick);
+ store_event->wbEvent = wb;
}
-
- completeStore(storeWBIdx);
}
incrStIdx(storeWBIdx);