Ver código fonte

* try to break dependency chains when generating vsqrt instructions

git-svn-id: trunk@36282 -
florian 8 anos atrás
pai
commit
12dec14859
1 arquivos alterados com 5 adições e 2 exclusões
  1. 5 2
      compiler/x86/nx86inl.pas

+ 5 - 2
compiler/x86/nx86inl.pas

@@ -543,9 +543,12 @@ implementation
                case tfloatdef(resultdef).floattype of
                case tfloatdef(resultdef).floattype of
                  s32real:
                  s32real:
                    { 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 }
                    { 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));
+                   { using left.location.register here as 2nd parameter is crucial to break dependency chains }
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSS,S_NO,left.location.register,left.location.register,location.register));
                  s64real:
                  s64real:
-                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSD,S_NO,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 }
+                   { using left.location.register here as 2nd parameter is crucial to break dependency chains }
+                   current_asmdata.CurrAsmList.concat(taicpu.op_reg_reg_reg(A_VSQRTSD,S_NO,left.location.register,left.location.register,location.register));
                  else
                  else
                    internalerror(200510031);
                    internalerror(200510031);
                end
                end