mirror of
https://github.com/cc65/cc65.git
synced 2025-08-08 22:25:28 +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:
@@ -543,9 +543,9 @@ unsigned OptJumpTarget (CodeSeg* S)
|
|||||||
/* Check if we have a jump or branch, and a matching label, which
|
/* Check if we have a jump or branch, and a matching label, which
|
||||||
* is not attached to the jump itself
|
* is not attached to the jump itself
|
||||||
*/
|
*/
|
||||||
if (E2 != 0 &&
|
if (E2 != 0 &&
|
||||||
(E2->Info & OF_UBRA) != 0 &&
|
(E2->Info & OF_UBRA) != 0 &&
|
||||||
E2->JumpTo &&
|
E2->JumpTo &&
|
||||||
E2->JumpTo->Owner != E2) {
|
E2->JumpTo->Owner != E2) {
|
||||||
|
|
||||||
/* Get the entry preceeding the branch target */
|
/* Get the entry preceeding the branch target */
|
||||||
@@ -561,7 +561,7 @@ unsigned OptJumpTarget (CodeSeg* S)
|
|||||||
/* Check if both preceeding instructions are identical */
|
/* Check if both preceeding instructions are identical */
|
||||||
if (!CodeEntriesAreEqual (E1, T1)) {
|
if (!CodeEntriesAreEqual (E1, T1)) {
|
||||||
/* Not equal, try next */
|
/* Not equal, try next */
|
||||||
goto NextEntry;
|
goto NextEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the label for the instruction preceeding the jump target.
|
/* Get the label for the instruction preceeding the jump target.
|
||||||
@@ -586,12 +586,11 @@ unsigned OptJumpTarget (CodeSeg* S)
|
|||||||
/* Remember, we had changes */
|
/* Remember, we had changes */
|
||||||
++Changes;
|
++Changes;
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
NextEntry:
|
NextEntry:
|
||||||
/* Next entry */
|
/* Next entry */
|
||||||
++I;
|
++I;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the number of changes made */
|
/* Return the number of changes made */
|
||||||
|
Reference in New Issue
Block a user