Browse Source

* gen_load_cgpara_loc, MIPS-specific: added missing calls to unget_para, and disabled part that loads upper and lower halves of Double values from integer registers. It produces invalid code, but that's hidden by MIPS code generator copying all parameters to stack (so this code is never executed).

git-svn-id: trunk@23622 -
sergei 12 years ago
parent
commit
54aefb1ba0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      compiler/ncgutil.pas

+ 6 - 0
compiler/ncgutil.pas

@@ -1069,8 +1069,11 @@ implementation
                  (paraloc^.Loc in [LOC_REGISTER,LOC_CREGISTER]) then
                 begin
                   gen_alloc_regloc(list,destloc);
+                  unget_para(paraloc^);
                   list.Concat(taicpu.op_reg_reg(A_MTC1,paraloc^.register,destloc.register));
                 end
+{ TODO: Produces invalid code, needs fixing together with regalloc setup. }
+{
               else if (destloc.size = OS_F64) and
                       (paraloc^.Loc in [LOC_REGISTER,LOC_CREGISTER]) and
                       (paraloc^.next^.Loc in [LOC_REGISTER,LOC_CREGISTER]) then
@@ -1078,10 +1081,13 @@ implementation
                   gen_alloc_regloc(list,destloc);
 
                   tmpreg:=destloc.register;
+                  unget_para(paraloc^);
                   list.Concat(taicpu.op_reg_reg(A_MTC1,paraloc^.register,tmpreg));
                   setsupreg(tmpreg,getsupreg(tmpreg)+1);
+                  unget_para(paraloc^.next^);
                   list.Concat(taicpu.op_reg_reg(A_MTC1,paraloc^.Next^.register,tmpreg));
                 end
+}
               else
                 begin
                   sizeleft := TCGSize2Size[destloc.size];