Updates for registers and stuff.
arch/alpha/ev5.cc:
Update for copying IPRs.
arch/alpha/isa_traits.hh:
Allow for misc register file to serialize. Also add some register copying code.
cpu/cpu_exec_context.cc:
Use ISA's function to copy registers.
--HG--
extra : convert_revision : 09fa3b2b1b229cbf3a34f69354953da2607c2a8f
This commit is contained in:
@@ -547,14 +547,16 @@ AlphaISA::MiscRegFile::setIpr(int idx, uint64_t val, ExecContext *xc)
|
||||
return NoFault;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AlphaISA::MiscRegFile::copyIprs(ExecContext *xc)
|
||||
AlphaISA::copyIprs(ExecContext *src, ExecContext *dest)
|
||||
{
|
||||
for (int i = IPR_Base_DepTag; i < NumInternalProcRegs; ++i) {
|
||||
ipr[i] = xc->readMiscReg(i);
|
||||
dest->setMiscReg(i, src->readMiscReg(i));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check for special simulator handling of specific PAL calls.
|
||||
* If return value is false, actual PAL call will be suppressed.
|
||||
|
||||
@@ -212,7 +212,16 @@ extern const int reg_redir[NumIntRegs];
|
||||
Fault setRegWithEffect(int misc_reg, const MiscReg &val,
|
||||
ExecContext *xc);
|
||||
|
||||
void copyMiscRegs(ExecContext *xc);
|
||||
void serialize(std::ostream &os);
|
||||
|
||||
void unserialize(Checkpoint *cp, const std::string §ion);
|
||||
|
||||
void clear()
|
||||
{
|
||||
fpcr = uniq = 0;
|
||||
lock_flag = 0;
|
||||
lock_addr = 0;
|
||||
}
|
||||
|
||||
#if FULL_SYSTEM
|
||||
protected:
|
||||
@@ -361,6 +370,14 @@ extern const int reg_redir[NumIntRegs];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void copyRegs(ExecContext *src, ExecContext *dest);
|
||||
|
||||
void copyMiscRegs(ExecContext *src, ExecContext *dest);
|
||||
|
||||
#if FULL_SYSTEM
|
||||
void copyIprs(ExecContext *src, ExecContext *dest);
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline AlphaISA::ExtMachInst
|
||||
|
||||
@@ -306,7 +306,7 @@ CPUExecContext::copyArchRegs(ExecContext *xc)
|
||||
}
|
||||
|
||||
// Copy misc. registers
|
||||
regs.miscRegs.copyMiscRegs(xc);
|
||||
TheISA::copyMiscRegs(xc, proxy);
|
||||
|
||||
// Lastly copy PC/NPC
|
||||
setPC(xc->readPC());
|
||||
|
||||
Reference in New Issue
Block a user