aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/translate.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-22 08:57:27 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-22 08:57:27 +0000
commit833ed38689cca2b024f7952269f17d7bf2ab6de4 (patch)
tree43919bac346efaa500a61c2229270e6b3512aba5 /target-sh4/translate.c
parentf3d8b1eb105199a1d6bf063a8a574e782689909a (diff)
[sh4] sleep instruction
This patch adds sleep instruction. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5065 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/translate.c')
-rw-r--r--target-sh4/translate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index 15500a6c73..6f9fe33d3e 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -298,7 +298,12 @@ void _decode_opc(DisasContext * ctx)
case 0x0009: /* nop */
return;
case 0x001b: /* sleep */
- assert(0); /* XXXXX */
+ if (ctx->memidx) {
+ gen_op_sleep();
+ } else {
+ gen_op_raise_illegal_instruction();
+ ctx->bstate = BS_EXCP;
+ }
return;
}