From e4473c0a96010a38b03eef072f98be97f2632b7c Mon Sep 17 00:00:00 2001 From: cuz Date: Sat, 5 Jun 2004 16:19:23 +0000 Subject: [PATCH] Repeat the check in OptJumpTarget whenever a match is found to find rows of matches git-svn-id: svn://svn.cc65.org/cc65/trunk@3099 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/coptind.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/cc65/coptind.c b/src/cc65/coptind.c index 9e98c8976..ff121749f 100644 --- a/src/cc65/coptind.c +++ b/src/cc65/coptind.c @@ -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 */ -- 2.39.5