Minor serialization tweaks.
cpu/simple_cpu/simple_cpu.cc: Serialize FP regs as integers (so we get exact bit representation). sim/serialize.cc: Don't panic on object rename... events come up named "event" and need to get renamed. Also fix some DPRINTFs. --HG-- extra : convert_revision : 62ad527a7aaf78ae623b70febc1331cf91cbad05
This commit is contained in:
parent
ced22d81a6
commit
167928f12b
2 changed files with 7 additions and 6 deletions
|
@ -261,7 +261,7 @@ SimpleCPU::serialize()
|
|||
for (int i = 0; i < NumFloatRegs; i++) {
|
||||
stringstream buf;
|
||||
ccprintf(buf, "F%02d", i);
|
||||
paramOut(buf.str(), xc->regs.floatRegFile.d[i]);
|
||||
paramOut(buf.str(), xc->regs.floatRegFile.q[i]);
|
||||
}
|
||||
// CPUTraitsType::serializeSpecialRegs(getProxy(), xc->regs);
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ SimpleCPU::unserialize(IniFile &db, const string &category, ConfigNode *node)
|
|||
stringstream buf;
|
||||
ccprintf(buf, "F%02d", i);
|
||||
db.findDefault(category, buf.str(), data);
|
||||
xc->regs.floatRegFile.d[i] = strtod(data.c_str(),NULL);
|
||||
to_number(data.c_str(), xc->regs.floatRegFile.q[i]);
|
||||
}
|
||||
|
||||
// Read in Special registers
|
||||
|
|
|
@ -100,8 +100,9 @@ Serializeable::childOut(const string &name, Serializeable *child)
|
|||
void
|
||||
Serializeable::setName(const string &name)
|
||||
{
|
||||
if (objName != "")
|
||||
panic("Cannot change object name");
|
||||
if (objName != "") {
|
||||
cprintf("Renaming object '%s' to '%s'.\n", objName, name);
|
||||
}
|
||||
|
||||
objName = name;
|
||||
}
|
||||
|
@ -160,7 +161,7 @@ Serializer::serialize(const string &f)
|
|||
add_objects();
|
||||
while (!objects.empty()) {
|
||||
Serializeable *serial = objects.front();
|
||||
DPRINTF(Serialize, "Name Children of %s\n", serial->name());
|
||||
DPRINTF(Serialize, "Naming children of %s\n", serial->name());
|
||||
serial->nameChildren();
|
||||
objects.pop_front();
|
||||
list.push_back(serial);
|
||||
|
@ -174,7 +175,7 @@ Serializer::serialize(const string &f)
|
|||
add_objects();
|
||||
while (!objects.empty()) {
|
||||
Serializeable *serial = objects.front();
|
||||
DPRINTF(Serialize, "Name Children of %s\n", serial->name());
|
||||
DPRINTF(Serialize, "Serializing %s\n", serial->name());
|
||||
serial->serialize();
|
||||
objects.pop_front();
|
||||
list.push_back(serial);
|
||||
|
|
Loading…
Reference in a new issue