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:
parent
db6c908e0f
commit
8d220c5c10
3 changed files with 23 additions and 4 deletions
|
@ -547,14 +547,16 @@ AlphaISA::MiscRegFile::setIpr(int idx, uint64_t val, ExecContext *xc)
|
||||||
return NoFault;
|
return NoFault;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
AlphaISA::MiscRegFile::copyIprs(ExecContext *xc)
|
AlphaISA::copyIprs(ExecContext *src, ExecContext *dest)
|
||||||
{
|
{
|
||||||
for (int i = IPR_Base_DepTag; i < NumInternalProcRegs; ++i) {
|
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.
|
* Check for special simulator handling of specific PAL calls.
|
||||||
* If return value is false, actual PAL call will be suppressed.
|
* 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,
|
Fault setRegWithEffect(int misc_reg, const MiscReg &val,
|
||||||
ExecContext *xc);
|
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
|
#if FULL_SYSTEM
|
||||||
protected:
|
protected:
|
||||||
|
@ -361,6 +370,14 @@ extern const int reg_redir[NumIntRegs];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
static inline AlphaISA::ExtMachInst
|
||||||
|
|
|
@ -306,7 +306,7 @@ CPUExecContext::copyArchRegs(ExecContext *xc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy misc. registers
|
// Copy misc. registers
|
||||||
regs.miscRegs.copyMiscRegs(xc);
|
TheISA::copyMiscRegs(xc, proxy);
|
||||||
|
|
||||||
// Lastly copy PC/NPC
|
// Lastly copy PC/NPC
|
||||||
setPC(xc->readPC());
|
setPC(xc->readPC());
|
||||||
|
|
Loading…
Reference in a new issue