mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-26 11:46:14 +00:00
target/m68k: implement fsave/frestore
Backports commit fff3b4b0e16c76669e56173acb9d3cc6aac85e85 from qemu
This commit is contained in:
parent
b82fe8b95c
commit
f9ee2d24cc
|
@ -5298,28 +5298,39 @@ DISAS_INSN(fscc)
|
||||||
#if defined(CONFIG_SOFTMMU)
|
#if defined(CONFIG_SOFTMMU)
|
||||||
DISAS_INSN(frestore)
|
DISAS_INSN(frestore)
|
||||||
{
|
{
|
||||||
M68kCPU *cpu = m68k_env_get_cpu(env);
|
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Implement frestore. */
|
if (m68k_feature(s->env, M68K_FEATURE_M68040)) {
|
||||||
cpu_abort(CPU(cpu), "FRESTORE not implemented");
|
SRC_EA(env, addr, OS_LONG, 0, NULL);
|
||||||
|
/* FIXME: check the state frame */
|
||||||
|
} else {
|
||||||
|
disas_undef(env, s, insn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DISAS_INSN(fsave)
|
DISAS_INSN(fsave)
|
||||||
{
|
{
|
||||||
M68kCPU *cpu = m68k_env_get_cpu(env);
|
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||||
|
|
||||||
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(tcg_ctx, 0x41000000);
|
||||||
|
DEST_EA(env, insn, OS_LONG, idle, NULL);
|
||||||
|
tcg_temp_free(tcg_ctx, idle);
|
||||||
|
} else {
|
||||||
|
disas_undef(env, s, insn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue