diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-03-08 15:10:47 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-03-08 15:10:47 -0500 |
commit | 77e40756b723e6cf18462bbb15653792b5c90346 (patch) | |
tree | d4085e98e80593a0b3bf1ea20dacebf4c7b14158 /arch | |
parent | 67732a7b2816929e41a52998c25eb008217041a5 (diff) | |
download | gem5-77e40756b723e6cf18462bbb15653792b5c90346.tar.xz |
Include ability to copy all misc regs.
arch/alpha/ev5.cc:
Include function for the MiscRegFile to copy all of the Iprs from an ExecContext.
arch/alpha/isa_traits.hh:
Include functions to copy MiscRegs from an ExecContext.
cpu/cpu_exec_context.cc:
Be sure to copy all of the misc regs when copying all architectural state.
--HG--
extra : convert_revision : cb948b5ff141ea0f739a1016f98236bd2a512f76
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/ev5.cc | 8 | ||||
-rw-r--r-- | arch/alpha/isa_traits.hh | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc index ccdcf7502..019e83dd4 100644 --- a/arch/alpha/ev5.cc +++ b/arch/alpha/ev5.cc @@ -541,6 +541,14 @@ AlphaISA::MiscRegFile::setIpr(int idx, uint64_t val, ExecContext *xc) return NoFault; } +void +AlphaISA::MiscRegFile::copyIprs(ExecContext *xc) +{ + for (int i = IPR_Base_DepTag; i < NumInternalProcRegs; ++i) { + ipr[i] = xc->readMiscReg(i); + } +} + /** * Check for special simulator handling of specific PAL calls. * If return value is false, actual PAL call will be suppressed. diff --git a/arch/alpha/isa_traits.hh b/arch/alpha/isa_traits.hh index b719b12b0..8e1f21a35 100644 --- a/arch/alpha/isa_traits.hh +++ b/arch/alpha/isa_traits.hh @@ -169,6 +169,8 @@ extern const int reg_redir[NumIntRegs]; Fault setRegWithEffect(int misc_reg, const MiscReg &val, ExecContext *xc); + void copyMiscRegs(ExecContext *xc); + #if FULL_SYSTEM protected: InternalProcReg ipr[NumInternalProcRegs]; // Internal processor regs @@ -177,6 +179,8 @@ extern const int reg_redir[NumIntRegs]; MiscReg readIpr(int idx, Fault &fault, ExecContext *xc); Fault setIpr(int idx, uint64_t val, ExecContext *xc); + + void copyIprs(ExecContext *xc); #endif friend class RegFile; }; |