mirror of
https://github.com/cc65/cc65.git
synced 2025-02-05 20:31:53 +00:00
Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@1242 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
3dcb7dba3b
commit
99de22ffe2
@ -500,8 +500,13 @@ unsigned OptJumpTarget (CodeSeg* S)
|
||||
/* Get next entry */
|
||||
E2 = CS_GetNextEntry (S, I);
|
||||
|
||||
/* Check if we have a jump or branch, and a matching label */
|
||||
if (E2 && (E2->Info & OF_UBRA) != 0 && E2->JumpTo) {
|
||||
/* Check if we have a jump or branch, and a matching label, which
|
||||
* is not attached to the jump itself
|
||||
*/
|
||||
if (E2 != 0 &&
|
||||
(E2->Info & OF_UBRA) != 0 &&
|
||||
E2->JumpTo &&
|
||||
E2->JumpTo->Owner != E2) {
|
||||
|
||||
/* Get the entry preceeding the branch target */
|
||||
T1 = CS_GetPrevEntry (S, CS_GetEntryIndex (S, E2->JumpTo->Owner));
|
||||
@ -908,7 +913,7 @@ unsigned OptDupLoads (CodeSeg* S)
|
||||
if (In->RegA >= 0 &&
|
||||
In->RegA == In->RegX &&
|
||||
(N = CS_GetNextEntry (S, I)) != 0 &&
|
||||
!CE_UseLoadFlags (N)) {
|
||||
!CE_UseLoadFlags (N)) {
|
||||
/* Value is identical and not followed by a branch */
|
||||
Delete = 1;
|
||||
}
|
||||
@ -967,7 +972,7 @@ unsigned OptDupLoads (CodeSeg* S)
|
||||
|
||||
}
|
||||
|
||||
/* Free register info */
|
||||
/* Free register info */
|
||||
CS_FreeRegInfo (S);
|
||||
|
||||
/* Return the number of changes made */
|
||||
@ -1060,7 +1065,7 @@ unsigned OptTransfers (CodeSeg* S)
|
||||
*/
|
||||
if ((X = CS_GetNextEntry (S, I+1)) == 0) {
|
||||
goto NextEntry;
|
||||
}
|
||||
}
|
||||
if (CE_UseLoadFlags (X)) {
|
||||
if (I == 0) {
|
||||
/* No preceeding entry */
|
||||
|
Loading…
x
Reference in New Issue
Block a user