Revision f24f381b
b/target-sh4/helper.h | ||
---|---|---|
6 | 6 |
DEF_HELPER(void, helper_raise_illegal_instruction, (void)) |
7 | 7 |
DEF_HELPER(void, helper_raise_slot_illegal_instruction, (void)) |
8 | 8 |
DEF_HELPER(void, helper_debug, (void)) |
9 |
DEF_HELPER(void, helper_sleep, (void))
|
|
9 |
DEF_HELPER(void, helper_sleep, (uint32_t))
|
|
10 | 10 |
DEF_HELPER(void, helper_trapa, (uint32_t)) |
11 | 11 |
|
12 | 12 |
DEF_HELPER(uint32_t, helper_addv, (uint32_t, uint32_t)) |
b/target-sh4/op_helper.c | ||
---|---|---|
94 | 94 |
cpu_loop_exit(); |
95 | 95 |
} |
96 | 96 |
|
97 |
void helper_sleep(void)
|
|
97 |
void helper_sleep(uint32_t next_pc)
|
|
98 | 98 |
{ |
99 | 99 |
env->halted = 1; |
100 | 100 |
env->exception_index = EXCP_HLT; |
101 |
env->pc = next_pc; |
|
101 | 102 |
cpu_loop_exit(); |
102 | 103 |
} |
103 | 104 |
|
b/target-sh4/translate.c | ||
---|---|---|
505 | 505 |
return; |
506 | 506 |
case 0x001b: /* sleep */ |
507 | 507 |
if (ctx->memidx) { |
508 |
tcg_gen_helper_0_0(helper_sleep);
|
|
508 |
tcg_gen_helper_0_1(helper_sleep, tcg_const_i32(ctx->pc + 2));
|
|
509 | 509 |
} else { |
510 | 510 |
tcg_gen_helper_0_0(helper_raise_illegal_instruction); |
511 | 511 |
ctx->bstate = BS_EXCP; |
Also available in: Unified diff