diff options
Diffstat (limited to 'cpu/beta_cpu/alpha_dyn_inst.hh')
-rw-r--r-- | cpu/beta_cpu/alpha_dyn_inst.hh | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/cpu/beta_cpu/alpha_dyn_inst.hh b/cpu/beta_cpu/alpha_dyn_inst.hh index b2f0d703e..d34fa071c 100644 --- a/cpu/beta_cpu/alpha_dyn_inst.hh +++ b/cpu/beta_cpu/alpha_dyn_inst.hh @@ -47,11 +47,10 @@ class AlphaDynInst : public BaseDynInst<Impl> /** BaseDynInst constructor given a static inst pointer. */ AlphaDynInst(StaticInstPtr<AlphaISA> &_staticInst); - /** Executes the instruction. Why the hell did I put this here? */ + /** Executes the instruction.*/ Fault execute() { - this->fault = this->staticInst->execute(this, this->traceData); - return this->fault; + return this->fault = this->staticInst->execute(this, this->traceData); } public: @@ -105,47 +104,47 @@ class AlphaDynInst : public BaseDynInst<Impl> // storage (which is pretty hard to imagine they would have reason // to do). - uint64_t readIntReg(StaticInst<ISA> *si, int idx) + uint64_t readIntReg(const StaticInst<ISA> *si, int idx) { return this->cpu->readIntReg(_srcRegIdx[idx]); } - float readFloatRegSingle(StaticInst<ISA> *si, int idx) + float readFloatRegSingle(const StaticInst<ISA> *si, int idx) { return this->cpu->readFloatRegSingle(_srcRegIdx[idx]); } - double readFloatRegDouble(StaticInst<ISA> *si, int idx) + double readFloatRegDouble(const StaticInst<ISA> *si, int idx) { return this->cpu->readFloatRegDouble(_srcRegIdx[idx]); } - uint64_t readFloatRegInt(StaticInst<ISA> *si, int idx) + uint64_t readFloatRegInt(const StaticInst<ISA> *si, int idx) { return this->cpu->readFloatRegInt(_srcRegIdx[idx]); } /** @todo: Make results into arrays so they can handle multiple dest * registers. */ - void setIntReg(StaticInst<ISA> *si, int idx, uint64_t val) + void setIntReg(const StaticInst<ISA> *si, int idx, uint64_t val) { this->cpu->setIntReg(_destRegIdx[idx], val); this->instResult.integer = val; } - void setFloatRegSingle(StaticInst<ISA> *si, int idx, float val) + void setFloatRegSingle(const StaticInst<ISA> *si, int idx, float val) { this->cpu->setFloatRegSingle(_destRegIdx[idx], val); this->instResult.fp = val; } - void setFloatRegDouble(StaticInst<ISA> *si, int idx, double val) + void setFloatRegDouble(const StaticInst<ISA> *si, int idx, double val) { this->cpu->setFloatRegDouble(_destRegIdx[idx], val); this->instResult.dbl = val; } - void setFloatRegInt(StaticInst<ISA> *si, int idx, uint64_t val) + void setFloatRegInt(const StaticInst<ISA> *si, int idx, uint64_t val) { this->cpu->setFloatRegInt(_destRegIdx[idx], val); this->instResult.integer = val; |