mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 12:29:25 +02:00
* TAOptObj.MakeUnconditional: Set as internal error for MIPS cpu:
MIPS conditional instructions conntain the computation of the condition itself, so changing the instruction to unconditional should never be done. * TAOptObj.OptimizeConditionalJump: Return false early if the conditional instruction has more than one operand. git-svn-id: trunk@45782 -
This commit is contained in:
parent
8cf26b7a0f
commit
cca536a86a
@ -1635,6 +1635,13 @@ Unit AoptObj;
|
||||
p.ops:=2;
|
||||
{$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. }
|
||||
internalerror(2020071301);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
@ -1937,6 +1944,14 @@ 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
|
||||
(taicpu(hp1).ops>1)) then
|
||||
begin
|
||||
stoploop:=false;
|
||||
exit;
|
||||
end;
|
||||
while (hp1 <> BlockEnd) do
|
||||
begin
|
||||
StripDeadLabels(hp1, hp1);
|
||||
|
Loading…
Reference in New Issue
Block a user