aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/helper.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-05-09 20:19:04 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-05-09 20:19:04 +0000
commit5a834bb47c373e887de5210b7ceae96e1ef413f7 (patch)
tree3bf1890704941ea4ff5c17bf964d43fee8d26e70 /target-sparc/helper.c
parent275ea26546466446cf2ed83a93aa50e94538c203 (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/helper.c')
-rw-r--r--target-sparc/helper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index 0ba7c9ff13..46421225c4 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -1490,10 +1490,10 @@ void cpu_dump_state(CPUState *env, FILE *f,
}
#ifdef TARGET_SPARC64
cpu_fprintf(f, "pstate: %08x ccr: %02x (icc: ", env->pstate,
- GET_CCR(env));
- cpu_print_cc(f, cpu_fprintf, GET_CCR(env) << PSR_CARRY_SHIFT);
+ cpu_get_ccr(env));
+ cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << PSR_CARRY_SHIFT);
cpu_fprintf(f, " xcc: ");
- cpu_print_cc(f, cpu_fprintf, GET_CCR(env) << (PSR_CARRY_SHIFT - 4));
+ cpu_print_cc(f, cpu_fprintf, cpu_get_ccr(env) << (PSR_CARRY_SHIFT - 4));
cpu_fprintf(f, ") asi: %02x tl: %d pil: %x\n", env->asi, env->tl,
env->psrpil);
cpu_fprintf(f, "cansave: %d canrestore: %d otherwin: %d wstate: %d "
@@ -1503,8 +1503,8 @@ void cpu_dump_state(CPUState *env, FILE *f,
cpu_fprintf(f, "fsr: " TARGET_FMT_lx " y: " TARGET_FMT_lx " fprs: "
TARGET_FMT_lx "\n", env->fsr, env->y, env->fprs);
#else
- cpu_fprintf(f, "psr: %08x (icc: ", GET_PSR(env));
- cpu_print_cc(f, cpu_fprintf, GET_PSR(env));
+ cpu_fprintf(f, "psr: %08x (icc: ", cpu_get_psr(env));
+ cpu_print_cc(f, cpu_fprintf, cpu_get_psr(env));
cpu_fprintf(f, " SPE: %c%c%c) wim: %08x\n", env->psrs? 'S' : '-',
env->psrps? 'P' : '-', env->psret? 'E' : '-',
env->wim);