if (serializeNext) {
inst->setSerializeBefore();
serializeNext = false;
- } else if (!inst->isSerializing()) {
+ } else if (!inst->isSerializing() &&
+ !inst->isIprAccess() &&
+ !inst->isStoreConditional()) {
return false;
}
- if (inst->isSerializeBefore() && !inst->isSerializeHandled()) {
+ if ((inst->isIprAccess() || inst->isSerializeBefore()) &&
+ !inst->isSerializeHandled()) {
DPRINTF(FE, "Serialize before instruction encountered.\n");
if (!inst->isTempSerializeBefore()) {
barrierInst = inst;
return true;
- } else if (inst->isSerializeAfter() && !inst->isSerializeHandled()) {
+ } else if ((inst->isStoreConditional() || inst->isSerializeAfter())
+ && !inst->isSerializeHandled()) {
DPRINTF(FE, "Serialize after instruction encountered.\n");
inst->setSerializeHandled();
DPRINTF(BE, "Marking source reg ready [sn:%lli] in IQ\n", dep_inst->seqNum);
if (dep_inst->readyToIssue() && dep_inst->isInROB() &&
- !dep_inst->isNonSpeculative() &&
- dep_inst->memDepReady() && !dep_inst->isMemBarrier() && !dep_inst->isWriteBarrier()) {
+ !dep_inst->isNonSpeculative() && !dep_inst->isStoreConditional() &&
+ dep_inst->memDepReady() && !dep_inst->isMemBarrier() &&
+ !dep_inst->isWriteBarrier()) {
DPRINTF(BE, "Adding instruction to exeList [sn:%lli]\n",
dep_inst->seqNum);
exeList.push(dep_inst);
}
memBarrier = inst;
inst->setCanCommit();
- } else if (inst->readyToIssue() && !inst->isNonSpeculative()) {
+ } else if (inst->readyToIssue() &&
+ !inst->isNonSpeculative() &&
+ !inst->isStoreConditional()) {
if (inst->isMemRef()) {
LSQ.insert(inst);
exeList.push(inst);
}
} else {
- if (inst->isNonSpeculative()) {
+ if (inst->isNonSpeculative() || inst->isStoreConditional()) {
inst->setCanCommit();
DPRINTF(BE, "Adding non speculative instruction\n");
}
// or store inst. Signal backwards that it should be executed.
if (!inst->isExecuted()) {
if (inst->isNonSpeculative() ||
+ inst->isStoreConditional() ||
inst->isMemBarrier() ||
inst->isWriteBarrier()) {
#if !FULL_SYSTEM
if (store_fault != NoFault) {
panic("Fault in a store instruction!");
storeFaultInst = store_inst;
- } else if (store_inst->isNonSpeculative()) {
- // Nonspeculative accesses (namely store conditionals)
- // need to set themselves as able to writeback if we
- // haven't had a fault by here.
+ } else if (store_inst->isStoreConditional()) {
+ // Store conditionals need to set themselves as able to
+ // writeback if we haven't had a fault by here.
(*sq_it).canWB = true;
++storesToWB;