From f045b110cf1db6f9fc70589532b48d9cca339897 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Mon, 13 Mar 2006 17:04:24 -0500 Subject: Have a copyRegs function defined in the ISA that copies registers from one ExecContext to another ExecContext. This makes it easier for anything that needs to copy architected registers to do so in an ISA independent fashion. arch/alpha/ev5.cc: copyIprs now copies from a source ExecContext to a destination ExecContext. arch/alpha/registerfile.hh: Have ISA specific functions to copy all architected registers from one ExecContext to another. cpu/cpu_exec_context.cc: Call the ISA in order to copy any architected registers. --HG-- extra : convert_revision : 056cc3b3a9f345535d5a57c6524b114bbd5ae3c8 --- arch/alpha/ev5.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/alpha/ev5.cc') diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc index 019e83dd4..6d45edbff 100644 --- a/arch/alpha/ev5.cc +++ b/arch/alpha/ev5.cc @@ -542,10 +542,10 @@ AlphaISA::MiscRegFile::setIpr(int idx, uint64_t val, ExecContext *xc) } 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)); } } -- cgit v1.2.3