[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays |
Date: |
Fri, 4 May 2012 12:54:37 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
savevm.c | 24 ++++++++++++++++++++++++
vmstate.h | 4 ++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/savevm.c b/savevm.c
index da8f234..0a00dec 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1132,6 +1132,30 @@ const VMStateInfo vmstate_info_float64 = {
.put = put_float64,
};
+/* 64 bit CPUDouble */
+
+static int get_cpudouble(QEMUFile *f, void *pv, size_t size)
+{
+ CPU_DoubleU *v = pv;
+
+ qemu_get_be32s(f, &v->l.upper);
+ qemu_get_be32s(f, &v->l.lower);
+ return 0;
+}
+
+static void put_cpudouble(QEMUFile *f, void *pv, size_t size)
+{
+ CPU_DoubleU *v = pv;
+ qemu_put_be32s(f, &v->l.upper);
+ qemu_put_be32s(f, &v->l.lower);
+}
+
+const VMStateInfo vmstate_info_cpudouble = {
+ .name = "CPU_Double_U",
+ .get = get_cpudouble,
+ .put = put_cpudouble,
+};
+
/* timers */
static int get_timer(QEMUFile *f, void *pv, size_t size)
diff --git a/vmstate.h b/vmstate.h
index d3fb88c..5c56f25 100644
--- a/vmstate.h
+++ b/vmstate.h
@@ -132,6 +132,7 @@ extern const VMStateInfo vmstate_info_uint64;
extern const VMStateInfo vmstate_info_float32;
extern const VMStateInfo vmstate_info_float64;
+extern const VMStateInfo vmstate_info_cpudouble;
extern const VMStateInfo vmstate_info_timer;
extern const VMStateInfo vmstate_info_buffer;
@@ -568,6 +569,9 @@ extern const VMStateDescription vmstate_cpu;
#define VMSTATE_FLOAT64_ARRAY(_f, _s, _n) \
VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_float64, float64)
+#define VMSTATE_CPUDOUBLE_ARRAY(_f, _s, _n) \
+ VMSTATE_ARRAY(_f, _s, _n, 0, vmstate_info_cpudouble, CPU_DoubleU)
+
#define VMSTATE_BUFFER_V(_f, _s, _v) \
VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
--
1.7.7.6
- Re: [Qemu-devel] [PATCH 01/35] vmstate: Simplify test for CPU_SAVE_VERSION, (continued)
- [Qemu-devel] [PATCH 04/35] vmstate: use new cpu style for x86, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 06/35] vmstate: make microblaze cpus not migrateable, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 05/35] vmstate: use new style for lm32 cpus, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays,
Juan Quintela <=
- [Qemu-devel] [PATCH 13/35] vmstate: introduce VMSTATE_VARRAY_MULTIPLY, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 07/35] vmstate: port cris cpu to vmstate, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 14/35] vmstate: define vmstate_info_uinttls, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 12/35] vmstate: port ppc cpu, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc, Juan Quintela, 2012/05/04
- Re: [Qemu-devel] [PATCH 16/35] vmstate: make incompatible change for sparc, Blue Swirl, 2012/05/06
- [Qemu-devel] [PATCH 17/35] mips_fulong2e: cpu vmstate already registered in cpu_exec_init, Juan Quintela, 2012/05/04