diff options
Diffstat (limited to 'src/cpu/base_dyn_inst.hh')
-rw-r--r-- | src/cpu/base_dyn_inst.hh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/src/cpu/base_dyn_inst.hh b/src/cpu/base_dyn_inst.hh index e69e00d6c..263a24521 100644 --- a/src/cpu/base_dyn_inst.hh +++ b/src/cpu/base_dyn_inst.hh @@ -73,8 +73,10 @@ class BaseDynInst : public FastAlloc, public RefCounted typedef TheISA::ExtMachInst ExtMachInst; // Logical register index type. typedef TheISA::RegIndex RegIndex; - // Integer register index type. + // Integer register type. typedef TheISA::IntReg IntReg; + // Floating point register type. + typedef TheISA::FloatReg FloatReg; // The DynInstPtr type. typedef typename Impl::DynInstPtr DynInstPtr; @@ -442,17 +444,27 @@ class BaseDynInst : public FastAlloc, public RefCounted instResult.integer = val; } - void setFloatRegSingle(const StaticInst *si, int idx, float val) + void setFloatReg(const StaticInst *si, int idx, FloatReg val, int width) + { + if (width == 32) + instResult.fp = val; + else if (width == 64) + instResult.dbl = val; + else + panic("Unsupported width!"); + } + + void setFloatReg(const StaticInst *si, int idx, FloatReg val) { instResult.fp = val; } - void setFloatRegDouble(const StaticInst *si, int idx, double val) + void setFloatRegBits(const StaticInst *si, int idx, uint64_t val, int width) { - instResult.dbl = val; + instResult.integer = val; } - void setFloatRegInt(const StaticInst *si, int idx, uint64_t val) + void setFloatRegBits(const StaticInst *si, int idx, uint64_t val) { instResult.integer = val; } @@ -657,14 +669,14 @@ BaseDynInst<Impl>::read(Addr addr, T &data, unsigned flags) return TheISA::genAlignmentFault(); } - fault = cpu->translateDataReadReq(req); + fault = cpu->translateDataReadReq(req, thread); if (fault == NoFault) { effAddr = req->getVaddr(); physEffAddr = req->getPaddr(); memReqFlags = req->getFlags(); -#if FULL_SYSTEM +#if 0 if (cpu->system->memctrl->badaddr(physEffAddr)) { fault = TheISA::genMachineCheckFault(); data = (T)-1; @@ -712,13 +724,13 @@ BaseDynInst<Impl>::write(T data, Addr addr, unsigned flags, uint64_t *res) return TheISA::genAlignmentFault(); } - fault = cpu->translateDataWriteReq(req); + fault = cpu->translateDataWriteReq(req, thread); if (fault == NoFault) { effAddr = req->getVaddr(); physEffAddr = req->getPaddr(); memReqFlags = req->getFlags(); -#if FULL_SYSTEM +#if 0 if (cpu->system->memctrl->badaddr(physEffAddr)) { fault = TheISA::genMachineCheckFault(); } else { |