mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 07:04:02 +02:00
* Re-enabled safe generic jump optimizations for mips.
git-svn-id: trunk@45873 -
This commit is contained in:
parent
0b5c50ea41
commit
2b86651914
@ -1636,10 +1636,8 @@ Unit AoptObj;
|
|||||||
{$endif}
|
{$endif}
|
||||||
{$endif not avr}
|
{$endif not avr}
|
||||||
{$ifdef mips}
|
{$ifdef mips}
|
||||||
{ MIPS conditional instructions conntain the
|
{ MIPS conditional jump instructions also conntain register
|
||||||
computation of the condition itself, so
|
operands. A proper implementation is needed here. }
|
||||||
changing the instruction to unconditional
|
|
||||||
should never be done. }
|
|
||||||
internalerror(2020071301);
|
internalerror(2020071301);
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
@ -1948,11 +1946,6 @@ Unit AoptObj;
|
|||||||
NCJLabel: TAsmLabel;
|
NCJLabel: TAsmLabel;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
{ Do not try to optimize if the test generating the condition
|
|
||||||
is the same instruction, like 'bne $v0,$zero,.Lj3' for MIPS }
|
|
||||||
if (taicpu(p).ops>1) or ((hp1.typ=ait_instruction) and
|
|
||||||
IsJumpToLabel(taicpu(hp1)) and (taicpu(hp1).ops>1)) then
|
|
||||||
exit;
|
|
||||||
while (hp1 <> BlockEnd) do
|
while (hp1 <> BlockEnd) do
|
||||||
begin
|
begin
|
||||||
StripDeadLabels(hp1, hp1);
|
StripDeadLabels(hp1, hp1);
|
||||||
@ -2070,6 +2063,11 @@ Unit AoptObj;
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
{ Do not try to optimize if the test generating the condition
|
||||||
|
is the same instruction, like 'bne $v0,$zero,.Lj3' for MIPS }
|
||||||
|
if (taicpu(p).ops>1) or (taicpu(hp1).ops>1) then
|
||||||
|
exit;
|
||||||
|
|
||||||
{ Check for:
|
{ Check for:
|
||||||
jmp<cond1> @Lbl1
|
jmp<cond1> @Lbl1
|
||||||
jmp<cond2> @Lbl2
|
jmp<cond2> @Lbl2
|
||||||
|
Loading…
Reference in New Issue
Block a user