diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 21:44:52 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 21:44:52 +0000 |
commit | 8fcc55f9de36354a8dcae1b47cadf45e8bba5cca (patch) | |
tree | 64729c190caff6c43de4c341bfc59368dcb15acf /target-alpha/translate.c | |
parent | 9d1b494a2d5dd2c129994edcf4eb7630bb554964 (diff) |
target-alpha: stop translation if too long
Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7027 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-alpha/translate.c')
-rw-r--r-- | target-alpha/translate.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 1e1da542d0..cdfeaa6476 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -2404,16 +2404,20 @@ static always_inline void gen_intermediate_code_internal (CPUState *env, /* if we reach a page boundary or are single stepping, stop * generation */ - if (((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0) || - num_insns >= max_insns) { - break; - } - if (env->singlestep_enabled) { gen_excp(&ctx, EXCP_DEBUG, 0); break; } + if ((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0) + break; + + if (gen_opc_ptr >= gen_opc_end) + break; + + if (num_insns >= max_insns) + break; + if (singlestep) { break; } |