THis allows the CPU to handle predicated-false instructions accordingly.
This particular patch makes loads that are predicated-false to be sent
straight to the commit stage directly, not waiting for return of the data
that was never requested since it was predicated-false.
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
if (fault == NoFault) {
fault = xc->read(EA, (uint%(mem_acc_size)d_t &)Mem, memAccessFlags);
}
- } else if (fault == NoFault && machInst.itstateMask != 0) {
- xc->setMiscReg(MISCREG_ITSTATE, machInst.newItstate);
+ } else {
+ xc->setPredicate(false);
+ if (fault == NoFault && machInst.itstateMask != 0) {
+ xc->setMiscReg(MISCREG_ITSTATE, machInst.newItstate);
+ }
}
return fault;
{
%(op_wb)s;
}
+ } else {
+ xc->setPredicate(false);
}
if (fault == NoFault && machInst.itstateMask != 0) {
/** Micro PC of this instruction. */
Addr microPC;
+ /** Did this instruction execute, or is it predicated false */
+ bool predicate;
+
protected:
/** Next non-speculative PC. It is not filled in at fetch, but rather
* once the target of the branch is truly known (either decode or
nextMicroPC = val;
}
+ bool readPredicate()
+ {
+ return predicate;
+ }
+
+ void setPredicate(bool val)
+ {
+ predicate = val;
+ }
+
/** Sets the ASID. */
void setASID(short addr_space_id) { asid = addr_space_id; }
eaCalcDone = false;
memOpDone = false;
+ predicate = true;
lqIdx = -1;
sqIdx = -1;
/*
+ * Copyright (c) 2010 ARM Limited
+ * All rights reserved
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 2004-2005 The Regents of The University of Michigan
* All rights reserved.
*
load_fault = inst->initiateAcc();
- // If the instruction faulted, then we need to send it along to commit
- // without the instruction completing.
- if (load_fault != NoFault) {
+ // If the instruction faulted or predicated false, then we need to send it
+ // along to commit without the instruction completing.
+ if (load_fault != NoFault || inst->readPredicate() == false) {
// Send this instruction to commit, also make sure iew stage
// realizes there is activity.
// Mark it as executed unless it is an uncached load that
uint64_t readNextPC() { return thread->readNextPC(); }
uint64_t readNextMicroPC() { return thread->readNextMicroPC(); }
uint64_t readNextNPC() { return thread->readNextNPC(); }
+ bool readPredicate() { return thread->readPredicate(); }
void setPC(uint64_t val) { thread->setPC(val); }
void setMicroPC(uint64_t val) { thread->setMicroPC(val); }
void setNextPC(uint64_t val) { thread->setNextPC(val); }
void setNextMicroPC(uint64_t val) { thread->setNextMicroPC(val); }
void setNextNPC(uint64_t val) { thread->setNextNPC(val); }
+ void setPredicate(bool val)
+ { return thread->setPredicate(val); }
MiscReg readMiscRegNoEffect(int misc_reg)
{
*/
Addr nextNPC;
+ /** Did this instruction execute or is it predicated false */
+ bool predicate;
+
public:
// pointer to CPU associated with this SimpleThread
BaseCPU *cpu;
#endif
}
+ bool readPredicate()
+ {
+ return predicate;
+ }
+
+ void setPredicate(bool val)
+ {
+ predicate = val;
+ }
+
MiscReg
readMiscRegNoEffect(int misc_reg, ThreadID tid = 0)
{
void setNextMicroPC(uint64_t val) { actualTC->setNextMicroPC(val); }
+ bool readPredicate() { return actualTC->readPredicate(); }
+
+ void setPredicate(bool val)
+ { actualTC->setPredicate(val); }
+
MiscReg readMiscRegNoEffect(int misc_reg)
{ return actualTC->readMiscRegNoEffect(misc_reg); }