mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-26 00:37:47 +00:00
m68k: implement move to/from usp register instruction
Fill out the code support for the move to/from usp instructions. They are being decoded, but there is no code to support there actions. So add it. Current versions of Linux running on the ColdFire 5208 use these instructions. Backports commit 2a8327e8a8288e301a2f01bc3ca2d465a3a4ca78 from qemu
This commit is contained in:
parent
63e5f57bb2
commit
0a0383e2b5
1 changed files with 10 additions and 4 deletions
|
@ -2046,22 +2046,28 @@ DISAS_INSN(move_to_sr)
|
|||
|
||||
DISAS_INSN(move_from_usp)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
|
||||
if (IS_USER(s)) {
|
||||
gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
|
||||
return;
|
||||
}
|
||||
/* TODO: Implement USP. */
|
||||
gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
|
||||
|
||||
tcg_gen_ld_i32(tcg_ctx, AREG(insn, 0), tcg_ctx->cpu_env,
|
||||
offsetof(CPUM68KState, sp[M68K_USP]));
|
||||
}
|
||||
|
||||
DISAS_INSN(move_to_usp)
|
||||
{
|
||||
TCGContext *tcg_ctx = s->uc->tcg_ctx;
|
||||
|
||||
if (IS_USER(s)) {
|
||||
gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
|
||||
return;
|
||||
}
|
||||
/* TODO: Implement USP. */
|
||||
gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
|
||||
|
||||
tcg_gen_st_i32(tcg_ctx, AREG(insn, 0), tcg_ctx->cpu_env,
|
||||
offsetof(CPUM68KState, sp[M68K_USP]));
|
||||
}
|
||||
|
||||
DISAS_INSN(halt)
|
||||
|
|
Loading…
Reference in a new issue