* [Qemu-devel] [PATCH v2] m68k: implement move to/from usp register instruction
@ 2012-09-13 23:37 gerg
2012-09-14 19:38 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: gerg @ 2012-09-13 23:37 UTC (permalink / raw)
To: qemu-devel, paul; +Cc: Greg Ungerer
From: Greg Ungerer <gerg@uclinux.org>
Fill out the code support for the move to/from usp instructions. They are
being decoded, but there is no code to support their actions. So add it.
Current versions of Linux running on the ColdFire 5208 use these instructions.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
target-m68k/translate.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/target-m68k/translate.c b/target-m68k/translate.c
index 9fc1e31..7b55747 100644
--- a/target-m68k/translate.c
+++ b/target-m68k/translate.c
@@ -1980,8 +1980,8 @@ DISAS_INSN(move_from_usp)
gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
return;
}
- /* TODO: Implement USP. */
- gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+ tcg_gen_ld_i32(AREG(insn, 0), cpu_env,
+ offsetof(CPUM68KState, sp[M68K_USP]));
}
DISAS_INSN(move_to_usp)
@@ -1990,8 +1990,8 @@ DISAS_INSN(move_to_usp)
gen_exception(s, s->pc - 2, EXCP_PRIVILEGE);
return;
}
- /* TODO: Implement USP. */
- gen_exception(s, s->pc - 2, EXCP_ILLEGAL);
+ tcg_gen_st_i32(AREG(insn, 0), cpu_env,
+ offsetof(CPUM68KState, sp[M68K_USP]));
}
DISAS_INSN(halt)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-14 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 23:37 [Qemu-devel] [PATCH v2] m68k: implement move to/from usp register instruction gerg
2012-09-14 19:38 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).