diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-05-09 20:19:04 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-05-09 20:19:04 +0000 |
commit | 5a834bb47c373e887de5210b7ceae96e1ef413f7 (patch) | |
tree | 3bf1890704941ea4ff5c17bf964d43fee8d26e70 /target-sparc/machine.c | |
parent | 275ea26546466446cf2ed83a93aa50e94538c203 (diff) |
sparc: Fix lazy flag calculation on interrupts, refactor
Recalculate Sparc64 CPU flags on interrupts, otherwise some earlier
flags could be stored to pstate.
Refactor PSR/CCR/CWP handling: concentrate the actual
functions to op_helper.c.
Thanks to Igor Kovalenko for reporting.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/machine.c')
-rw-r--r-- | target-sparc/machine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-sparc/machine.c b/target-sparc/machine.c index 4b87ec6d97..752e431778 100644 --- a/target-sparc/machine.c +++ b/target-sparc/machine.c @@ -33,7 +33,7 @@ void cpu_save(QEMUFile *f, void *opaque) qemu_put_betls(f, &env->pc); qemu_put_betls(f, &env->npc); qemu_put_betls(f, &env->y); - tmp = GET_PSR(env); + tmp = cpu_get_psr(env); qemu_put_be32(f, tmp); qemu_put_betls(f, &env->fsr); qemu_put_betls(f, &env->tbr); @@ -130,7 +130,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) tmp = qemu_get_be32(f); env->cwp = 0; /* needed to ensure that the wrapping registers are correctly updated */ - PUT_PSR(env, tmp); + cpu_put_psr(env, tmp); qemu_get_betls(f, &env->fsr); qemu_get_betls(f, &env->tbr); tmp = qemu_get_be32(f); |