aboutsummaryrefslogtreecommitdiff
path: root/target-alpha/machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-alpha/machine.c')
-rw-r--r--target-alpha/machine.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/target-alpha/machine.c b/target-alpha/machine.c
index 1c9edd12c6..889f2fcd03 100644
--- a/target-alpha/machine.c
+++ b/target-alpha/machine.c
@@ -20,7 +20,7 @@ static const VMStateInfo vmstate_fpcr = {
.put = put_fpcr,
};
-static VMStateField vmstate_cpu_fields[] = {
+static VMStateField vmstate_env_fields[] = {
VMSTATE_UINTTL_ARRAY(ir, CPUAlphaState, 31),
VMSTATE_UINTTL_ARRAY(fir, CPUAlphaState, 31),
/* Save the architecture value of the fpcr, not the internally
@@ -68,20 +68,24 @@ static VMStateField vmstate_cpu_fields[] = {
VMSTATE_END_OF_LIST()
};
-static const VMStateDescription vmstate_cpu = {
- .name = "cpu",
+static const VMStateDescription vmstate_env = {
+ .name = "env",
.version_id = 1,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
- .fields = vmstate_cpu_fields,
+ .fields = vmstate_env_fields,
};
-void cpu_save(QEMUFile *f, void *opaque)
-{
- vmstate_save_state(f, &vmstate_cpu, opaque);
-}
+static VMStateField vmstate_cpu_fields[] = {
+ VMSTATE_CPU(),
+ VMSTATE_STRUCT(env, AlphaCPU, 1, vmstate_env, CPUAlphaState),
+ VMSTATE_END_OF_LIST()
+};
-int cpu_load(QEMUFile *f, void *opaque, int version_id)
-{
- return vmstate_load_state(f, &vmstate_cpu, opaque, version_id);
-}
+const VMStateDescription vmstate_alpha_cpu = {
+ .name = "cpu",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .minimum_version_id_old = 1,
+ .fields = vmstate_cpu_fields,
+};