Browse Source

* is_ecx_used modified to only check the callee side, but after a call to
init_paraloc_info to ensure that the callee side paraloc info is created.

git-svn-id: trunk@26103 -

nickysn 11 years ago
parent
commit
85e1f444c5
1 changed files with 2 additions and 9 deletions
  1. 2 9
      compiler/i386/cgcpu.pas

+ 2 - 9
compiler/i386/cgcpu.pas

@@ -648,21 +648,14 @@ unit cgcpu;
           i: Integer;
           hp: tparavarsym;
           paraloc: PCGParaLocation;
-          side: tcallercallee;
         begin
           if not (RS_ECX in paramanager.get_volatile_registers_int(procdef.proccalloption)) then
             exit(true);
           for i:=0 to procdef.paras.count-1 do
            begin
              hp:=tparavarsym(procdef.paras[i]);
-             if procdef.has_paraloc_info in [calleeside,callbothsides] then
-               side:=calleeside
-             { in the case of virtual abstract methods, we only have callerside }
-             else if procdef.has_paraloc_info=callerside then
-               side:=callerside
-             else
-               internalerror(2013111601);
-             paraloc:=hp.paraloc[side].Location;
+             procdef.init_paraloc_info(calleeside);
+             paraloc:=hp.paraloc[calleeside].Location;
              while paraloc<>nil do
                begin
                  if (paraloc^.Loc=LOC_REGISTER) and (getsupreg(paraloc^.register)=RS_ECX) then