Browse Source

* Xtensa: MatchInstruction requires a postfix parameter

git-svn-id: trunk@45674 -
florian 5 years ago
parent
commit
221d8d84ae
1 changed files with 4 additions and 3 deletions
  1. 4 3
      compiler/xtensa/aoptcpu.pas

+ 4 - 3
compiler/xtensa/aoptcpu.pas

@@ -91,11 +91,12 @@ Implementation
     end;
     end;
 
 
 
 
-  function MatchInstruction(const instr: tai; const op: TAsmOp): boolean;
+  function MatchInstruction(const instr: tai; const op: TAsmOp; const postfix: TOpPostfixes): boolean;
     begin
     begin
       result :=
       result :=
         (instr.typ = ait_instruction) and
         (instr.typ = ait_instruction) and
-        (taicpu(instr).opcode = op);
+        (taicpu(instr).opcode = op) and
+        ((postfix = []) or (taicpu(instr).oppostfix in postfix));
     end;
     end;
 
 
 
 
@@ -190,7 +191,7 @@ Implementation
       hp1 : tai;
       hp1 : tai;
     begin
     begin
       Result:=false;
       Result:=false;
-      if MatchInstruction(movp, A_MOV) and
+      if MatchInstruction(movp, A_MOV, [PF_None,PF_N]) and
         (taicpu(p).ops>=3) and
         (taicpu(p).ops>=3) and
         { We can't optimize if there is a shiftop }
         { We can't optimize if there is a shiftop }
         (taicpu(movp).ops=2) and
         (taicpu(movp).ops=2) and