aboutsummaryrefslogtreecommitdiff
path: root/target-alpha
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 21:44:52 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 21:44:52 +0000
commit8fcc55f9de36354a8dcae1b47cadf45e8bba5cca (patch)
tree64729c190caff6c43de4c341bfc59368dcb15acf /target-alpha
parent9d1b494a2d5dd2c129994edcf4eb7630bb554964 (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')
-rw-r--r--target-alpha/translate.c14
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;
}