if (fault == NoFault) {
fault = initiateMemRead(xc, traceData, EA, Mem, memAccessFlags);
- xc->setEA(EA);
}
return fault;
%(op_decl)s;
%(op_rd)s;
- EA = xc->getEA();
+ EA = pkt->req->getVaddr();
getMem(pkt, Mem, traceData);
RecordResult,
Predicate,
PredTaken,
- /** Whether or not the effective address calculation is completed.
- * @todo: Consider if this is necessary or not.
- */
- EACalcDone,
IsStrictlyOrdered,
ReqMade,
MemOpDone,
// Need a copy of main request pointer to verify on writes.
RequestPtr reqToVerify;
- private:
- /** Instruction effective address.
- * @todo: Consider if this is necessary or not.
- */
- Addr instEffAddr;
-
protected:
/** Flattened register index of the destination registers of this
* instruction.
ThreadContext *tcBase() { return thread->getTC(); }
public:
- /** Sets the effective address. */
- void setEA(Addr ea) { instEffAddr = ea; instFlags[EACalcDone] = true; }
-
- /** Returns the effective address. */
- Addr getEA() const { return instEffAddr; }
-
- /** Returns whether or not the eff. addr. calculation has been completed. */
- bool doneEACalc() { return instFlags[EACalcDone]; }
-
/** Returns whether or not the eff. addr. source registers are ready. */
bool eaSrcsReady();
void serialize(CheckpointOut &cp) const override;
void unserialize(CheckpointIn &cp) override;
- // These functions are only used in CPU models that split
- // effective address computation from the actual memory access.
- void setEA(Addr EA) override
- { panic("CheckerCPU::setEA() not implemented\n"); }
- Addr getEA() const override
- { panic("CheckerCPU::getEA() not implemented\n"); }
-
// The register accessor methods provide the index of the
// instruction's operand (e.g., 0 or 1), not the architectural
// register index, to simplify the implementation of register
* @{
* @name Memory Interface
*/
- /**
- * Record the effective address of the instruction.
- *
- * @note Only valid for memory ops.
- */
- virtual void setEA(Addr EA) = 0;
- /**
- * Get the effective address of the instruction.
- *
- * @note Only valid for memory ops.
- */
- virtual Addr getEA() const = 0;
-
/**
* Perform an atomic memory read operation. Must be overridden
* for exec contexts that support atomic memory mode. Not pure
* up */
RegId flatDestRegIdx[TheISA::MaxInstDestRegs];
- /** Effective address as set by ExecContext::setEA */
- Addr ea;
-
public:
MinorDynInst(InstId id_ = InstId(), Fault fault_ = NoFault) :
staticInst(NULL), id(id_), traceData(NULL),
fuIndex(0), inLSQ(false), inStoreBuffer(false),
canEarlyIssue(false),
instToWaitFor(0), extraCommitDelay(Cycles(0)),
- extraCommitDelayExpr(NULL), minimumCommitCycle(Cycles(0)),
- ea(0)
+ extraCommitDelayExpr(NULL), minimumCommitCycle(Cycles(0))
{ }
public:
thread.getDTBPtr()->demapPage(vaddr, asn);
}
- /* ALPHA/POWER: Effective address storage */
- void setEA(Addr ea) override
- {
- inst->ea = ea;
- }
-
BaseCPU *getCpuPtr() { return &cpu; }
- /* POWER: Effective address storage */
- Addr getEA() const override
- {
- return inst->ea;
- }
-
/* MIPS: other thread register reading/writing */
uint64_t
readRegOtherThread(const RegId& reg, ThreadID tid = InvalidThreadID)
}
- /**
- * Record the effective address of the instruction.
- *
- * @note Only valid for memory ops.
- */
- void setEA(Addr EA) override
- { panic("BaseSimpleCPU::setEA() not implemented\n"); }
-
- /**
- * Get the effective address of the instruction.
- *
- * @note Only valid for memory ops.
- */
- Addr getEA() const override
- { panic("BaseSimpleCPU::getEA() not implemented\n"); }
-
Fault readMem(Addr addr, uint8_t *data, unsigned int size,
Request::Flags flags) override
{