class X86StaticInst : public StaticInst
{
protected:
+ using ExtMachInst = X86ISA::ExtMachInst;
+
// Constructor.
X86StaticInst(const char *mnem,
ExtMachInst _machInst, OpClass __opClass)
// Typedef for the CPU.
typedef typename Impl::CPUType ImplCPU;
typedef typename ImplCPU::ImplState ImplState;
- using VecRegContainer = TheISA::VecRegContainer;
using LSQRequestPtr = typename Impl::CPUPol::LSQ::LSQRequest*;
using LQIterator = typename Impl::CPUPol::LSQUnit::LQIterator;
/** Record a vector register being set to a value */
void
setVecRegOperand(const StaticInst *si, int idx,
- const VecRegContainer &val) override
+ const TheISA::VecRegContainer &val) override
{
setVecResult(val);
}
/** Record a vector register being set to a value */
void
setVecElemOperand(const StaticInst *si, int idx,
- const VecElem val) override
+ const TheISA::VecElem val) override
{
setVecElemResult(val);
}
/** Record a vector register being set to a value */
void
setVecPredRegOperand(const StaticInst *si, int idx,
- const VecPredRegContainer &val) override
+ const TheISA::VecPredRegContainer &val) override
{
setVecPredResult(val);
}
class CheckerCPU : public BaseCPU, public ExecContext
{
protected:
- typedef TheISA::MachInst MachInst;
- using VecRegContainer = TheISA::VecRegContainer;
-
/** id attached to all issued requests */
RequestorID requestorId;
+
public:
void init() override;
/**
* Read source vector register operand.
*/
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecRegOperand(const StaticInst *si, int idx) const override
{
const RegId& reg = si->srcRegIdx(idx);
/**
* Read destination vector register operand for modification.
*/
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecRegOperand(const StaticInst *si, int idx) override
{
const RegId& reg = si->destRegIdx(idx);
}
/** @} */
- VecElem
+ TheISA::VecElem
readVecElemOperand(const StaticInst *si, int idx) const override
{
const RegId& reg = si->srcRegIdx(idx);
return thread->readVecElem(reg);
}
- const VecPredRegContainer&
+ const TheISA::VecPredRegContainer&
readVecPredRegOperand(const StaticInst *si, int idx) const override
{
const RegId& reg = si->srcRegIdx(idx);
return thread->readVecPredReg(reg);
}
- VecPredRegContainer&
+ TheISA::VecPredRegContainer&
getWritableVecPredRegOperand(const StaticInst *si, int idx) override
{
const RegId& reg = si->destRegIdx(idx);
void
setVecRegOperand(const StaticInst *si, int idx,
- const VecRegContainer& val) override
+ const TheISA::VecRegContainer& val) override
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isVecReg());
void
setVecElemOperand(const StaticInst *si, int idx,
- const VecElem val) override
+ const TheISA::VecElem val) override
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isVecElem());
}
void setVecPredRegOperand(const StaticInst *si, int idx,
- const VecPredRegContainer& val) override
+ const TheISA::VecPredRegContainer& val) override
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isVecPredReg());
Addr fetch_PC = thread->instAddr();
fetch_PC = (fetch_PC & PCMask) + fetchOffset;
- MachInst machInst;
+ TheISA::MachInst machInst;
// If not in the middle of a macro instruction
if (!curMacroStaticInst) {
// set up memory request for instruction fetch
auto mem_req = std::make_shared<Request>(
- fetch_PC, sizeof(MachInst), 0, requestorId, fetch_PC,
- thread->contextId());
+ fetch_PC, sizeof(TheISA::MachInst), 0, requestorId,
+ fetch_PC, thread->contextId());
- mem_req->setVirt(fetch_PC, sizeof(MachInst),
+ mem_req->setVirt(fetch_PC, sizeof(TheISA::MachInst),
Request::INST_FETCH, requestorId,
thread->instAddr());
return actualTC->readFloatReg(reg_idx);
}
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecReg (const RegId ®) const override
{
return actualTC->readVecReg(reg);
/**
* Read vector register for modification, hierarchical indexing.
*/
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecReg (const RegId ®) override
{
return actualTC->getWritableVecReg(reg);
}
/** @} */
- const VecElem &
+ const TheISA::VecElem &
readVecElem(const RegId& reg) const override
{
return actualTC->readVecElem(reg);
}
- const VecPredRegContainer &
+ const TheISA::VecPredRegContainer &
readVecPredReg(const RegId& reg) const override
{
return actualTC->readVecPredReg(reg);
}
- VecPredRegContainer &
+ TheISA::VecPredRegContainer &
getWritableVecPredReg(const RegId& reg) override
{
return actualTC->getWritableVecPredReg(reg);
}
void
- setVecReg(const RegId& reg, const VecRegContainer& val) override
+ setVecReg(const RegId& reg, const TheISA::VecRegContainer& val) override
{
actualTC->setVecReg(reg, val);
checkerTC->setVecReg(reg, val);
}
void
- setVecElem(const RegId& reg, const VecElem& val) override
+ setVecElem(const RegId& reg, const TheISA::VecElem& val) override
{
actualTC->setVecElem(reg, val);
checkerTC->setVecElem(reg, val);
}
void
- setVecPredReg(const RegId& reg, const VecPredRegContainer& val) override
+ setVecPredReg(const RegId& reg,
+ const TheISA::VecPredRegContainer& val) override
{
actualTC->setVecPredReg(reg, val);
checkerTC->setVecPredReg(reg, val);
actualTC->setFloatRegFlat(idx, val);
}
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecRegFlat(RegIndex idx) const override
{
return actualTC->readVecRegFlat(idx);
/**
* Read vector register for modification, flat indexing.
*/
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecRegFlat(RegIndex idx) override
{
return actualTC->getWritableVecRegFlat(idx);
}
void
- setVecRegFlat(RegIndex idx, const VecRegContainer& val) override
+ setVecRegFlat(RegIndex idx, const TheISA::VecRegContainer& val) override
{
actualTC->setVecRegFlat(idx, val);
}
- const VecElem &
+ const TheISA::VecElem &
readVecElemFlat(RegIndex idx, const ElemIndex& elem_idx) const override
{
return actualTC->readVecElemFlat(idx, elem_idx);
}
void
- setVecElemFlat(RegIndex idx,
- const ElemIndex& elem_idx, const VecElem& val) override
+ setVecElemFlat(RegIndex idx, const ElemIndex& elem_idx,
+ const TheISA::VecElem& val) override
{
actualTC->setVecElemFlat(idx, elem_idx, val);
}
- const VecPredRegContainer &
+ const TheISA::VecPredRegContainer &
readVecPredRegFlat(RegIndex idx) const override
{
return actualTC->readVecPredRegFlat(idx);
}
- VecPredRegContainer &
+ TheISA::VecPredRegContainer &
getWritableVecPredRegFlat(RegIndex idx) override
{
return actualTC->getWritableVecPredRegFlat(idx);
}
void
- setVecPredRegFlat(RegIndex idx, const VecPredRegContainer& val) override
+ setVecPredRegFlat(RegIndex idx,
+ const TheISA::VecPredRegContainer& val) override
{
actualTC->setVecPredRegFlat(idx, val);
}
* implementation doesn't copy the pointer into any long-term storage
* (which is pretty hard to imagine they would have reason to do).
*/
-class ExecContext {
- public:
- typedef TheISA::PCState PCState;
-
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
-
+class ExecContext
+{
public:
/**
* @{
/** Vector Register Interfaces. */
/** @{ */
/** Reads source vector register operand. */
- virtual const VecRegContainer&
+ virtual const TheISA::VecRegContainer&
readVecRegOperand(const StaticInst *si, int idx) const = 0;
/** Gets destination vector register operand for modification. */
- virtual VecRegContainer&
+ virtual TheISA::VecRegContainer&
getWritableVecRegOperand(const StaticInst *si, int idx) = 0;
/** Sets a destination vector register operand to a value. */
virtual void
setVecRegOperand(const StaticInst *si, int idx,
- const VecRegContainer& val) = 0;
+ const TheISA::VecRegContainer& val) = 0;
/** @} */
/** Vector Register Lane Interfaces. */
/** Vector Elem Interfaces. */
/** @{ */
/** Reads an element of a vector register. */
- virtual VecElem readVecElemOperand(const StaticInst *si,
- int idx) const = 0;
+ virtual TheISA::VecElem readVecElemOperand(
+ const StaticInst *si, int idx) const = 0;
/** Sets a vector register to a value. */
- virtual void setVecElemOperand(const StaticInst *si, int idx,
- const VecElem val) = 0;
+ virtual void setVecElemOperand(
+ const StaticInst *si, int idx, const TheISA::VecElem val) = 0;
/** @} */
/** Predicate registers interface. */
/** @{ */
/** Reads source predicate register operand. */
- virtual const VecPredRegContainer&
- readVecPredRegOperand(const StaticInst *si, int idx) const = 0;
+ virtual const TheISA::VecPredRegContainer& readVecPredRegOperand(
+ const StaticInst *si, int idx) const = 0;
/** Gets destination predicate register operand for modification. */
- virtual VecPredRegContainer&
- getWritableVecPredRegOperand(const StaticInst *si, int idx) = 0;
+ virtual TheISA::VecPredRegContainer& getWritableVecPredRegOperand(
+ const StaticInst *si, int idx) = 0;
/** Sets a destination predicate register operand to a value. */
- virtual void
- setVecPredRegOperand(const StaticInst *si, int idx,
- const VecPredRegContainer& val) = 0;
+ virtual void setVecPredRegOperand(
+ const StaticInst *si, int idx,
+ const TheISA::VecPredRegContainer& val) = 0;
/** @} */
/**
* @{
* @name PC Control
*/
- virtual PCState pcState() const = 0;
- virtual void pcState(const PCState &val) = 0;
+ virtual TheISA::PCState pcState() const = 0;
+ virtual void pcState(const TheISA::PCState &val) = 0;
/** @} */
/**
#include "arch/generic/types.hh"
#include "arch/generic/vec_reg.hh"
-class InstResult {
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
+class InstResult
+{
public:
union MultiResult {
uint64_t integer;
double dbl;
- VecRegContainer vector;
- VecElem vecElem;
- VecPredRegContainer pred;
+ TheISA::VecRegContainer vector;
+ TheISA::VecElem vecElem;
+ TheISA::VecPredRegContainer pred;
MultiResult() {}
};
}
}
/** Vector result. */
- explicit InstResult(const VecRegContainer& v, const ResultType& t)
+ explicit InstResult(const TheISA::VecRegContainer& v, const ResultType& t)
: type(t) { result.vector = v; }
/** Predicate result. */
- explicit InstResult(const VecPredRegContainer& v, const ResultType& t)
+ explicit InstResult(const TheISA::VecPredRegContainer& v,
+ const ResultType& t)
: type(t) { result.pred = v; }
InstResult& operator=(const InstResult& that) {
{
return result.integer;
}
- const VecRegContainer&
+ const TheISA::VecRegContainer&
asVector() const
{
panic_if(!isVector(), "Converting scalar (or invalid) to vector!!");
return result.vector;
}
- const VecElem&
+ const TheISA::VecElem&
asVectorElem() const
{
panic_if(!isVecElem(), "Converting scalar (or invalid) to vector!!");
return result.vecElem;
}
- const VecPredRegContainer&
+ const TheISA::VecPredRegContainer&
asPred() const
{
panic_if(!isPred(), "Converting scalar (or invalid) to predicate!!");
}
template <class Impl>
-auto
+const TheISA::VecRegContainer&
FullO3CPU<Impl>::readVecReg(PhysRegIdPtr phys_reg) const
- -> const VecRegContainer&
{
cpuStats.vecRegfileReads++;
return regFile.readVecReg(phys_reg);
}
template <class Impl>
-auto
+TheISA::VecRegContainer&
FullO3CPU<Impl>::getWritableVecReg(PhysRegIdPtr phys_reg)
- -> VecRegContainer&
{
cpuStats.vecRegfileWrites++;
return regFile.getWritableVecReg(phys_reg);
}
template <class Impl>
-auto
-FullO3CPU<Impl>::readVecElem(PhysRegIdPtr phys_reg) const -> const VecElem&
+const TheISA::VecElem&
+FullO3CPU<Impl>::readVecElem(PhysRegIdPtr phys_reg) const
{
cpuStats.vecRegfileReads++;
return regFile.readVecElem(phys_reg);
}
template <class Impl>
-auto
+const TheISA::VecPredRegContainer&
FullO3CPU<Impl>::readVecPredReg(PhysRegIdPtr phys_reg) const
- -> const VecPredRegContainer&
{
cpuStats.vecPredRegfileReads++;
return regFile.readVecPredReg(phys_reg);
}
template <class Impl>
-auto
+TheISA::VecPredRegContainer&
FullO3CPU<Impl>::getWritableVecPredReg(PhysRegIdPtr phys_reg)
- -> VecPredRegContainer&
{
cpuStats.vecPredRegfileWrites++;
return regFile.getWritableVecPredReg(phys_reg);
template <class Impl>
void
-FullO3CPU<Impl>::setVecReg(PhysRegIdPtr phys_reg, const VecRegContainer& val)
+FullO3CPU<Impl>::setVecReg(PhysRegIdPtr phys_reg,
+ const TheISA::VecRegContainer& val)
{
cpuStats.vecRegfileWrites++;
regFile.setVecReg(phys_reg, val);
template <class Impl>
void
-FullO3CPU<Impl>::setVecElem(PhysRegIdPtr phys_reg, const VecElem& val)
+FullO3CPU<Impl>::setVecElem(PhysRegIdPtr phys_reg, const TheISA::VecElem& val)
{
cpuStats.vecRegfileWrites++;
regFile.setVecElem(phys_reg, val);
template <class Impl>
void
FullO3CPU<Impl>::setVecPredReg(PhysRegIdPtr phys_reg,
- const VecPredRegContainer& val)
+ const TheISA::VecPredRegContainer& val)
{
cpuStats.vecPredRegfileWrites++;
regFile.setVecPredReg(phys_reg, val);
}
template <class Impl>
-auto
+const TheISA::VecRegContainer&
FullO3CPU<Impl>::readArchVecReg(int reg_idx, ThreadID tid) const
- -> const VecRegContainer&
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecRegClass, reg_idx));
}
template <class Impl>
-auto
+TheISA::VecRegContainer&
FullO3CPU<Impl>::getWritableArchVecReg(int reg_idx, ThreadID tid)
- -> VecRegContainer&
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecRegClass, reg_idx));
}
template <class Impl>
-auto
-FullO3CPU<Impl>::readArchVecElem(const RegIndex& reg_idx, const ElemIndex& ldx,
- ThreadID tid) const -> const VecElem&
+const TheISA::VecElem&
+FullO3CPU<Impl>::readArchVecElem(
+ const RegIndex& reg_idx, const ElemIndex& ldx, ThreadID tid) const
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecElemClass, reg_idx, ldx));
}
template <class Impl>
-auto
+const TheISA::VecPredRegContainer&
FullO3CPU<Impl>::readArchVecPredReg(int reg_idx, ThreadID tid) const
- -> const VecPredRegContainer&
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecPredRegClass, reg_idx));
}
template <class Impl>
-auto
+TheISA::VecPredRegContainer&
FullO3CPU<Impl>::getWritableArchVecPredReg(int reg_idx, ThreadID tid)
- -> VecPredRegContainer&
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecPredRegClass, reg_idx));
template <class Impl>
void
-FullO3CPU<Impl>::setArchVecReg(int reg_idx, const VecRegContainer& val,
- ThreadID tid)
+FullO3CPU<Impl>::setArchVecReg(int reg_idx,
+ const TheISA::VecRegContainer& val, ThreadID tid)
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecRegClass, reg_idx));
template <class Impl>
void
FullO3CPU<Impl>::setArchVecElem(const RegIndex& reg_idx, const ElemIndex& ldx,
- const VecElem& val, ThreadID tid)
+ const TheISA::VecElem& val, ThreadID tid)
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecElemClass, reg_idx, ldx));
template <class Impl>
void
-FullO3CPU<Impl>::setArchVecPredReg(int reg_idx, const VecPredRegContainer& val,
- ThreadID tid)
+FullO3CPU<Impl>::setArchVecPredReg(int reg_idx,
+ const TheISA::VecPredRegContainer& val, ThreadID tid)
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecPredRegClass, reg_idx));
typedef typename Impl::DynInstPtr DynInstPtr;
typedef typename Impl::O3CPU O3CPU;
- using VecElem = TheISA::VecElem;
- using VecRegContainer = TheISA::VecRegContainer;
-
- using VecPredRegContainer = TheISA::VecPredRegContainer;
-
typedef O3ThreadState<Impl> ImplState;
typedef O3ThreadState<Impl> Thread;
RegVal readFloatReg(PhysRegIdPtr phys_reg);
- const VecRegContainer& readVecReg(PhysRegIdPtr reg_idx) const;
+ const TheISA::VecRegContainer& readVecReg(PhysRegIdPtr reg_idx) const;
/**
* Read physical vector register for modification.
*/
- VecRegContainer& getWritableVecReg(PhysRegIdPtr reg_idx);
+ TheISA::VecRegContainer& getWritableVecReg(PhysRegIdPtr reg_idx);
/** Returns current vector renaming mode */
Enums::VecRegRenameMode vecRenameMode() const { return vecMode; }
/**
* Read physical vector register lane
*/
- template<typename VecElem, int LaneIdx>
- VecLaneT<VecElem, true>
+ template<typename VE, int LaneIdx>
+ VecLaneT<VE, true>
readVecLane(PhysRegIdPtr phys_reg) const
{
cpuStats.vecRegfileReads++;
- return regFile.readVecLane<VecElem, LaneIdx>(phys_reg);
+ return regFile.readVecLane<VE, LaneIdx>(phys_reg);
}
/**
* Read physical vector register lane
*/
- template<typename VecElem>
- VecLaneT<VecElem, true>
+ template<typename VE>
+ VecLaneT<VE, true>
readVecLane(PhysRegIdPtr phys_reg) const
{
cpuStats.vecRegfileReads++;
- return regFile.readVecLane<VecElem>(phys_reg);
+ return regFile.readVecLane<VE>(phys_reg);
}
/** Write a lane of the destination vector register. */
return regFile.setVecLane(phys_reg, val);
}
- const VecElem& readVecElem(PhysRegIdPtr reg_idx) const;
+ const TheISA::VecElem& readVecElem(PhysRegIdPtr reg_idx) const;
- const VecPredRegContainer& readVecPredReg(PhysRegIdPtr reg_idx) const;
+ const TheISA::VecPredRegContainer&
+ readVecPredReg(PhysRegIdPtr reg_idx) const;
- VecPredRegContainer& getWritableVecPredReg(PhysRegIdPtr reg_idx);
+ TheISA::VecPredRegContainer& getWritableVecPredReg(PhysRegIdPtr reg_idx);
RegVal readCCReg(PhysRegIdPtr phys_reg);
void setFloatReg(PhysRegIdPtr phys_reg, RegVal val);
- void setVecReg(PhysRegIdPtr reg_idx, const VecRegContainer& val);
+ void setVecReg(PhysRegIdPtr reg_idx, const TheISA::VecRegContainer& val);
- void setVecElem(PhysRegIdPtr reg_idx, const VecElem& val);
+ void setVecElem(PhysRegIdPtr reg_idx, const TheISA::VecElem& val);
- void setVecPredReg(PhysRegIdPtr reg_idx, const VecPredRegContainer& val);
+ void setVecPredReg(PhysRegIdPtr reg_idx,
+ const TheISA::VecPredRegContainer& val);
void setCCReg(PhysRegIdPtr phys_reg, RegVal val);
RegVal readArchFloatReg(int reg_idx, ThreadID tid);
- const VecRegContainer& readArchVecReg(int reg_idx, ThreadID tid) const;
+ const TheISA::VecRegContainer&
+ readArchVecReg(int reg_idx, ThreadID tid) const;
/** Read architectural vector register for modification. */
- VecRegContainer& getWritableArchVecReg(int reg_idx, ThreadID tid);
+ TheISA::VecRegContainer& getWritableArchVecReg(int reg_idx, ThreadID tid);
/** Read architectural vector register lane. */
- template<typename VecElem>
- VecLaneT<VecElem, true>
+ template<typename VE>
+ VecLaneT<VE, true>
readArchVecLane(int reg_idx, int lId, ThreadID tid) const
{
PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
RegId(VecRegClass, reg_idx));
- return readVecLane<VecElem>(phys_reg);
+ return readVecLane<VE>(phys_reg);
}
setVecLane(phys_reg, val);
}
- const VecElem& readArchVecElem(const RegIndex& reg_idx,
- const ElemIndex& ldx, ThreadID tid) const;
+ const TheISA::VecElem& readArchVecElem(const RegIndex& reg_idx,
+ const ElemIndex& ldx, ThreadID tid) const;
- const VecPredRegContainer& readArchVecPredReg(int reg_idx,
- ThreadID tid) const;
+ const TheISA::VecPredRegContainer& readArchVecPredReg(
+ int reg_idx, ThreadID tid) const;
- VecPredRegContainer& getWritableArchVecPredReg(int reg_idx, ThreadID tid);
+ TheISA::VecPredRegContainer&
+ getWritableArchVecPredReg(int reg_idx, ThreadID tid);
RegVal readArchCCReg(int reg_idx, ThreadID tid);
void setArchFloatReg(int reg_idx, RegVal val, ThreadID tid);
- void setArchVecPredReg(int reg_idx, const VecPredRegContainer& val,
+ void setArchVecPredReg(int reg_idx, const TheISA::VecPredRegContainer& val,
ThreadID tid);
- void setArchVecReg(int reg_idx, const VecRegContainer& val, ThreadID tid);
+ void setArchVecReg(int reg_idx, const TheISA::VecRegContainer& val,
+ ThreadID tid);
void setArchVecElem(const RegIndex& reg_idx, const ElemIndex& ldx,
- const VecElem& val, ThreadID tid);
+ const TheISA::VecElem& val, ThreadID tid);
void setArchCCReg(int reg_idx, RegVal val, ThreadID tid);
/** Typedef for the CPU. */
typedef typename Impl::O3CPU O3CPU;
- /** Binary machine instruction type. */
- typedef TheISA::MachInst MachInst;
/** Register types. */
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
static constexpr auto NumVecElemPerVecReg = TheISA::NumVecElemPerVecReg;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
enum {
MaxInstSrcRegs = TheISA::MaxInstSrcRegs, //< Max source regs
return this->cpu->readFloatReg(this->_srcRegIdx[idx]);
}
- const VecRegContainer&
+ const TheISA::VecRegContainer&
readVecRegOperand(const StaticInst *si, int idx) const override
{
return this->cpu->readVecReg(this->_srcRegIdx[idx]);
/**
* Read destination vector register operand for modification.
*/
- VecRegContainer&
+ TheISA::VecRegContainer&
getWritableVecRegOperand(const StaticInst *si, int idx) override
{
return this->cpu->getWritableVecReg(this->_destRegIdx[idx]);
}
/** @} */
- VecElem readVecElemOperand(const StaticInst *si, int idx) const override
+ TheISA::VecElem
+ readVecElemOperand(const StaticInst *si, int idx) const override
{
return this->cpu->readVecElem(this->_srcRegIdx[idx]);
}
- const VecPredRegContainer&
+ const TheISA::VecPredRegContainer&
readVecPredRegOperand(const StaticInst *si, int idx) const override
{
return this->cpu->readVecPredReg(this->_srcRegIdx[idx]);
}
- VecPredRegContainer&
+ TheISA::VecPredRegContainer&
getWritableVecPredRegOperand(const StaticInst *si, int idx) override
{
return this->cpu->getWritableVecPredReg(this->_destRegIdx[idx]);
void
setVecRegOperand(const StaticInst *si, int idx,
- const VecRegContainer& val) override
+ const TheISA::VecRegContainer& val) override
{
this->cpu->setVecReg(this->_destRegIdx[idx], val);
BaseDynInst<Impl>::setVecRegOperand(si, idx, val);
}
- void setVecElemOperand(const StaticInst *si, int idx,
- const VecElem val) override
+ void
+ setVecElemOperand(const StaticInst *si, int idx,
+ const TheISA::VecElem val) override
{
int reg_idx = idx;
this->cpu->setVecElem(this->_destRegIdx[reg_idx], val);
void
setVecPredRegOperand(const StaticInst *si, int idx,
- const VecPredRegContainer& val) override
+ const TheISA::VecPredRegContainer& val) override
{
this->cpu->setVecPredReg(this->_destRegIdx[idx], val);
BaseDynInst<Impl>::setVecPredRegOperand(si, idx, val);
typedef typename CPUPol::FetchStruct FetchStruct;
typedef typename CPUPol::TimeStruct TimeStruct;
- /** Typedefs from ISA. */
- typedef TheISA::MachInst MachInst;
-
/**
* IcachePort class for instruction fetch.
*/
*/
struct O3CPUImpl
{
- /** The type of MachInst. */
- typedef TheISA::MachInst MachInst;
-
/** The CPU policy to be used, which defines all of the CPU stages. */
typedef SimpleCPUPolicy<O3CPUImpl> CPUPol;
numPhysicalFloatRegs(_numPhysicalFloatRegs),
numPhysicalVecRegs(_numPhysicalVecRegs),
numPhysicalVecElemRegs(_numPhysicalVecRegs *
- NumVecElemPerVecReg),
+ TheISA::NumVecElemPerVecReg),
numPhysicalVecPredRegs(_numPhysicalVecPredRegs),
numPhysicalCCRegs(_numPhysicalCCRegs),
totalNumRegs(_numPhysicalIntRegs
+ _numPhysicalFloatRegs
+ _numPhysicalVecRegs
- + _numPhysicalVecRegs * NumVecElemPerVecReg
+ + _numPhysicalVecRegs * TheISA::NumVecElemPerVecReg
+ _numPhysicalVecPredRegs
+ _numPhysicalCCRegs),
vecMode(vmode)
// registers, just a different (and incompatible) way to access
// them; put them onto the vector free list.
for (phys_reg = 0; phys_reg < numPhysicalVecRegs; phys_reg++) {
- for (ElemIndex eIdx = 0; eIdx < NumVecElemPerVecReg; eIdx++) {
+ for (ElemIndex eIdx = 0; eIdx < TheISA::NumVecElemPerVecReg; eIdx++) {
vecElemIds.emplace_back(VecElemClass, phys_reg,
eIdx, flat_reg_idx++);
}
* registers; put them onto the vector free list. */
for (reg_idx = 0; reg_idx < numPhysicalVecRegs; reg_idx++) {
assert(vecRegIds[reg_idx].index() == reg_idx);
- for (ElemIndex elemIdx = 0; elemIdx < NumVecElemPerVecReg; elemIdx++) {
- assert(vecElemIds[reg_idx * NumVecElemPerVecReg +
+ for (ElemIndex elemIdx = 0; elemIdx < TheISA::NumVecElemPerVecReg;
+ elemIdx++) {
+ assert(vecElemIds[reg_idx * TheISA::NumVecElemPerVecReg +
elemIdx].index() == reg_idx);
- assert(vecElemIds[reg_idx * NumVecElemPerVecReg +
+ assert(vecElemIds[reg_idx * TheISA::NumVecElemPerVecReg +
elemIdx].elemIndex() == elemIdx);
}
}
"Trying to get elems of a %s register", reg->className());
auto idx = reg->index();
return std::make_pair(
- vecElemIds.begin() + idx * NumVecElemPerVecReg,
- vecElemIds.begin() + (idx+1) * NumVecElemPerVecReg);
+ vecElemIds.begin() + idx * TheISA::NumVecElemPerVecReg,
+ vecElemIds.begin() + (idx+1) * TheISA::NumVecElemPerVecReg);
}
PhysRegFile::IdRange
case VecRegClass:
return &vecRegIds[reg->index()];
case VecElemClass:
- return &vecElemIds[reg->index() * NumVecElemPerVecReg +
+ return &vecElemIds[reg->index() * TheISA::NumVecElemPerVecReg +
reg->elemIndex()];
default:
panic_if(!reg->isVectorPhysElem(),
{
private:
- using VecElem = TheISA::VecElem;
- using VecRegContainer = TheISA::VecRegContainer;
using PhysIds = std::vector<PhysRegId>;
using VecMode = Enums::VecRegRenameMode;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
public:
using IdRange = std::pair<PhysIds::iterator,
PhysIds::iterator>;
private:
- static constexpr auto NumVecElemPerVecReg = TheISA::NumVecElemPerVecReg;
-
/** Integer register file. */
std::vector<RegVal> intRegFile;
std::vector<PhysRegId> intRegIds;
std::vector<PhysRegId> floatRegIds;
/** Vector register file. */
- std::vector<VecRegContainer> vectorRegFile;
+ std::vector<TheISA::VecRegContainer> vectorRegFile;
std::vector<PhysRegId> vecRegIds;
std::vector<PhysRegId> vecElemIds;
/** Predicate register file. */
- std::vector<VecPredRegContainer> vecPredRegFile;
+ std::vector<TheISA::VecPredRegContainer> vecPredRegFile;
std::vector<PhysRegId> vecPredRegIds;
/** Condition-code register file. */
}
/** Reads a vector register. */
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecReg(PhysRegIdPtr phys_reg) const
{
assert(phys_reg->isVectorPhysReg());
}
/** Reads a vector register for modification. */
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecReg(PhysRegIdPtr phys_reg)
{
/* const_cast for not duplicating code above. */
- return const_cast<VecRegContainer&>(readVecReg(phys_reg));
+ return const_cast<TheISA::VecRegContainer&>(readVecReg(phys_reg));
}
/** Reads a vector register lane. */
- template <typename VecElem, int LaneIdx>
- VecLaneT<VecElem, true>
+ template <typename VE, int LaneIdx>
+ VecLaneT<VE, true>
readVecLane(PhysRegIdPtr phys_reg) const
{
- return readVecReg(phys_reg).laneView<VecElem, LaneIdx>();
+ return readVecReg(phys_reg).laneView<VE, LaneIdx>();
}
/** Reads a vector register lane. */
- template <typename VecElem>
- VecLaneT<VecElem, true>
+ template <typename VE>
+ VecLaneT<VE, true>
readVecLane(PhysRegIdPtr phys_reg) const
{
- return readVecReg(phys_reg).laneView<VecElem>(phys_reg->elemIndex());
+ return readVecReg(phys_reg).laneView<VE>(phys_reg->elemIndex());
}
/** Get a vector register lane for modification. */
}
/** Reads a vector element. */
- const VecElem &
+ const TheISA::VecElem &
readVecElem(PhysRegIdPtr phys_reg) const
{
assert(phys_reg->isVectorPhysElem());
- auto ret = vectorRegFile[phys_reg->index()].as<VecElem>();
- const VecElem& val = ret[phys_reg->elemIndex()];
+ auto ret = vectorRegFile[phys_reg->index()].as<TheISA::VecElem>();
+ const TheISA::VecElem& val = ret[phys_reg->elemIndex()];
DPRINTF(IEW, "RegFile: Access to element %d of vector register %i,"
" has data %#x\n", phys_reg->elemIndex(),
int(phys_reg->index()), val);
}
/** Reads a predicate register. */
- const VecPredRegContainer& readVecPredReg(PhysRegIdPtr phys_reg) const
+ const TheISA::VecPredRegContainer&
+ readVecPredReg(PhysRegIdPtr phys_reg) const
{
assert(phys_reg->isVecPredPhysReg());
return vecPredRegFile[phys_reg->index()];
}
- VecPredRegContainer& getWritableVecPredReg(PhysRegIdPtr phys_reg)
+ TheISA::VecPredRegContainer&
+ getWritableVecPredReg(PhysRegIdPtr phys_reg)
{
/* const_cast for not duplicating code above. */
- return const_cast<VecPredRegContainer&>(readVecPredReg(phys_reg));
+ return const_cast<TheISA::VecPredRegContainer&>(
+ readVecPredReg(phys_reg));
}
/** Reads a condition-code register. */
/** Sets a vector register to the given value. */
void
- setVecReg(PhysRegIdPtr phys_reg, const VecRegContainer& val)
+ setVecReg(PhysRegIdPtr phys_reg, const TheISA::VecRegContainer& val)
{
assert(phys_reg->isVectorPhysReg());
/** Sets a vector register to the given value. */
void
- setVecElem(PhysRegIdPtr phys_reg, const VecElem val)
+ setVecElem(PhysRegIdPtr phys_reg, const TheISA::VecElem val)
{
assert(phys_reg->isVectorPhysElem());
DPRINTF(IEW, "RegFile: Setting element %d of vector register %i to"
" %#x\n", phys_reg->elemIndex(), int(phys_reg->index()), val);
- vectorRegFile[phys_reg->index()].as<VecElem>()[phys_reg->elemIndex()] =
- val;
+ vectorRegFile[phys_reg->index()].as<TheISA::VecElem>()[
+ phys_reg->elemIndex()] = val;
}
/** Sets a predicate register to the given value. */
- void setVecPredReg(PhysRegIdPtr phys_reg, const VecPredRegContainer& val)
+ void
+ setVecPredReg(PhysRegIdPtr phys_reg,
+ const TheISA::VecPredRegContainer& val)
{
assert(phys_reg->isVecPredPhysReg());
vecMap.init(TheISA::NumVecRegs, &(freeList->vecList), (RegIndex)-1);
- vecElemMap.init(TheISA::NumVecRegs * NVecElems,
+ vecElemMap.init(TheISA::NumVecRegs * TheISA::NumVecElemPerVecReg,
&(freeList->vecElemList), (RegIndex)-1);
predMap.init(TheISA::NumVecPredRegs, &(freeList->predList), (RegIndex)-1);
*/
TheISA::VecRegContainer new_RF[TheISA::NumVecRegs];
for (uint32_t i = 0; i < TheISA::NumVecRegs; i++) {
- VecReg dst = new_RF[i].as<TheISA::VecElem>();
- for (uint32_t l = 0; l < NVecElems; l++) {
+ TheISA::VecReg dst = new_RF[i].as<TheISA::VecElem>();
+ for (uint32_t l = 0; l < TheISA::NumVecElemPerVecReg; l++) {
RegId s_rid(VecElemClass, i, l);
PhysRegIdPtr s_prid = vecElemMap.lookup(s_rid);
dst[l] = regFile->readVecElem(s_prid);
class UnifiedRenameMap
{
private:
- static constexpr uint32_t NVecElems = TheISA::NumVecElemPerVecReg;
- using VecReg = TheISA::VecReg;
- using VecPredReg = TheISA::VecPredReg;
-
/** The integer register rename map */
SimpleRenameMap intMap;
reg_idx)).index());
}
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecReg(const RegId& id) const override
{
return readVecRegFlat(flattenRegId(id).index());
/**
* Read vector register operand for modification, hierarchical indexing.
*/
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecReg(const RegId& id) override
{
return getWritableVecRegFlat(flattenRegId(id).index());
}
/** @} */
- const VecElem &
+ const TheISA::VecElem &
readVecElem(const RegId& reg) const override
{
return readVecElemFlat(flattenRegId(reg).index(), reg.elemIndex());
}
- const VecPredRegContainer &
+ const TheISA::VecPredRegContainer &
readVecPredReg(const RegId& id) const override
{
return readVecPredRegFlat(flattenRegId(id).index());
}
- VecPredRegContainer&
+ TheISA::VecPredRegContainer&
getWritableVecPredReg(const RegId& id) override
{
return getWritableVecPredRegFlat(flattenRegId(id).index());
}
void
- setVecReg(const RegId& reg, const VecRegContainer& val) override
+ setVecReg(const RegId& reg, const TheISA::VecRegContainer& val) override
{
setVecRegFlat(flattenRegId(reg).index(), val);
}
void
- setVecElem(const RegId& reg, const VecElem& val) override
+ setVecElem(const RegId& reg, const TheISA::VecElem& val) override
{
setVecElemFlat(flattenRegId(reg).index(), reg.elemIndex(), val);
}
void
setVecPredReg(const RegId& reg,
- const VecPredRegContainer& val) override
+ const TheISA::VecPredRegContainer& val) override
{
setVecPredRegFlat(flattenRegId(reg).index(), val);
}
RegVal readFloatRegFlat(RegIndex idx) const override;
void setFloatRegFlat(RegIndex idx, RegVal val) override;
- const VecRegContainer& readVecRegFlat(RegIndex idx) const override;
+ const TheISA::VecRegContainer& readVecRegFlat(RegIndex idx) const override;
/** Read vector register operand for modification, flat indexing. */
- VecRegContainer& getWritableVecRegFlat(RegIndex idx) override;
- void setVecRegFlat(RegIndex idx, const VecRegContainer& val) override;
+ TheISA::VecRegContainer& getWritableVecRegFlat(RegIndex idx) override;
+ void setVecRegFlat(RegIndex idx,
+ const TheISA::VecRegContainer& val) override;
- template <typename VecElem>
- VecLaneT<VecElem, true>
+ template <typename VE>
+ VecLaneT<VE, true>
readVecLaneFlat(RegIndex idx, int lId) const
{
- return cpu->template readArchVecLane<VecElem>(idx, lId,
+ return cpu->template readArchVecLane<VE>(idx, lId,
thread->threadId());
}
cpu->template setArchVecLane(idx, lId, thread->threadId(), val);
}
- const VecElem &readVecElemFlat(RegIndex idx,
- const ElemIndex& elemIndex) const override;
+ const TheISA::VecElem &readVecElemFlat(RegIndex idx,
+ const ElemIndex& elemIndex) const override;
void setVecElemFlat(RegIndex idx, const ElemIndex& elemIdx,
- const VecElem& val) override;
+ const TheISA::VecElem& val) override;
- const VecPredRegContainer& readVecPredRegFlat(RegIndex idx) const override;
- VecPredRegContainer& getWritableVecPredRegFlat(RegIndex idx) override;
+ const TheISA::VecPredRegContainer&
+ readVecPredRegFlat(RegIndex idx) const override;
+ TheISA::VecPredRegContainer&
+ getWritableVecPredRegFlat(RegIndex idx) override;
void setVecPredRegFlat(RegIndex idx,
- const VecPredRegContainer& val) override;
+ const TheISA::VecPredRegContainer& val) override;
RegVal readCCRegFlat(RegIndex idx) const override;
void setCCRegFlat(RegIndex idx, RegVal val) override;
template <class Impl>
void
O3ThreadContext<Impl>::setVecRegFlat(
- RegIndex reg_idx, const VecRegContainer& val)
+ RegIndex reg_idx, const TheISA::VecRegContainer& val)
{
cpu->setArchVecReg(reg_idx, val, thread->threadId());
template <class Impl>
void
O3ThreadContext<Impl>::setVecElemFlat(RegIndex idx,
- const ElemIndex& elemIndex, const VecElem& val)
+ const ElemIndex& elemIndex, const TheISA::VecElem& val)
{
cpu->setArchVecElem(idx, elemIndex, val, thread->threadId());
conditionalSquash();
template <class Impl>
void
O3ThreadContext<Impl>::setVecPredRegFlat(RegIndex reg_idx,
- const VecPredRegContainer& val)
+ const TheISA::VecPredRegContainer& val)
{
cpu->setArchVecPredReg(reg_idx, val, thread->threadId());
class BaseSimpleCPU;
-class SimpleExecContext : public ExecContext {
- protected:
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
-
+class SimpleExecContext : public ExecContext
+{
public:
BaseSimpleCPU *cpu;
SimpleThread* thread;
}
/** Reads a vector register. */
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecRegOperand(const StaticInst *si, int idx) const override
{
execContextStats.numVecRegReads++;
}
/** Reads a vector register for modification. */
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecRegOperand(const StaticInst *si, int idx) override
{
execContextStats.numVecRegWrites++;
/** Sets a vector register to a value. */
void
setVecRegOperand(const StaticInst *si, int idx,
- const VecRegContainer& val) override
+ const TheISA::VecRegContainer& val) override
{
execContextStats.numVecRegWrites++;
const RegId& reg = si->destRegIdx(idx);
/** Vector Register Lane Interfaces. */
/** @{ */
/** Reads source vector lane. */
- template <typename VecElem>
- VecLaneT<VecElem, true>
+ template <typename VE>
+ VecLaneT<VE, true>
readVecLaneOperand(const StaticInst *si, int idx) const
{
execContextStats.numVecRegReads++;
const RegId& reg = si->srcRegIdx(idx);
assert(reg.isVecReg());
- return thread->readVecLane<VecElem>(reg);
+ return thread->readVecLane<VE>(reg);
}
/** Reads source vector 8bit operand. */
virtual ConstVecLane8
/** @} */
/** Reads an element of a vector register. */
- VecElem
+ TheISA::VecElem
readVecElemOperand(const StaticInst *si, int idx) const override
{
execContextStats.numVecRegReads++;
/** Sets an element of a vector register to a value. */
void
setVecElemOperand(const StaticInst *si, int idx,
- const VecElem val) override
+ const TheISA::VecElem val) override
{
execContextStats.numVecRegWrites++;
const RegId& reg = si->destRegIdx(idx);
thread->setVecElem(reg, val);
}
- const VecPredRegContainer&
+ const TheISA::VecPredRegContainer&
readVecPredRegOperand(const StaticInst *si, int idx) const override
{
execContextStats.numVecPredRegReads++;
return thread->readVecPredReg(reg);
}
- VecPredRegContainer&
+ TheISA::VecPredRegContainer&
getWritableVecPredRegOperand(const StaticInst *si, int idx) override
{
execContextStats.numVecPredRegWrites++;
void
setVecPredRegOperand(const StaticInst *si, int idx,
- const VecPredRegContainer& val) override
+ const TheISA::VecPredRegContainer& val) override
{
execContextStats.numVecPredRegWrites++;
const RegId& reg = si->destRegIdx(idx);
thread->setMiscReg(misc_reg, val);
}
- PCState
+ TheISA::PCState
pcState() const override
{
return thread->pcState();
}
void
- pcState(const PCState &val) override
+ pcState(const TheISA::PCState &val) override
{
thread->pcState(val);
}
class SimpleThread : public ThreadState, public ThreadContext
{
- protected:
- typedef TheISA::MachInst MachInst;
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
public:
typedef ThreadContext::Status Status;
protected:
std::array<RegVal, TheISA::NumFloatRegs> floatRegs;
std::array<RegVal, TheISA::NumIntRegs> intRegs;
- std::array<VecRegContainer, TheISA::NumVecRegs> vecRegs;
- std::array<VecPredRegContainer, TheISA::NumVecPredRegs> vecPredRegs;
+ std::array<TheISA::VecRegContainer, TheISA::NumVecRegs> vecRegs;
+ std::array<TheISA::VecPredRegContainer, TheISA::NumVecPredRegs>
+ vecPredRegs;
std::array<RegVal, TheISA::NumCCRegs> ccRegs;
TheISA::ISA *const isa; // one "instance" of the current ISA.
return regVal;
}
- const VecRegContainer&
+ const TheISA::VecRegContainer&
readVecReg(const RegId& reg) const override
{
int flatIndex = isa->flattenVecIndex(reg.index());
assert(flatIndex < TheISA::NumVecRegs);
- const VecRegContainer& regVal = readVecRegFlat(flatIndex);
+ const TheISA::VecRegContainer& regVal = readVecRegFlat(flatIndex);
DPRINTF(VecRegs, "Reading vector reg %d (%d) as %s.\n",
reg.index(), flatIndex, regVal.print());
return regVal;
}
- VecRegContainer&
+ TheISA::VecRegContainer&
getWritableVecReg(const RegId& reg) override
{
int flatIndex = isa->flattenVecIndex(reg.index());
assert(flatIndex < TheISA::NumVecRegs);
- VecRegContainer& regVal = getWritableVecRegFlat(flatIndex);
+ TheISA::VecRegContainer& regVal = getWritableVecRegFlat(flatIndex);
DPRINTF(VecRegs, "Reading vector reg %d (%d) as %s for modify.\n",
reg.index(), flatIndex, regVal.print());
return regVal;
}
/** @} */
- const VecElem &
+ const TheISA::VecElem &
readVecElem(const RegId ®) const override
{
int flatIndex = isa->flattenVecElemIndex(reg.index());
assert(flatIndex < TheISA::NumVecRegs);
- const VecElem& regVal = readVecElemFlat(flatIndex, reg.elemIndex());
+ const TheISA::VecElem& regVal =
+ readVecElemFlat(flatIndex, reg.elemIndex());
DPRINTF(VecRegs, "Reading element %d of vector reg %d (%d) as"
" %#x.\n", reg.elemIndex(), reg.index(), flatIndex, regVal);
return regVal;
}
- const VecPredRegContainer &
+ const TheISA::VecPredRegContainer &
readVecPredReg(const RegId ®) const override
{
int flatIndex = isa->flattenVecPredIndex(reg.index());
assert(flatIndex < TheISA::NumVecPredRegs);
- const VecPredRegContainer& regVal = readVecPredRegFlat(flatIndex);
+ const TheISA::VecPredRegContainer& regVal =
+ readVecPredRegFlat(flatIndex);
DPRINTF(VecPredRegs, "Reading predicate reg %d (%d) as %s.\n",
reg.index(), flatIndex, regVal.print());
return regVal;
}
- VecPredRegContainer &
+ TheISA::VecPredRegContainer &
getWritableVecPredReg(const RegId ®) override
{
int flatIndex = isa->flattenVecPredIndex(reg.index());
assert(flatIndex < TheISA::NumVecPredRegs);
- VecPredRegContainer& regVal = getWritableVecPredRegFlat(flatIndex);
+ TheISA::VecPredRegContainer& regVal =
+ getWritableVecPredRegFlat(flatIndex);
DPRINTF(VecPredRegs,
"Reading predicate reg %d (%d) as %s for modify.\n",
reg.index(), flatIndex, regVal.print());
}
void
- setVecReg(const RegId ®, const VecRegContainer &val) override
+ setVecReg(const RegId ®, const TheISA::VecRegContainer &val) override
{
int flatIndex = isa->flattenVecIndex(reg.index());
assert(flatIndex < TheISA::NumVecRegs);
}
void
- setVecElem(const RegId ®, const VecElem &val) override
+ setVecElem(const RegId ®, const TheISA::VecElem &val) override
{
int flatIndex = isa->flattenVecElemIndex(reg.index());
assert(flatIndex < TheISA::NumVecRegs);
}
void
- setVecPredReg(const RegId ®, const VecPredRegContainer &val) override
+ setVecPredReg(const RegId ®,
+ const TheISA::VecPredRegContainer &val) override
{
int flatIndex = isa->flattenVecPredIndex(reg.index());
assert(flatIndex < TheISA::NumVecPredRegs);
floatRegs[idx] = val;
}
- const VecRegContainer &
+ const TheISA::VecRegContainer &
readVecRegFlat(RegIndex reg) const override
{
return vecRegs[reg];
}
- VecRegContainer &
+ TheISA::VecRegContainer &
getWritableVecRegFlat(RegIndex reg) override
{
return vecRegs[reg];
}
void
- setVecRegFlat(RegIndex reg, const VecRegContainer &val) override
+ setVecRegFlat(RegIndex reg, const TheISA::VecRegContainer &val) override
{
vecRegs[reg] = val;
}
vecRegs[reg].laneView<typename LD::UnderlyingType>(lId) = val;
}
- const VecElem &
+ const TheISA::VecElem &
readVecElemFlat(RegIndex reg, const ElemIndex &elemIndex) const override
{
return vecRegs[reg].as<TheISA::VecElem>()[elemIndex];
void
setVecElemFlat(RegIndex reg, const ElemIndex &elemIndex,
- const VecElem &val) override
+ const TheISA::VecElem &val) override
{
vecRegs[reg].as<TheISA::VecElem>()[elemIndex] = val;
}
- const VecPredRegContainer &
+ const TheISA::VecPredRegContainer &
readVecPredRegFlat(RegIndex reg) const override
{
return vecPredRegs[reg];
}
- VecPredRegContainer &
+ TheISA::VecPredRegContainer &
getWritableVecPredRegFlat(RegIndex reg) override
{
return vecPredRegs[reg];
}
void
- setVecPredRegFlat(RegIndex reg, const VecPredRegContainer &val) override
+ setVecPredRegFlat(RegIndex reg,
+ const TheISA::VecPredRegContainer &val) override
{
vecPredRegs[reg] = val;
}
class StaticInst : public RefCounted, public StaticInstFlags
{
public:
- /// Binary extended machine instruction type.
- typedef TheISA::ExtMachInst ExtMachInst;
-
using RegIdArrayPtr = RegId (StaticInst:: *)[];
private:
static StaticInstPtr nopStaticInstPtr;
/// The binary machine instruction.
- const ExtMachInst machInst;
+ const TheISA::ExtMachInst machInst;
protected:
/// default, since the decoder generally only overrides
/// the fields that are meaningful for the particular
/// instruction.
- StaticInst(const char *_mnemonic, ExtMachInst _machInst, OpClass __opClass)
+ StaticInst(const char *_mnemonic, TheISA::ExtMachInst _machInst,
+ OpClass __opClass)
: _opClass(__opClass),
_numSrcRegs(0), _numDestRegs(0), _numFPDestRegs(0),
_numIntDestRegs(0), _numCCDestRegs(0), _numVecDestRegs(0),
class ThreadContext : public PCEventScope
{
protected:
- using VecRegContainer = TheISA::VecRegContainer;
- using VecElem = TheISA::VecElem;
- using VecPredRegContainer = TheISA::VecPredRegContainer;
bool useForClone = false;
public:
virtual RegVal readFloatReg(RegIndex reg_idx) const = 0;
- virtual const VecRegContainer& readVecReg(const RegId& reg) const = 0;
- virtual VecRegContainer& getWritableVecReg(const RegId& reg) = 0;
+ virtual const TheISA::VecRegContainer&
+ readVecReg(const RegId& reg) const = 0;
+ virtual TheISA::VecRegContainer& getWritableVecReg(const RegId& reg) = 0;
/** Vector Register Lane Interfaces. */
/** @{ */
const LaneData<LaneSize::EightByte>& val) = 0;
/** @} */
- virtual const VecElem& readVecElem(const RegId& reg) const = 0;
+ virtual const TheISA::VecElem& readVecElem(const RegId& reg) const = 0;
- virtual const VecPredRegContainer& readVecPredReg(const RegId& reg)
- const = 0;
- virtual VecPredRegContainer& getWritableVecPredReg(const RegId& reg) = 0;
+ virtual const TheISA::VecPredRegContainer& readVecPredReg(
+ const RegId& reg) const = 0;
+ virtual TheISA::VecPredRegContainer& getWritableVecPredReg(
+ const RegId& reg) = 0;
virtual RegVal readCCReg(RegIndex reg_idx) const = 0;
virtual void setFloatReg(RegIndex reg_idx, RegVal val) = 0;
- virtual void setVecReg(const RegId& reg, const VecRegContainer& val) = 0;
+ virtual void setVecReg(const RegId& reg,
+ const TheISA::VecRegContainer& val) = 0;
- virtual void setVecElem(const RegId& reg, const VecElem& val) = 0;
+ virtual void setVecElem(const RegId& reg, const TheISA::VecElem& val) = 0;
virtual void setVecPredReg(const RegId& reg,
- const VecPredRegContainer& val) = 0;
+ const TheISA::VecPredRegContainer& val) = 0;
virtual void setCCReg(RegIndex reg_idx, RegVal val) = 0;
virtual RegVal readFloatRegFlat(RegIndex idx) const = 0;
virtual void setFloatRegFlat(RegIndex idx, RegVal val) = 0;
- virtual const VecRegContainer& readVecRegFlat(RegIndex idx) const = 0;
- virtual VecRegContainer& getWritableVecRegFlat(RegIndex idx) = 0;
- virtual void setVecRegFlat(RegIndex idx, const VecRegContainer& val) = 0;
+ virtual const TheISA::VecRegContainer&
+ readVecRegFlat(RegIndex idx) const = 0;
+ virtual TheISA::VecRegContainer& getWritableVecRegFlat(RegIndex idx) = 0;
+ virtual void setVecRegFlat(RegIndex idx,
+ const TheISA::VecRegContainer& val) = 0;
- virtual const VecElem& readVecElemFlat(RegIndex idx,
- const ElemIndex& elemIdx) const = 0;
+ virtual const TheISA::VecElem& readVecElemFlat(RegIndex idx,
+ const ElemIndex& elemIdx) const = 0;
virtual void setVecElemFlat(RegIndex idx, const ElemIndex& elemIdx,
- const VecElem& val) = 0;
+ const TheISA::VecElem& val) = 0;
- virtual const VecPredRegContainer &
+ virtual const TheISA::VecPredRegContainer &
readVecPredRegFlat(RegIndex idx) const = 0;
- virtual VecPredRegContainer& getWritableVecPredRegFlat(RegIndex idx) = 0;
+ virtual TheISA::VecPredRegContainer& getWritableVecPredRegFlat(
+ RegIndex idx) = 0;
virtual void setVecPredRegFlat(RegIndex idx,
- const VecPredRegContainer& val) = 0;
+ const TheISA::VecPredRegContainer& val) = 0;
virtual RegVal readCCRegFlat(RegIndex idx) const = 0;
virtual void setCCRegFlat(RegIndex idx, RegVal val) = 0;