summaryrefslogtreecommitdiff
path: root/arch/alpha
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-08-02 12:04:18 -0400
committerKevin Lim <ktlim@umich.edu>2006-08-02 12:04:18 -0400
commit8d220c5c1024bc80c4f1365bc4ef542480acaac5 (patch)
tree8eb57e25f6e7eb713561aa8a324f7a04b67c600c /arch/alpha
parentdb6c908e0fe5c82d1c165d8582ed876445d20b3d (diff)
downloadgem5-8d220c5c1024bc80c4f1365bc4ef542480acaac5.tar.xz
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
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/ev5.cc6
-rw-r--r--arch/alpha/isa_traits.hh19
2 files changed, 22 insertions, 3 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc
index f113a2767..907bea92c 100644
--- a/arch/alpha/ev5.cc
+++ b/arch/alpha/ev5.cc
@@ -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.
diff --git a/arch/alpha/isa_traits.hh b/arch/alpha/isa_traits.hh
index 878193881..515ec933b 100644
--- a/arch/alpha/isa_traits.hh
+++ b/arch/alpha/isa_traits.hh
@@ -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 &section);
+
+ 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