diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-01-08 21:39:44 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-01-08 21:39:44 +0000 |
commit | 232e5537e476c463f5e6e2e9ae31f6e2da9ebfe9 (patch) | |
tree | fe9fc4a6bf46d1d2a6fce3287b7e92f2f37f5665 /target/m68k/cpu.c | |
parent | 4bd797af6f5bc9f7114030695716d199dceafa6e (diff) | |
parent | cc5230267678c26b7f96157086f45fd8a347eb21 (diff) |
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging
# gpg: Signature made Thu 04 Jan 2018 16:37:32 GMT
# gpg: using RSA key 0xF30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg: aka "Laurent Vivier <laurent@vivier.eu>"
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier/tags/m68k-for-2.12-pull-request:
target/m68k: fix m68k_cpu_dump_state()
target/m68k: add the Interrupt Stack Pointer
target/m68k: add andi/ori/eori to SR/CCR
target/m68k: add 680x0 "move to SR" instruction
target/m68k: move CCR/SR functions
target/m68k: implement fsave/frestore
target/m68k: add reset
target/m68k: add cpush/cinv
target/m68k: softmmu cleanup
target/m68k: add move16
target/m68k: add chk and chk2
target/m68k: manage 680x0 stack frames
target/m68k: add CPU_LOG_INT trace
target/m68k: use insn_pc to generate instruction fault address
linux-user, m68k: correctly manage SR in context
target/m68k: fix gen_get_ccr()
target-m68k: sync CC_OP before gen_jmp_tb()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/m68k/cpu.c')
-rw-r--r-- | target/m68k/cpu.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 0a3dd83548..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; } @@ -134,9 +134,18 @@ static void m68020_cpu_initfn(Object *obj) m68k_set_feature(env, M68K_FEATURE_CAS); m68k_set_feature(env, M68K_FEATURE_BKPT); m68k_set_feature(env, M68K_FEATURE_RTD); + m68k_set_feature(env, M68K_FEATURE_CHK2); } #define m68030_cpu_initfn m68020_cpu_initfn -#define m68040_cpu_initfn m68020_cpu_initfn + +static void m68040_cpu_initfn(Object *obj) +{ + M68kCPU *cpu = M68K_CPU(obj); + CPUM68KState *env = &cpu->env; + + m68020_cpu_initfn(obj); + m68k_set_feature(env, M68K_FEATURE_M68040); +} static void m68060_cpu_initfn(Object *obj) { @@ -156,6 +165,7 @@ static void m68060_cpu_initfn(Object *obj) m68k_set_feature(env, M68K_FEATURE_CAS); m68k_set_feature(env, M68K_FEATURE_BKPT); m68k_set_feature(env, M68K_FEATURE_RTD); + m68k_set_feature(env, M68K_FEATURE_CHK2); } static void m5208_cpu_initfn(Object *obj) |