mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 12:40:25 +02:00
parent
2240c69078
commit
44051b4af3
@ -9078,6 +9078,7 @@ unit aoptx86;
|
|||||||
if (l<=4) and (l>0) then
|
if (l<=4) and (l>0) then
|
||||||
begin
|
begin
|
||||||
condition:=inverse_cond(taicpu(p).condition);
|
condition:=inverse_cond(taicpu(p).condition);
|
||||||
|
UpdateUsedRegs(tai(p.next));
|
||||||
GetNextInstruction(p,hp1);
|
GetNextInstruction(p,hp1);
|
||||||
repeat
|
repeat
|
||||||
if not Assigned(hp1) then
|
if not Assigned(hp1) then
|
||||||
@ -9085,7 +9086,7 @@ unit aoptx86;
|
|||||||
|
|
||||||
taicpu(hp1).opcode:=A_CMOVcc;
|
taicpu(hp1).opcode:=A_CMOVcc;
|
||||||
taicpu(hp1).condition:=condition;
|
taicpu(hp1).condition:=condition;
|
||||||
UpdateUsedRegs(hp1);
|
UpdateUsedRegs(tai(hp1.next));
|
||||||
GetNextInstruction(hp1,hp1);
|
GetNextInstruction(hp1,hp1);
|
||||||
until not(CanBeCMOV(hp1));
|
until not(CanBeCMOV(hp1));
|
||||||
|
|
||||||
@ -9127,6 +9128,7 @@ unit aoptx86;
|
|||||||
{ Remove the original jump }
|
{ Remove the original jump }
|
||||||
RemoveInstruction(p); { Note, the choice to not use RemoveCurrentp is deliberate }
|
RemoveInstruction(p); { Note, the choice to not use RemoveCurrentp is deliberate }
|
||||||
|
|
||||||
|
UpdateUsedRegs(tai(hp2.next));
|
||||||
GetNextInstruction(hp2, p); { Instruction after the label }
|
GetNextInstruction(hp2, p); { Instruction after the label }
|
||||||
|
|
||||||
{ Remove the label if this is its final reference }
|
{ Remove the label if this is its final reference }
|
||||||
@ -9134,10 +9136,7 @@ unit aoptx86;
|
|||||||
StripLabelFast(hp1);
|
StripLabelFast(hp1);
|
||||||
|
|
||||||
if Assigned(p) then
|
if Assigned(p) then
|
||||||
begin
|
result:=true;
|
||||||
UpdateUsedRegs(p);
|
|
||||||
result:=true;
|
|
||||||
end;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -9187,29 +9186,33 @@ unit aoptx86;
|
|||||||
FindLabel(tasmlabel(taicpu(hp2).oper[0]^.ref^.symbol),hp1) then
|
FindLabel(tasmlabel(taicpu(hp2).oper[0]^.ref^.symbol),hp1) then
|
||||||
begin
|
begin
|
||||||
condition:=inverse_cond(taicpu(p).condition);
|
condition:=inverse_cond(taicpu(p).condition);
|
||||||
|
UpdateUsedRegs(tai(p.next));
|
||||||
GetNextInstruction(p,hp1);
|
GetNextInstruction(p,hp1);
|
||||||
repeat
|
repeat
|
||||||
taicpu(hp1).opcode:=A_CMOVcc;
|
taicpu(hp1).opcode:=A_CMOVcc;
|
||||||
taicpu(hp1).condition:=condition;
|
taicpu(hp1).condition:=condition;
|
||||||
UpdateUsedRegs(hp1);
|
UpdateUsedRegs(tai(hp1.next));
|
||||||
GetNextInstruction(hp1,hp1);
|
GetNextInstruction(hp1,hp1);
|
||||||
until not(assigned(hp1)) or
|
until not(assigned(hp1)) or
|
||||||
not(CanBeCMOV(hp1));
|
not(CanBeCMOV(hp1));
|
||||||
|
|
||||||
condition:=inverse_cond(condition);
|
condition:=inverse_cond(condition);
|
||||||
|
if GetLastInstruction(hpmov2,hp1) then
|
||||||
|
UpdateUsedRegs(tai(hp1.next));
|
||||||
hp1 := hpmov2;
|
hp1 := hpmov2;
|
||||||
{ hp1 is now at <several movs 2> }
|
{ hp1 is now at <several movs 2> }
|
||||||
while Assigned(hp1) and CanBeCMOV(hp1) do
|
while Assigned(hp1) and CanBeCMOV(hp1) do
|
||||||
begin
|
begin
|
||||||
taicpu(hp1).opcode:=A_CMOVcc;
|
taicpu(hp1).opcode:=A_CMOVcc;
|
||||||
taicpu(hp1).condition:=condition;
|
taicpu(hp1).condition:=condition;
|
||||||
UpdateUsedRegs(hp1);
|
UpdateUsedRegs(tai(hp1.next));
|
||||||
GetNextInstruction(hp1,hp1);
|
GetNextInstruction(hp1,hp1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
hp1 := p;
|
hp1 := p;
|
||||||
|
|
||||||
{ Get first instruction after label }
|
{ Get first instruction after label }
|
||||||
|
UpdateUsedRegs(tai(hp3.next));
|
||||||
GetNextInstruction(hp3, p);
|
GetNextInstruction(hp3, p);
|
||||||
|
|
||||||
if assigned(p) and (hp3.typ = ait_align) then
|
if assigned(p) and (hp3.typ = ait_align) then
|
||||||
@ -9244,10 +9247,7 @@ unit aoptx86;
|
|||||||
StripLabelFast(hp3);
|
StripLabelFast(hp3);
|
||||||
|
|
||||||
if Assigned(p) then
|
if Assigned(p) then
|
||||||
begin
|
result:=true;
|
||||||
UpdateUsedRegs(p);
|
|
||||||
result:=true;
|
|
||||||
end;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user