mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target-sparc: Change fpr representation to doubles.
This allows a more efficient representation for 64-bit hosts. It should be about the same for 32-bit hosts, as we can still access the individual pieces of the double. Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
45c7b743cd
commit
30038fd818
8 changed files with 202 additions and 211 deletions
|
@ -21,13 +21,9 @@ void cpu_save(QEMUFile *f, void *opaque)
|
|||
qemu_put_betls(f, &env->regbase[i]);
|
||||
|
||||
/* FPU */
|
||||
for(i = 0; i < TARGET_FPREGS; i++) {
|
||||
union {
|
||||
float32 f;
|
||||
uint32_t i;
|
||||
} u;
|
||||
u.f = env->fpr[i];
|
||||
qemu_put_be32(f, u.i);
|
||||
for (i = 0; i < TARGET_DPREGS; i++) {
|
||||
qemu_put_be32(f, env->fpr[i].l.upper);
|
||||
qemu_put_be32(f, env->fpr[i].l.lower);
|
||||
}
|
||||
|
||||
qemu_put_betls(f, &env->pc);
|
||||
|
@ -128,13 +124,9 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
|
|||
qemu_get_betls(f, &env->regbase[i]);
|
||||
|
||||
/* FPU */
|
||||
for(i = 0; i < TARGET_FPREGS; i++) {
|
||||
union {
|
||||
float32 f;
|
||||
uint32_t i;
|
||||
} u;
|
||||
u.i = qemu_get_be32(f);
|
||||
env->fpr[i] = u.f;
|
||||
for (i = 0; i < TARGET_DPREGS; i++) {
|
||||
env->fpr[i].l.upper = qemu_get_be32(f);
|
||||
env->fpr[i].l.lower = qemu_get_be32(f);
|
||||
}
|
||||
|
||||
qemu_get_betls(f, &env->pc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue