aboutsummaryrefslogtreecommitdiff
path: root/ecc.h
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-24 18:50:09 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-05-24 18:50:09 +0000
commitaa941b944500bf77f0bdbfa0a7112b4e89670ff1 (patch)
tree59f1c3e46b42022a3966e108752ca92531169380 /ecc.h
parent3f6c925f37cd8a1dddb8a8fbbcef4630ea347775 (diff)
downloadqemu-aa941b944500bf77f0bdbfa0a7112b4e89670ff1.zip
qemu-aa941b944500bf77f0bdbfa0a7112b4e89670ff1.tar.gz
qemu-aa941b944500bf77f0bdbfa0a7112b4e89670ff1.tar.bz2
Savevm/loadvm bits for ARM core, the PXA2xx peripherals and Spitz hardware.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2857 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'ecc.h')
-rw-r--r--ecc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ecc.h b/ecc.h
index 11e6d01..e8e3942 100644
--- a/ecc.h
+++ b/ecc.h
@@ -75,3 +75,20 @@ static inline void ecc_reset(struct ecc_state_s *s)
s->cp = 0x00;
s->count = 0;
}
+
+/* Save/restore */
+static inline void ecc_put(QEMUFile *f, struct ecc_state_s *s)
+{
+ qemu_put_8s(f, &s->cp);
+ qemu_put_be16s(f, &s->lp[0]);
+ qemu_put_be16s(f, &s->lp[1]);
+ qemu_put_be16s(f, &s->count);
+}
+
+static inline void ecc_get(QEMUFile *f, struct ecc_state_s *s)
+{
+ qemu_get_8s(f, &s->cp);
+ qemu_get_be16s(f, &s->lp[0]);
+ qemu_get_be16s(f, &s->lp[1]);
+ qemu_get_be16s(f, &s->count);
+}