Selaa lähdekoodia

* fix X86AsmOptimizer.RegModifiedByInstruction for VMOVSS/VMOVSD/IMUL

git-svn-id: trunk@43874 -
florian 5 vuotta sitten
vanhempi
commit
9b68c7a5f5
1 muutettua tiedostoa jossa 12 lisäystä ja 1 poistoa
  1. 12 1
      compiler/x86/aoptx86.pas

+ 12 - 1
compiler/x86/aoptx86.pas

@@ -638,8 +638,19 @@ unit aoptx86;
               begin
               begin
                 if taicpu(p1).ops<>2 then
                 if taicpu(p1).ops<>2 then
                   internalerror(2017042703);
                   internalerror(2017042703);
-                Result := (taicpu(p1).oper[1]^.typ=top_reg) and reginop(reg,taicpu(p1).oper[1]^);
+                Result := (taicpu(p1).oper[1]^.typ=top_reg) and RegInOp(reg,taicpu(p1).oper[1]^);
               end;
               end;
+          {  VMOVSS and VMOVSD has two and three operand flavours, this cannot modelled by x86ins.dat
+             so fix it here (FK)
+          }
+          A_VMOVSS,
+          A_VMOVSD:
+            begin
+              Result := (taicpu(p1).ops=3) and (taicpu(p1).oper[2]^.typ=top_reg) and RegInOp(reg,taicpu(p1).oper[2]^);
+              exit;
+            end;
+          A_IMUL:
+            Result := (taicpu(p1).oper[taicpu(p1).ops-1]^.typ=top_reg) and RegInOp(reg,taicpu(p1).oper[taicpu(p1).ops-1]^);
           else
           else
             ;
             ;
         end;
         end;