Bladeren bron

Disable three operand overload of MatchOpType for avr and jvm targets, which only have 2 operands max

git-svn-id: trunk@40170 -
pierre 6 jaren geleden
bovenliggende
commit
2a9ce2ed6c
1 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. 12 0
      compiler/aoptutils.pas

+ 12 - 0
compiler/aoptutils.pas

@@ -24,6 +24,14 @@ unit aoptutils;
 
 {$i fpcdefs.inc}
 
+{$ifdef avr}
+  {$define MAXOPTS_2}
+{$endif}
+
+{$ifdef jvm}
+  {$define MAXOPTS_2}
+{$endif}
+
   interface
 
     uses
@@ -31,7 +39,9 @@ unit aoptutils;
 
     function MatchOpType(const p : taicpu;type0: toptype) : Boolean;
     function MatchOpType(const p : taicpu;type0,type1 : toptype) : Boolean;
+{$ifndef MAXOPTS_2}
     function MatchOpType(const p : taicpu; type0,type1,type2 : toptype) : Boolean;
+{$endif ndef MAXOPTS_2}
 
     { skips all labels and returns the next "real" instruction }
     function SkipLabels(hp: tai; var hp2: tai): boolean;
@@ -50,10 +60,12 @@ unit aoptutils;
       end;
 
 
+{$ifndef MAXOPTS_2}
     function MatchOpType(const p : taicpu; type0,type1,type2 : toptype) : Boolean;
       begin
         Result:=(p.ops=3) and (p.oper[0]^.typ=type0) and (p.oper[1]^.typ=type1) and (p.oper[2]^.typ=type1);
       end;
+{$endif ndef MAXOPTS_2}
 
 
     { skips all labels and returns the next "real" instruction }