aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/translate.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-15 06:42:30 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-15 06:42:30 +0000
commitf24f381b2de01c37a811ac06c7d60644fd74a5b5 (patch)
tree1c3bcbc8ddb98f506c76ab38c2bffac32f7e184f /target-sh4/translate.c
parent9f4576f08b19f40d870afe5be0f9fa04e8b2b8c0 (diff)
SH4: sleep instruction bug fix
fix a bug on 'sleep' instruction, which have caused halt of idle task. As i386 'hlt' instruction does, it should save PC before sleep. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5220 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sh4/translate.c')
-rw-r--r--target-sh4/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index 8e97696e68..3943ab3c7b 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -505,7 +505,7 @@ void _decode_opc(DisasContext * ctx)
return;
case 0x001b: /* sleep */
if (ctx->memidx) {
- tcg_gen_helper_0_0(helper_sleep);
+ tcg_gen_helper_0_1(helper_sleep, tcg_const_i32(ctx->pc + 2));
} else {
tcg_gen_helper_0_0(helper_raise_illegal_instruction);
ctx->bstate = BS_EXCP;