void unserialize(Checkpoint *cp, const std::string §ion);
+ void clear()
+ { bzero(regs, sizeof(regs)); }
};
class FloatRegFile
void unserialize(Checkpoint *cp, const std::string §ion);
+ void clear()
+ { bzero(d, sizeof(d)); }
};
class MiscRegFile {
Fault setRegWithEffect(int misc_reg, const MiscReg &val,
ThreadContext *tc);
+ void clear()
+ {
+ fpcr = uniq = 0;
+ lock_flag = 0;
+ lock_addr = 0;
+ }
#if FULL_SYSTEM
protected:
typedef uint64_t InternalProcReg;
void clear()
{
- bzero(&intRegFile, sizeof(intRegFile));
- bzero(&floatRegFile, sizeof(floatRegFile));
- bzero(&miscRegFile, sizeof(miscRegFile));
+ intRegFile.clear();
+ floatRegFile.clear();
+ miscRegFile.clear();
}
MiscReg readMiscReg(int miscReg)
intRegFile.resize(numPhysicalIntRegs);
floatRegFile.resize(numPhysicalFloatRegs);
+ for (int i = 0; i < Impl::MaxThreads; ++i) {
+ miscRegs[i].clear();
+ }
+
//memset(intRegFile, 0, sizeof(*intRegFile));
//memset(floatRegFile, 0, sizeof(*floatRegFile));
}