do not use syscall to quit emulation. this can fix issues #147 & #148

This commit is contained in:
Nguyen Anh Quynh
2015-09-26 16:49:00 +08:00
parent 79b81e6ae4
commit 886946dcf4
22 changed files with 57 additions and 29 deletions

View File

@ -3038,7 +3038,7 @@ static void disas_m68k_insn(CPUM68KState * env, DisasContext *s)
// Unicorn: end address tells us to stop emulation
if (s->pc == s->uc->addr_end) {
gen_exception(s, s->pc, EXCP_TRAP15);
gen_exception(s, s->pc, EXCP_HLT);
return;
}
@ -3104,7 +3104,7 @@ gen_intermediate_code_internal(M68kCPU *cpu, TranslationBlock *tb,
// Unicorn: early check to see if the address of this block is the until address
if (tb->pc == env->uc->addr_end) {
gen_tb_start(tcg_ctx);
gen_exception(dc, dc->pc, EXCP_TRAP15);
gen_exception(dc, dc->pc, EXCP_HLT);
goto done_generating;
}