1
0
mirror of https://github.com/cc65/cc65.git synced 2025-04-12 15:37:11 +00:00

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
This commit is contained in:
cuz 2004-06-05 16:19:23 +00:00
parent 522f1d86d4
commit e4473c0a96

View 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 */