* 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 -
This commit is contained in:
nickysn 2013-11-17 15:46:56 +00:00
parent f19d65118d
commit 85e1f444c5

View File

@ -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