mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-04 17:31:49 +00:00
Rearrange some labels to facilitate branch-shortening optimization.
This commit is contained in:
parent
23b870908e
commit
607211d38e
5
Gen.pas
5
Gen.pas
@ -1111,12 +1111,13 @@ if (op^.optype in [cgByte,cgUByte,cgWord,cgUWord]) and
|
|||||||
if num > 0 then begin
|
if num > 0 then begin
|
||||||
GenLab(lab1);
|
GenLab(lab1);
|
||||||
GenNative(m_brl, longrelative, lb, nil, 0);
|
GenNative(m_brl, longrelative, lb, nil, 0);
|
||||||
|
GenLab(lab2);
|
||||||
end {if}
|
end {if}
|
||||||
else begin
|
else begin
|
||||||
GenNative(m_brl, longrelative, lb, nil, 0);
|
GenNative(m_brl, longrelative, lb, nil, 0);
|
||||||
|
GenLab(lab2);
|
||||||
GenLab(lab1);
|
GenLab(lab1);
|
||||||
end; {else}
|
end; {else}
|
||||||
GenLab(lab2);
|
|
||||||
end; {else if}
|
end; {else if}
|
||||||
end {if}
|
end {if}
|
||||||
else {if optype in [cgUByte,cgUWord] then} begin
|
else {if optype in [cgUByte,cgUWord] then} begin
|
||||||
@ -1273,9 +1274,9 @@ else
|
|||||||
else
|
else
|
||||||
GenNative(m_bcc, relative, lab2, nil, 0);
|
GenNative(m_bcc, relative, lab2, nil, 0);
|
||||||
GenNative(m_brl, longrelative, lb, nil, 0);
|
GenNative(m_brl, longrelative, lb, nil, 0);
|
||||||
|
GenLab(lab2);
|
||||||
if op^.opcode = pc_grt then
|
if op^.opcode = pc_grt then
|
||||||
GenLab(lab3);
|
GenLab(lab3);
|
||||||
GenLab(lab2);
|
|
||||||
end {else if}
|
end {else if}
|
||||||
else begin
|
else begin
|
||||||
lab2 := GenLabel;
|
lab2 := GenLabel;
|
||||||
|
Loading…
Reference in New Issue
Block a user