4 static int get_fpcr(QEMUFile
*f
, void *opaque
, size_t size
)
6 CPUAlphaState
*env
= opaque
;
7 cpu_alpha_store_fpcr(env
, qemu_get_be64(f
));
11 static void put_fpcr(QEMUFile
*f
, void *opaque
, size_t size
)
13 CPUAlphaState
*env
= opaque
;
14 qemu_put_be64(f
, cpu_alpha_load_fpcr(env
));
17 static const VMStateInfo vmstate_fpcr
= {
23 static VMStateField vmstate_env_fields
[] = {
24 VMSTATE_UINTTL_ARRAY(ir
, CPUAlphaState
, 31),
25 VMSTATE_UINTTL_ARRAY(fir
, CPUAlphaState
, 31),
26 /* Save the architecture value of the fpcr, not the internally
27 expanded version. Since this architecture value does not
28 exist in memory to be stored, this requires a but of hoop
29 jumping. We want OFFSET=0 so that we effectively pass ENV
30 to the helper functions, and we need to fill in the name by
31 hand since there's no field of that name. */
35 .size
= sizeof(uint64_t),
36 .info
= &vmstate_fpcr
,
40 VMSTATE_UINTTL(pc
, CPUAlphaState
),
41 VMSTATE_UINTTL(unique
, CPUAlphaState
),
42 VMSTATE_UINTTL(lock_addr
, CPUAlphaState
),
43 VMSTATE_UINTTL(lock_value
, CPUAlphaState
),
44 /* Note that lock_st_addr is not saved; it is a temporary
45 used during the execution of the st[lq]_c insns. */
47 VMSTATE_UINT8(ps
, CPUAlphaState
),
48 VMSTATE_UINT8(intr_flag
, CPUAlphaState
),
49 VMSTATE_UINT8(pal_mode
, CPUAlphaState
),
50 VMSTATE_UINT8(fen
, CPUAlphaState
),
52 VMSTATE_UINT32(pcc_ofs
, CPUAlphaState
),
54 VMSTATE_UINTTL(trap_arg0
, CPUAlphaState
),
55 VMSTATE_UINTTL(trap_arg1
, CPUAlphaState
),
56 VMSTATE_UINTTL(trap_arg2
, CPUAlphaState
),
58 VMSTATE_UINTTL(exc_addr
, CPUAlphaState
),
59 VMSTATE_UINTTL(palbr
, CPUAlphaState
),
60 VMSTATE_UINTTL(ptbr
, CPUAlphaState
),
61 VMSTATE_UINTTL(vptptr
, CPUAlphaState
),
62 VMSTATE_UINTTL(sysval
, CPUAlphaState
),
63 VMSTATE_UINTTL(usp
, CPUAlphaState
),
65 VMSTATE_UINTTL_ARRAY(shadow
, CPUAlphaState
, 8),
66 VMSTATE_UINTTL_ARRAY(scratch
, CPUAlphaState
, 24),
71 static const VMStateDescription vmstate_env
= {
74 .minimum_version_id
= 1,
75 .minimum_version_id_old
= 1,
76 .fields
= vmstate_env_fields
,
79 static VMStateField vmstate_cpu_fields
[] = {
81 VMSTATE_STRUCT(env
, AlphaCPU
, 1, vmstate_env
, CPUAlphaState
),
85 const VMStateDescription vmstate_alpha_cpu
= {
88 .minimum_version_id
= 1,
89 .minimum_version_id_old
= 1,
90 .fields
= vmstate_cpu_fields
,