mirror of https://github.com/proxmox/mirror_qemu
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>master
parent
0bdb2b3bf5
commit
fff3b4b0e1
|
@ -5103,28 +5103,35 @@ DISAS_INSN(fscc)
|
||||||
#if defined(CONFIG_SOFTMMU)
|
#if defined(CONFIG_SOFTMMU)
|
||||||
DISAS_INSN(frestore)
|
DISAS_INSN(frestore)
|
||||||
{
|
{
|
||||||
M68kCPU *cpu = m68k_env_get_cpu(env);
|
TCGv addr;
|
||||||
|
|
||||||
if (IS_USER(s)) {
|
if (IS_USER(s)) {
|
||||||
gen_exception(s, s->insn_pc, EXCP_PRIVILEGE);
|
gen_exception(s, s->insn_pc, EXCP_PRIVILEGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (m68k_feature(s->env, M68K_FEATURE_M68040)) {
|
||||||
/* TODO: Implement frestore. */
|
SRC_EA(env, addr, OS_LONG, 0, NULL);
|
||||||
cpu_abort(CPU(cpu), "FRESTORE not implemented");
|
/* FIXME: check the state frame */
|
||||||
|
} else {
|
||||||
|
disas_undef(env, s, insn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DISAS_INSN(fsave)
|
DISAS_INSN(fsave)
|
||||||
{
|
{
|
||||||
M68kCPU *cpu = m68k_env_get_cpu(env);
|
|
||||||
|
|
||||||
if (IS_USER(s)) {
|
if (IS_USER(s)) {
|
||||||
gen_exception(s, s->insn_pc, EXCP_PRIVILEGE);
|
gen_exception(s, s->insn_pc, EXCP_PRIVILEGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Implement fsave. */
|
if (m68k_feature(s->env, M68K_FEATURE_M68040)) {
|
||||||
cpu_abort(CPU(cpu), "FSAVE not implemented");
|
/* 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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue