aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/machine.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-07 08:07:37 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-07 08:07:37 +0000
commit1a14026e11b9baaf5050b0bed947e1b57f10ca08 (patch)
treea06201cc70543831d6f593414d910f0c80e083a2 /target-sparc/machine.c
parent96d19126227eb6010336f38ce4c09966964bb1f4 (diff)
downloadqemu-1a14026e11b9baaf5050b0bed947e1b57f10ca08.zip
qemu-1a14026e11b9baaf5050b0bed947e1b57f10ca08.tar.gz
qemu-1a14026e11b9baaf5050b0bed947e1b57f10ca08.tar.bz2
Allow NWINDOWS selection (CPU feature with model specific defaults)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4690 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/machine.c')
-rw-r--r--target-sparc/machine.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/target-sparc/machine.c b/target-sparc/machine.c
index 0e7a23e..aaac30b 100644
--- a/target-sparc/machine.c
+++ b/target-sparc/machine.c
@@ -31,7 +31,8 @@ void cpu_save(QEMUFile *f, void *opaque)
for(i = 0; i < 8; i++)
qemu_put_betls(f, &env->gregs[i]);
- for(i = 0; i < NWINDOWS * 16; i++)
+ qemu_put_be32s(f, &env->nwindows);
+ for(i = 0; i < env->nwindows * 16; i++)
qemu_put_betls(f, &env->regbase[i]);
/* FPU */
@@ -65,9 +66,12 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
int i;
uint32_t tmp;
+ if (version_id != 4)
+ return -EINVAL;
for(i = 0; i < 8; i++)
qemu_get_betls(f, &env->gregs[i]);
- for(i = 0; i < NWINDOWS * 16; i++)
+ qemu_get_be32s(f, &env->nwindows);
+ for(i = 0; i < env->nwindows * 16; i++)
qemu_get_betls(f, &env->regbase[i]);
/* FPU */