Skip to contentSkip to conversation

[7027] target-alpha: stop translation if too long

Qemu-devel Aurelien Jarno 1 participant 1 message Apr 7, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 7027

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7027
Author:   aurel32
Date:     2009-04-07 21:44:52 +0000 (Tue, 07 Apr 2009)

Log Message:
-----------
target-alpha: stop translation if too long

Modified Paths:
--------------
trunk/target-alpha/translate.c

Modified: trunk/target-alpha/translate.c
===================================================================

target-alpha/translate.c +9 -5
@@ -2404,16 +2404,20 @@
         /* 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;
         }