/*
* Copyright 2014 Google, Inc.
- * Copyright (c) 2010-2014 ARM Limited
+ * Copyright (c) 2010-2014, 2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
(!(pc[0].instAddr() & 0x3)));
}
+ // at this point store conditionals should either have
+ // been completed or predicated false
+ assert(!head_inst->isStoreConditional() ||
+ head_inst->isCompleted() ||
+ !head_inst->readPredicate());
+
// Updates misc. registers.
head_inst->updateMiscRegs();
/*
- * Copyright (c) 2010-2014 ARM Limited
+ * Copyright (c) 2010-2014, 2017 ARM Limited
* Copyright (c) 2013 Advanced Micro Devices, Inc.
* All rights reserved
*
assert(!cpu->switchedOut());
if (!inst->isSquashed()) {
if (!state->noWB) {
+ // Only loads and store conditionals perform the writeback
+ // after receving the response from the memory
+ assert(inst->isLoad() || inst->isStoreConditional());
if (!TheISA::HasUnalignedMemAcc || !state->isSplit ||
!state->isLoad) {
writeback(inst, pkt);
inst->seqNum);
WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this);
cpu->schedule(wb, curTick() + 1);
- if (cpu->checker) {
- // Make sure to set the LLSC data for verification
- // if checker is loaded
- inst->reqToVerify->setExtraData(0);
- inst->completeAcc(data_pkt);
- }
completeStore(storeWBIdx);
incrStIdx(storeWBIdx);
continue;
// Tell the checker we've completed this instruction. Some stores
// may get reported twice to the checker, but the checker can
// handle that case.
- if (cpu->checker) {
+
+ // Store conditionals cannot be sent to the checker yet, they have
+ // to update the misc registers first which should take place
+ // when they commit
+ if (cpu->checker && !storeQueue[store_idx].inst->isStoreConditional()) {
cpu->checker->verify(storeQueue[store_idx].inst);
}
}