aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/cpu.c
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2018-01-04 02:29:12 +0100
committerLaurent Vivier <laurent@vivier.eu>2018-01-04 17:24:35 +0100
commit6e22b28e22aa6ed1b8db6f24da2633868019d4c9 (patch)
tree706100b008229562e49fdff19ad71e2861763e38 /target/m68k/cpu.c
parentb5ae1edc294f78865ede38377c0a9b92da4370e0 (diff)
target/m68k: add the Interrupt Stack Pointer
Add the third stack pointer, the Interrupt Stack Pointer (ISP) (680x0 only). This stack will be needed in softmmu mode. Update movec to set/get the value of the three stacks. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20180104012913.30763-17-laurent@vivier.eu>
Diffstat (limited to 'target/m68k/cpu.c')
-rw-r--r--target/m68k/cpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 1936efd170..03126ba543 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -55,17 +55,17 @@ static void m68k_cpu_reset(CPUState *s)
mcc->parent_reset(s);
memset(env, 0, offsetof(CPUM68KState, end_reset_fields));
-#if !defined(CONFIG_USER_ONLY)
- env->sr = 0x2700;
+#ifdef CONFIG_SOFTMMU
+ cpu_m68k_set_sr(env, SR_S | SR_I);
+#else
+ cpu_m68k_set_sr(env, 0);
#endif
- m68k_switch_sp(env);
for (i = 0; i < 8; i++) {
env->fregs[i].d = nan;
}
cpu_m68k_set_fpcr(env, 0);
env->fpsr = 0;
- cpu_m68k_set_ccr(env, 0);
/* TODO: We should set PC from the interrupt vector. */
env->pc = 0;
}