Browse Source

- removed changes from r20660 (ARM hard float patch): ARM VFP regvars are
in LOC_CMMREGISTER, not in LOC_CFPUREGISTER (and they also are there in
case the softfp calling convention is used), and this change broke SPARC

git-svn-id: trunk@20667 -

Jonas Maebe 13 years ago
parent
commit
39242c2cfa
1 changed files with 15 additions and 18 deletions
  1. 15 18
      compiler/ncgutil.pas

+ 15 - 18
compiler/ncgutil.pas

@@ -1997,25 +1997,22 @@ implementation
           LOC_CFPUREGISTER :
             begin
 {$if defined(sparc) or defined(arm)}
-              { Arm (with softfloat ABI) and Sparc passes floats in int registers, 
-                when loading to fpu register we need a temp }
-              if (paraloc^.loc = LOC_REGISTER) then 
+              { Arm and Sparc passes floats in int registers, when loading to fpu register
+                we need a temp }
+              sizeleft := TCGSize2Size[destloc.size];
+              tg.GetTemp(list,sizeleft,sizeleft,tt_normal,tempref);
+              href:=tempref;
+              while assigned(paraloc) do
                 begin
-                  sizeleft := TCGSize2Size[destloc.size];
-                  tg.GetTemp(list,sizeleft,sizeleft,tt_normal,tempref);
-                  href:=tempref;
-                  while assigned(paraloc) do
-                    begin
-                      unget_para(paraloc^);
-                      cg.a_load_cgparaloc_ref(list,paraloc^,href,sizeleft,destloc.reference.alignment);
-                      inc(href.offset,TCGSize2Size[paraloc^.size]);
-                      dec(sizeleft,TCGSize2Size[paraloc^.size]);
-                      paraloc:=paraloc^.next;
-                    end;
-                  gen_alloc_regloc(list,destloc);
-                  cg.a_loadfpu_ref_reg(list,destloc.size,destloc.size,tempref,destloc.register);
-                  tg.UnGetTemp(list,tempref);
-               end;
+                  unget_para(paraloc^);
+                  cg.a_load_cgparaloc_ref(list,paraloc^,href,sizeleft,destloc.reference.alignment);
+                  inc(href.offset,TCGSize2Size[paraloc^.size]);
+                  dec(sizeleft,TCGSize2Size[paraloc^.size]);
+                  paraloc:=paraloc^.next;
+                end;
+              gen_alloc_regloc(list,destloc);
+              cg.a_loadfpu_ref_reg(list,destloc.size,destloc.size,tempref,destloc.register);
+              tg.UnGetTemp(list,tempref);
 {$else sparc}
               unget_para(paraloc^);
               gen_alloc_regloc(list,destloc);