diff options
author | Laurent Vivier <laurent@vivier.eu> | 2018-01-04 02:29:08 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-01-04 17:24:35 +0100 |
commit | fff3b4b0e16c76669e56173acb9d3cc6aac85e85 (patch) | |
tree | dfb1cfe77b92537cffaef41c5d77d2b3ffa723af /target | |
parent | 0bdb2b3bf5660f892ddbfa09baea56cdca57ad1d (diff) | |
download | qemu-fff3b4b0e16c76669e56173acb9d3cc6aac85e85.zip qemu-fff3b4b0e16c76669e56173acb9d3cc6aac85e85.tar.gz qemu-fff3b4b0e16c76669e56173acb9d3cc6aac85e85.tar.bz2 |
target/m68k: implement fsave/frestore
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180104012913.30763-13-laurent@vivier.eu>
Diffstat (limited to 'target')
-rw-r--r-- | target/m68k/translate.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index e8f7d07..b8ed85c 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -5103,28 +5103,35 @@ DISAS_INSN(fscc) #if defined(CONFIG_SOFTMMU) DISAS_INSN(frestore) { - M68kCPU *cpu = m68k_env_get_cpu(env); + TCGv addr; if (IS_USER(s)) { gen_exception(s, s->insn_pc, EXCP_PRIVILEGE); return; } - - /* TODO: Implement frestore. */ - cpu_abort(CPU(cpu), "FRESTORE not implemented"); + if (m68k_feature(s->env, M68K_FEATURE_M68040)) { + SRC_EA(env, addr, OS_LONG, 0, NULL); + /* FIXME: check the state frame */ + } else { + disas_undef(env, s, insn); + } } DISAS_INSN(fsave) { - M68kCPU *cpu = m68k_env_get_cpu(env); - if (IS_USER(s)) { gen_exception(s, s->insn_pc, EXCP_PRIVILEGE); return; } - /* TODO: Implement fsave. */ - cpu_abort(CPU(cpu), "FSAVE not implemented"); + if (m68k_feature(s->env, M68K_FEATURE_M68040)) { + /* always write IDLE */ + TCGv idle = tcg_const_i32(0x41000000); + DEST_EA(env, insn, OS_LONG, idle, NULL); + tcg_temp_free(idle); + } else { + disas_undef(env, s, insn); + } } #endif |