mirror of
https://github.com/cc65/cc65.git
synced 2024-11-10 10:04:50 +00:00
Made optimization steps aware of long branches better.
This commit is contained in:
parent
2fcd8b934a
commit
07cc6a3d20
@ -944,7 +944,9 @@ unsigned OptCmp9 (CodeSeg* S)
|
||||
if (L[0]->OPC == OP65_SBC &&
|
||||
CS_GetEntries (S, L+1, I+1, 4) &&
|
||||
(L[1]->OPC == OP65_BVC ||
|
||||
L[1]->OPC == OP65_BVS) &&
|
||||
L[1]->OPC == OP65_BVS ||
|
||||
L[1]->OPC == OP65_JVC ||
|
||||
L[1]->OPC == OP65_JVS) &&
|
||||
L[1]->JumpTo != 0 &&
|
||||
L[1]->JumpTo->Owner == L[3] &&
|
||||
L[2]->OPC == OP65_EOR &&
|
||||
|
@ -988,7 +988,7 @@ unsigned OptPtrLoad12 (CodeSeg* S)
|
||||
L[4]->OPC == OP65_CLC &&
|
||||
L[5]->OPC == OP65_ADC &&
|
||||
CE_IsKnownImm (L[5], 1) &&
|
||||
L[6]->OPC == OP65_BCC &&
|
||||
(L[6]->OPC == OP65_BCC || L[6]->OPC == OP65_JCC) &&
|
||||
L[6]->JumpTo != 0 &&
|
||||
L[6]->JumpTo->Owner == L[8] &&
|
||||
L[7]->OPC == OP65_INX &&
|
||||
|
@ -341,7 +341,10 @@ unsigned OptShift2 (CodeSeg* S)
|
||||
L[0] = CS_GetEntry (S, I);
|
||||
|
||||
/* Check for the sequence */
|
||||
if ((L[0]->OPC == OP65_BPL || L[0]->OPC == OP65_BCC) &&
|
||||
if ((L[0]->OPC == OP65_BPL ||
|
||||
L[0]->OPC == OP65_BCC ||
|
||||
L[0]->OPC == OP65_JPL ||
|
||||
L[0]->OPC == OP65_JCC) &&
|
||||
L[0]->JumpTo != 0 &&
|
||||
CS_GetEntries (S, L+1, I+1, 3) &&
|
||||
L[1]->OPC == OP65_DEX &&
|
||||
|
Loading…
Reference in New Issue
Block a user