mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 13:09:32 +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 not avr}
|
||||
{$ifdef mips}
|
||||
{ MIPS conditional instructions conntain the
|
||||
computation of the condition itself, so
|
||||
changing the instruction to unconditional
|
||||
should never be done. }
|
||||
{ MIPS conditional jump instructions also conntain register
|
||||
operands. A proper implementation is needed here. }
|
||||
internalerror(2020071301);
|
||||
{$endif}
|
||||
end;
|
||||
@ -1948,11 +1946,6 @@ Unit AoptObj;
|
||||
NCJLabel: TAsmLabel;
|
||||
begin
|
||||
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
|
||||
begin
|
||||
StripDeadLabels(hp1, hp1);
|
||||
@ -2070,6 +2063,11 @@ Unit AoptObj;
|
||||
end
|
||||
else
|
||||
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:
|
||||
jmp<cond1> @Lbl1
|
||||
jmp<cond2> @Lbl2
|
||||
|
Loading…
Reference in New Issue
Block a user