xref: /openbmc/qemu/include/migration/cpu.h (revision 2ae16a6a)
1 /* Declarations for use for CPU state serialization.  */
2 
3 #ifndef MIGRATION_CPU_H
4 #define MIGRATION_CPU_H
5 
6 #include "exec/cpu-defs.h"
7 
8 #if TARGET_LONG_BITS == 64
9 #define qemu_put_betl qemu_put_be64
10 #define qemu_get_betl qemu_get_be64
11 #define qemu_put_betls qemu_put_be64s
12 #define qemu_get_betls qemu_get_be64s
13 #define qemu_put_sbetl qemu_put_sbe64
14 #define qemu_get_sbetl qemu_get_sbe64
15 #define qemu_put_sbetls qemu_put_sbe64s
16 #define qemu_get_sbetls qemu_get_sbe64s
17 
18 #define VMSTATE_UINTTL_V(_f, _s, _v)                                  \
19     VMSTATE_UINT64_V(_f, _s, _v)
20 #define VMSTATE_UINTTL_EQUAL_V(_f, _s, _v)                            \
21     VMSTATE_UINT64_EQUAL_V(_f, _s, _v)
22 #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \
23     VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)
24 #define VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, _v)                \
25     VMSTATE_UINT64_2DARRAY_V(_f, _s, _n1, _n2, _v)
26 #define VMSTATE_UINTTL_TEST(_f, _s, _t)                               \
27     VMSTATE_UINT64_TEST(_f, _s, _t)
28 #define vmstate_info_uinttl vmstate_info_uint64
29 #else
30 #define qemu_put_betl qemu_put_be32
31 #define qemu_get_betl qemu_get_be32
32 #define qemu_put_betls qemu_put_be32s
33 #define qemu_get_betls qemu_get_be32s
34 #define qemu_put_sbetl qemu_put_sbe32
35 #define qemu_get_sbetl qemu_get_sbe32
36 #define qemu_put_sbetls qemu_put_sbe32s
37 #define qemu_get_sbetls qemu_get_sbe32s
38 
39 #define VMSTATE_UINTTL_V(_f, _s, _v)                                  \
40     VMSTATE_UINT32_V(_f, _s, _v)
41 #define VMSTATE_UINTTL_EQUAL_V(_f, _s, _v)                            \
42     VMSTATE_UINT32_EQUAL_V(_f, _s, _v)
43 #define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v)                        \
44     VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)
45 #define VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, _v)                \
46     VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, _v)
47 #define VMSTATE_UINTTL_TEST(_f, _s, _t)                               \
48     VMSTATE_UINT32_TEST(_f, _s, _t)
49 #define vmstate_info_uinttl vmstate_info_uint32
50 #endif
51 
52 #define VMSTATE_UINTTL(_f, _s)                                        \
53     VMSTATE_UINTTL_V(_f, _s, 0)
54 #define VMSTATE_UINTTL_EQUAL(_f, _s)                                  \
55     VMSTATE_UINTTL_EQUAL_V(_f, _s, 0)
56 #define VMSTATE_UINTTL_ARRAY(_f, _s, _n)                              \
57     VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, 0)
58 #define VMSTATE_UINTTL_2DARRAY(_f, _s, _n1, _n2)                      \
59     VMSTATE_UINTTL_2DARRAY_V(_f, _s, _n1, _n2, 0)
60 
61 
62 #endif
63