From: aliguori Date: Wed, 29 Oct 2008 14:16:31 +0000 (+0000) Subject: Fix restore of older snapshots for target-i386 on big endian hosts X-Git-Tag: TizenStudio_2.0_p2.3~10656 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0a5ac4edba2d3815242888ddb70a3c16df6e0f7;p=sdk%2Femulator%2Fqemu.git Fix restore of older snapshots for target-i386 on big endian hosts A target_ulong may be 64-bit. Passing it to a function expecting a 32-bit pointer is wrong and unfortunately happens to work for x86. It won't work on big endian hosts though. Change the code to work properly on all hosts. Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5570 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/target-i386/machine.c b/target-i386/machine.c index 9d440fb..7f78b0d 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -248,8 +248,8 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) qemu_get_betls(f, &env->sysenter_esp); qemu_get_betls(f, &env->sysenter_eip); } else { - qemu_get_be32s(f, &env->sysenter_esp); - qemu_get_be32s(f, &env->sysenter_eip); + env->sysenter_esp = qemu_get_be32(f); + env->sysenter_eip = qemu_get_be32(f); } qemu_get_betls(f, &env->cr[0]);