mirror of
https://github.com/cc65/cc65.git
synced 2025-02-28 20:29:46 +00:00
Fixed another problem with OptJumpTarget1, that was mostly prevented from
being triggered by other optimizations, which removed or changed the trigger code. git-svn-id: svn://svn.cc65.org/cc65/trunk@4170 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
254e1169f2
commit
d451248437
@ -580,6 +580,13 @@ unsigned OptJumpTarget1 (CodeSeg* S)
|
|||||||
goto NextEntry;
|
goto NextEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The entry preceeding the branch target may not be the branch
|
||||||
|
* insn.
|
||||||
|
*/
|
||||||
|
if (T1 == E2) {
|
||||||
|
goto NextEntry;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get the entry preceeding the jump */
|
/* Get the entry preceeding the jump */
|
||||||
E1 = CS_GetEntry (S, I);
|
E1 = CS_GetEntry (S, I);
|
||||||
|
|
||||||
@ -594,6 +601,7 @@ unsigned OptJumpTarget1 (CodeSeg* S)
|
|||||||
* not already have one.
|
* not already have one.
|
||||||
*/
|
*/
|
||||||
TL1 = CS_GenLabel (S, T1);
|
TL1 = CS_GenLabel (S, T1);
|
||||||
|
printf ("Generated label %s\n", TL1->Name);
|
||||||
|
|
||||||
/* Change the jump target to point to this new label */
|
/* Change the jump target to point to this new label */
|
||||||
CS_MoveLabelRef (S, E2, TL1);
|
CS_MoveLabelRef (S, E2, TL1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user