arch-riscv: added (un)serialization of miscRegFile.
Change-Id: I127dbf4a6bb4a144eaee05a87495830dce82eb58 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/25650 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "arch/riscv/registers.hh"
|
||||
#include "base/bitfield.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "debug/Checkpoint.hh"
|
||||
#include "debug/RiscvMisc.hh"
|
||||
#include "params/RiscvISA.hh"
|
||||
#include "sim/core.hh"
|
||||
@@ -352,6 +353,20 @@ ISA::setMiscReg(int misc_reg, RegVal val, ThreadContext *tc)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ISA::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
DPRINTF(Checkpoint, "Serializing Riscv Misc Registers\n");
|
||||
SERIALIZE_CONTAINER(miscRegFile);
|
||||
}
|
||||
|
||||
void
|
||||
ISA::unserialize(CheckpointIn &cp)
|
||||
{
|
||||
DPRINTF(Checkpoint, "Unserializing Riscv Misc Registers\n");
|
||||
UNSERIALIZE_CONTAINER(miscRegFile);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RiscvISA::ISA *
|
||||
|
||||
@@ -92,6 +92,9 @@ class ISA : public BaseISA
|
||||
|
||||
void startup(ThreadContext *tc) {}
|
||||
|
||||
void serialize(CheckpointOut &cp) const;
|
||||
void unserialize(CheckpointIn &cp);
|
||||
|
||||
/// Explicitly import the otherwise hidden startup
|
||||
using BaseISA::startup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user