浏览代码

* tmipsaddnode.second_addfloat: don't bother reusing locations, always allocate a new register for result.

git-svn-id: trunk@25857 -
sergei 11 年之前
父节点
当前提交
fbf6192aff
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      compiler/mips/ncpuadd.pas

+ 2 - 5
compiler/mips/ncpuadd.pas

@@ -220,13 +220,10 @@ begin
         { force fpureg as location, left right doesn't matter
           as both will be in a fpureg }
   location_force_fpureg(current_asmdata.CurrAsmList, left.location, True);
-  location_force_fpureg(current_asmdata.CurrAsmList, right.location, (left.location.loc <> LOC_CFPUREGISTER));
+  location_force_fpureg(current_asmdata.CurrAsmList, right.location, True);
 
   location_reset(location, LOC_FPUREGISTER, def_cgsize(resultdef));
-  if left.location.loc <> LOC_CFPUREGISTER then
-    location.Register := left.location.Register
-  else
-    location.Register := right.location.Register;
+  location.register:=cg.getfpuregister(current_asmdata.CurrAsmList,location.size);
 
   case nodetype of
     addn: