浏览代码

* MM registers which might not be changed can be still used in 3 op mathematical operations as source

git-svn-id: trunk@43509 -
florian 5 年之前
父节点
当前提交
91f3f022fe
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/x86/nx86add.pas

+ 1 - 1
compiler/x86/nx86add.pas

@@ -1107,7 +1107,7 @@ unit nx86add;
               mms_movescalar);
               mms_movescalar);
           end
           end
         { we can use only right as left operand if the operation is commutative }
         { we can use only right as left operand if the operation is commutative }
-        else if (right.location.loc=LOC_MMREGISTER) and (op in [OP_ADD,OP_MUL]) then
+        else if (right.location.loc in [LOC_MMREGISTER,LOC_CMMREGISTER]) and (op in [OP_ADD,OP_MUL]) then
           begin
           begin
             location.register:=cg.getmmregister(current_asmdata.CurrAsmList,left.location.size);
             location.register:=cg.getmmregister(current_asmdata.CurrAsmList,left.location.size);
             { force floating point reg. location to be written to memory,
             { force floating point reg. location to be written to memory,