}
void
-ISA::setMiscRegNoEffect(int misc_reg, const MiscReg &val, ThreadID tid)
+ISA::setMiscRegNoEffect(int misc_reg, MiscReg val, ThreadID tid)
{
switch (misc_reg) {
case MISCREG_FPCR:
}
void
-ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc,
- ThreadID tid)
+ISA::setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc, ThreadID tid)
{
switch (misc_reg) {
case MISCREG_FPCR:
MiscReg readMiscRegNoEffect(int misc_reg, ThreadID tid = 0) const;
MiscReg readMiscReg(int misc_reg, ThreadContext *tc, ThreadID tid = 0);
- void setMiscRegNoEffect(int misc_reg, const MiscReg &val,
- ThreadID tid = 0);
- void setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc,
- ThreadID tid = 0);
+ void setMiscRegNoEffect(int misc_reg, MiscReg val, ThreadID tid=0);
+ void setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc,
+ ThreadID tid=0);
void
clear()
}
void
-ISA::setMiscRegNoEffect(int misc_reg, const RegVal &val)
+ISA::setMiscRegNoEffect(int misc_reg, RegVal val)
{
assert(misc_reg < NumMiscRegs);
}
void
-ISA::setMiscReg(int misc_reg, const RegVal &val, ThreadContext *tc)
+ISA::setMiscReg(int misc_reg, RegVal val, ThreadContext *tc)
{
RegVal newVal = val;
public:
RegVal readMiscRegNoEffect(int misc_reg) const;
RegVal readMiscReg(int misc_reg, ThreadContext *tc);
- void setMiscRegNoEffect(int misc_reg, const RegVal &val);
- void setMiscReg(int misc_reg, const RegVal &val, ThreadContext *tc);
+ void setMiscRegNoEffect(int misc_reg, RegVal val);
+ void setMiscReg(int misc_reg, RegVal val, ThreadContext *tc);
RegId
flattenRegId(const RegId& regId) const
}
void
-ISA::setMiscRegNoEffect(int misc_reg, const MiscReg &val, ThreadID tid)
+ISA::setMiscRegNoEffect(int misc_reg, MiscReg val, ThreadID tid)
{
unsigned reg_sel = (bankType[misc_reg] == perThreadContext)
? tid : getVPENum(tid);
}
void
-ISA::setRegMask(int misc_reg, const MiscReg &val, ThreadID tid)
+ISA::setRegMask(int misc_reg, MiscReg val, ThreadID tid)
{
unsigned reg_sel = (bankType[misc_reg] == perThreadContext)
? tid : getVPENum(tid);
// be overwritten. Make sure to handle those particular registers
// with care!
void
-ISA::setMiscReg(int misc_reg, const MiscReg &val,
- ThreadContext *tc, ThreadID tid)
+ISA::setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc, ThreadID tid)
{
int reg_sel = (bankType[misc_reg] == perThreadContext)
? tid : getVPENum(tid);
* (setRegWithEffect)
*/
MiscReg
-ISA::filterCP0Write(int misc_reg, int reg_sel, const MiscReg &val)
+ISA::filterCP0Write(int misc_reg, int reg_sel, MiscReg val)
{
MiscReg retVal = val;
MiscReg readMiscReg(int misc_reg,
ThreadContext *tc, ThreadID tid = 0);
- MiscReg filterCP0Write(int misc_reg, int reg_sel, const MiscReg &val);
- void setRegMask(int misc_reg, const MiscReg &val, ThreadID tid = 0);
- void setMiscRegNoEffect(int misc_reg, const MiscReg &val,
- ThreadID tid = 0);
+ MiscReg filterCP0Write(int misc_reg, int reg_sel, MiscReg val);
+ void setRegMask(int misc_reg, MiscReg val, ThreadID tid = 0);
+ void setMiscRegNoEffect(int misc_reg, MiscReg val, ThreadID tid=0);
//template <class TC>
- void setMiscReg(int misc_reg, const MiscReg &val,
- ThreadContext *tc, ThreadID tid = 0);
+ void setMiscReg(int misc_reg, MiscReg val,
+ ThreadContext *tc, ThreadID tid=0);
//////////////////////////////////////////////////////////
//
}
void
- setMiscRegNoEffect(int misc_reg, const MiscReg &val)
+ setMiscRegNoEffect(int misc_reg, MiscReg val)
{
fatal("Power does not currently have any misc regs defined\n");
}
void
- setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
+ setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc)
{
fatal("Power does not currently have any misc regs defined\n");
}
}
void
-ISA::setMiscRegNoEffect(int misc_reg, const MiscReg &val)
+ISA::setMiscRegNoEffect(int misc_reg, MiscReg val)
{
if (misc_reg > NumMiscRegs || misc_reg < 0) {
// Illegal CSR
}
void
-ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
+ISA::setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc)
{
if (misc_reg >= MISCREG_CYCLE && misc_reg <= MISCREG_HPMCOUNTER31) {
// Ignore writes to HPM counters for now
RiscvISAParams::create()
{
return new RiscvISA::ISA(this);
-}
\ No newline at end of file
+}
MiscReg readMiscRegNoEffect(int misc_reg) const;
MiscReg readMiscReg(int misc_reg, ThreadContext *tc);
- void setMiscRegNoEffect(int misc_reg, const MiscReg &val);
- void setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc);
+ void setMiscRegNoEffect(int misc_reg, MiscReg val);
+ void setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc);
RegId flattenRegId(const RegId ®Id) const { return regId; }
int flattenIntIndex(int reg) const { return reg; }
// These need to check the int_dis field and if 0 then
// set appropriate bit in softint and checkinterrutps on the cpu
- void setFSReg(int miscReg, const MiscReg &val, ThreadContext *tc);
+ void setFSReg(int miscReg, MiscReg val, ThreadContext *tc);
MiscReg readFSReg(int miscReg, ThreadContext * tc);
// Update interrupt state on softint or pil change
MiscReg readMiscRegNoEffect(int miscReg) const;
MiscReg readMiscReg(int miscReg, ThreadContext *tc);
- void setMiscRegNoEffect(int miscReg, const MiscReg val);
- void setMiscReg(int miscReg, const MiscReg val,
- ThreadContext *tc);
+ void setMiscRegNoEffect(int miscReg, MiscReg val);
+ void setMiscReg(int miscReg, MiscReg val, ThreadContext *tc);
RegId
flattenRegId(const RegId& regId) const
}
void
-ISA::setFSReg(int miscReg, const MiscReg &val, ThreadContext *tc)
+ISA::setFSReg(int miscReg, MiscReg val, ThreadContext *tc)
{
BaseCPU *cpu = tc->getCpuPtr();
}
void
- setMiscRegNoEffect(int misc_reg, const RegVal &val)
+ setMiscRegNoEffect(int misc_reg, RegVal val)
{
DPRINTF(Checker, "Setting misc reg %d with no effect to check later\n",
misc_reg);
}
void
- setMiscReg(int misc_reg, const RegVal &val) override
+ setMiscReg(int misc_reg, RegVal val) override
{
DPRINTF(Checker, "Setting misc reg %d with effect to check later\n",
misc_reg);
}
void
- setMiscRegOperand(const StaticInst *si, int idx,
- const RegVal &val) override
+ setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isMiscReg());
{ return actualTC->readMiscReg(misc_reg); }
void
- setMiscRegNoEffect(int misc_reg, const RegVal &val)
+ setMiscRegNoEffect(int misc_reg, RegVal val)
{
DPRINTF(Checker, "Setting misc reg with no effect: %d to both Checker"
" and O3..\n", misc_reg);
}
void
- setMiscReg(int misc_reg, const RegVal &val)
+ setMiscReg(int misc_reg, RegVal val)
{
DPRINTF(Checker, "Setting misc reg with effect: %d to both Checker"
" and O3..\n", misc_reg);
*/
virtual RegVal readMiscRegOperand(const StaticInst *si, int idx) = 0;
virtual void setMiscRegOperand(const StaticInst *si,
- int idx, const RegVal &val) = 0;
+ int idx, RegVal val) = 0;
/**
* Reads a miscellaneous register, handling any architectural
* Sets a miscellaneous register, handling any architectural
* side effects due to writing that register.
*/
- virtual void setMiscReg(int misc_reg, const RegVal &val) = 0;
+ virtual void setMiscReg(int misc_reg, RegVal val) = 0;
/** @} */
}
void
- setMiscReg(int misc_reg, const RegVal &val) override
+ setMiscReg(int misc_reg, RegVal val) override
{
thread.setMiscReg(misc_reg, val);
}
}
void
- setMiscRegOperand(const StaticInst *si, int idx,
- const RegVal &val) override
+ setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isMiscReg());
}
void
- setRegOtherThread(const RegId ®, const RegVal &val,
+ setRegOtherThread(const RegId ®, RegVal val,
ThreadID tid=InvalidThreadID)
{
SimpleThread *other_thread = (tid == InvalidThreadID
template <class Impl>
void
-FullO3CPU<Impl>::setMiscRegNoEffect(int misc_reg,
- const RegVal &val, ThreadID tid)
+FullO3CPU<Impl>::setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid)
{
this->isa[tid]->setMiscRegNoEffect(misc_reg, val);
}
template <class Impl>
void
-FullO3CPU<Impl>::setMiscReg(int misc_reg,
- const RegVal &val, ThreadID tid)
+FullO3CPU<Impl>::setMiscReg(int misc_reg, RegVal val, ThreadID tid)
{
miscRegfileWrites++;
this->isa[tid]->setMiscReg(misc_reg, val, tcBase(tid));
RegVal readMiscReg(int misc_reg, ThreadID tid);
/** Sets a miscellaneous register. */
- void setMiscRegNoEffect(int misc_reg, const RegVal &val, ThreadID tid);
+ void setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid);
/** Sets a misc. register, including any side effects the write
* might have as defined by the architecture.
*/
- void setMiscReg(int misc_reg, const RegVal &val, ThreadID tid);
+ void setMiscReg(int misc_reg, RegVal val, ThreadID tid);
RegVal readIntReg(PhysRegIdPtr phys_reg);
* might have as defined by the architecture.
*/
void
- setMiscReg(int misc_reg, const RegVal &val)
+ setMiscReg(int misc_reg, RegVal val)
{
/** Writes to misc. registers are recorded and deferred until the
* commit stage, when updateMiscRegs() is called. First, check if
* might have as defined by the architecture.
*/
void
- setMiscRegOperand(const StaticInst *si, int idx, const RegVal &val)
+ setMiscRegOperand(const StaticInst *si, int idx, RegVal val)
{
const RegId& reg = si->destRegIdx(idx);
assert(reg.isMiscReg());
{ return cpu->readMiscReg(misc_reg, thread->threadId()); }
/** Sets a misc. register. */
- virtual void setMiscRegNoEffect(int misc_reg, const RegVal &val);
+ virtual void setMiscRegNoEffect(int misc_reg, RegVal val);
/** Sets a misc. register, including any side-effects the
* write might have as defined by the architecture. */
- virtual void setMiscReg(int misc_reg, const RegVal &val);
+ virtual void setMiscReg(int misc_reg, RegVal val);
virtual RegId flattenRegId(const RegId& regId) const;
template <class Impl>
void
-O3ThreadContext<Impl>::setMiscRegNoEffect(int misc_reg, const RegVal &val)
+O3ThreadContext<Impl>::setMiscRegNoEffect(int misc_reg, RegVal val)
{
cpu->setMiscRegNoEffect(misc_reg, val, thread->threadId());
#endif//__CPU_O3_THREAD_CONTEXT_IMPL_HH__
template <class Impl>
void
-O3ThreadContext<Impl>::setMiscReg(int misc_reg, const RegVal &val)
+O3ThreadContext<Impl>::setMiscReg(int misc_reg, RegVal val)
{
cpu->setMiscReg(misc_reg, val, thread->threadId());
}
void
- setMiscRegOperand(const StaticInst *si, int idx,
- const RegVal &val) override
+ setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
{
numIntRegWrites++;
const RegId& reg = si->destRegIdx(idx);
* side effects due to writing that register.
*/
void
- setMiscReg(int misc_reg, const RegVal &val) override
+ setMiscReg(int misc_reg, RegVal val) override
{
numIntRegWrites++;
thread->setMiscReg(misc_reg, val);
}
void
- setMiscRegNoEffect(int misc_reg, const RegVal &val, ThreadID tid = 0)
+ setMiscRegNoEffect(int misc_reg, RegVal val, ThreadID tid = 0)
{
return isa->setMiscRegNoEffect(misc_reg, val);
}
void
- setMiscReg(int misc_reg, const RegVal &val, ThreadID tid = 0)
+ setMiscReg(int misc_reg, RegVal val, ThreadID tid = 0)
{
return isa->setMiscReg(misc_reg, val, tc);
}
virtual RegVal readMiscReg(int misc_reg) = 0;
- virtual void setMiscRegNoEffect(int misc_reg, const RegVal &val) = 0;
+ virtual void setMiscRegNoEffect(int misc_reg, RegVal val) = 0;
- virtual void setMiscReg(int misc_reg, const RegVal &val) = 0;
+ virtual void setMiscReg(int misc_reg, RegVal val) = 0;
virtual RegId flattenRegId(const RegId& regId) const = 0;
}
virtual void
- setRegOtherThread(const RegId& misc_reg, const RegVal &val, ThreadID tid)
+ setRegOtherThread(const RegId& misc_reg, RegVal val, ThreadID tid)
{
}
RegVal readMiscReg(int misc_reg)
{ return actualTC->readMiscReg(misc_reg); }
- void setMiscRegNoEffect(int misc_reg, const RegVal &val)
+ void setMiscRegNoEffect(int misc_reg, RegVal val)
{ return actualTC->setMiscRegNoEffect(misc_reg, val); }
- void setMiscReg(int misc_reg, const RegVal &val)
+ void setMiscReg(int misc_reg, RegVal val)
{ return actualTC->setMiscReg(misc_reg, val); }
RegId flattenRegId(const RegId& regId) const