浏览代码

Add missing size postfix to VNEG VFP instruction.

git-svn-id: branches/laksen/armiw@29436 -
Jeppe Johansen 10 年之前
父节点
当前提交
db401f0371
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. 9 2
      compiler/arm/narmmat.pas

+ 9 - 2
compiler/arm/narmmat.pas

@@ -411,6 +411,7 @@ implementation
     procedure tarmunaryminusnode.second_float;
     procedure tarmunaryminusnode.second_float;
       var
       var
         op: tasmop;
         op: tasmop;
+        pf: TOpPostfix;
       begin
       begin
         secondpass(left);
         secondpass(left);
         case current_settings.fputype of
         case current_settings.fputype of
@@ -432,8 +433,14 @@ implementation
               location:=left.location;
               location:=left.location;
               if (left.location.loc=LOC_CMMREGISTER) then
               if (left.location.loc=LOC_CMMREGISTER) then
                 location.register:=cg.getmmregister(current_asmdata.CurrAsmList,location.size);
                 location.register:=cg.getmmregister(current_asmdata.CurrAsmList,location.size);
-              current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_VNEG,
-                location.register,left.location.register));
+
+              if (tfloatdef(left.resultdef).floattype=s32real) then
+                pf:=PF_F32
+              else
+                pf:=PF_F64;
+
+              current_asmdata.CurrAsmList.concat(setoppostfix(taicpu.op_reg_reg(A_VNEG,
+                location.register,left.location.register), pf));
             end;
             end;
           fpu_fpv4_s16:
           fpu_fpv4_s16:
             begin
             begin