]> git.sur5r.net Git - cc65/commitdiff
Repeat the check in OptJumpTarget whenever a match is found to find rows of matches
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 5 Jun 2004 16:19:23 +0000 (16:19 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 5 Jun 2004 16:19:23 +0000 (16:19 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3099 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/coptind.c

index 9e98c8976716e1223c224f6da6771a691242c1e3..ff121749fd8c4189d3d47332d5856f903733be1f 100644 (file)
@@ -543,9 +543,9 @@ unsigned OptJumpTarget (CodeSeg* S)
        /* Check if we have a jump or branch, and a matching label, which
         * is not attached to the jump itself
         */
-               if (E2 != 0                     &&
+               if (E2 != 0                     &&
            (E2->Info & OF_UBRA) != 0   &&
-           E2->JumpTo                  &&
+           E2->JumpTo                  &&
            E2->JumpTo->Owner != E2) {
 
            /* Get the entry preceeding the branch target */
@@ -561,7 +561,7 @@ unsigned OptJumpTarget (CodeSeg* S)
            /* Check if both preceeding instructions are identical */
            if (!CodeEntriesAreEqual (E1, T1)) {
                /* Not equal, try next */
-               goto NextEntry;
+                goto NextEntry;
            }
 
            /* Get the label for the instruction preceeding the jump target.
@@ -586,12 +586,11 @@ unsigned OptJumpTarget (CodeSeg* S)
                    /* Remember, we had changes */
            ++Changes;
 
-       }
-
+       } else {
 NextEntry:
-       /* Next entry */
-       ++I;
-
+            /* Next entry */
+            ++I;
+        }
     }
 
     /* Return the number of changes made */