Browse Source

* pass S_NO instead of S_XMM to *SQRTSS/SD as size as the memory location is 32/64 bit

git-svn-id: trunk@34540 -
florian 8 years ago
parent
commit
e5f63779bb
1 changed files with 5 additions and 4 deletions
  1. 5 4
      compiler/x86/nx86inl.pas

+ 5 - 4
compiler/x86/nx86inl.pas

@@ -527,18 +527,19 @@ implementation
              if UseAVX then
              if UseAVX then
                case tfloatdef(resultdef).floattype of
                case tfloatdef(resultdef).floattype of
                  s32real:
                  s32real:
-                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSS,S_XMM,left.location.register,location.register,location.register));
+                   { we use S_NO instead of S_XMM here, regardless of the register size, as the size of the memory location is 32/64 bit }
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSS,S_NO,left.location.register,location.register,location.register));
                  s64real:
                  s64real:
-                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSD,S_XMM,left.location.register,location.register,location.register));
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSD,S_NO,left.location.register,location.register,location.register));
                  else
                  else
                    internalerror(200510031);
                    internalerror(200510031);
                end
                end
              else
              else
                case tfloatdef(resultdef).floattype of
                case tfloatdef(resultdef).floattype of
                  s32real:
                  s32real:
-                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_SQRTSS,S_XMM,left.location.register,location.register));
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_SQRTSS,S_NO,left.location.register,location.register));
                  s64real:
                  s64real:
-                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_SQRTSD,S_XMM,left.location.register,location.register));
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg(A_SQRTSD,S_NO,left.location.register,location.register));
                  else
                  else
                    internalerror(200510031);
                    internalerror(200510031);
                end;
                end;