mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 21:49:15 +02:00
* do not generate moves unncesssarily in tcgloadparentfpnode.pass_generate_code
git-svn-id: trunk@45162 -
This commit is contained in:
parent
8aacea8850
commit
50c221670f
@ -167,13 +167,17 @@ implementation
|
||||
end
|
||||
else
|
||||
begin
|
||||
currpi:=current_procinfo;
|
||||
location_reset(location,LOC_REGISTER,def_cgsize(parentfpvoidpointertype));
|
||||
location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,parentfpvoidpointertype);
|
||||
currpi:=current_procinfo;
|
||||
{ load framepointer of current proc }
|
||||
hsym:=tparavarsym(currpi.procdef.parast.Find('parentfp'));
|
||||
if not assigned(hsym) then
|
||||
internalerror(200309281);
|
||||
if (currpi.procdef.owner.symtablelevel=parentpd.parast.symtablelevel) and (hsym.localloc.loc in [LOC_REGISTER,LOC_CREGISTER]) then
|
||||
location.register:=hsym.localloc.register
|
||||
else
|
||||
begin
|
||||
location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,parentfpvoidpointertype);
|
||||
hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,parentfpvoidpointertype,parentfpvoidpointertype,hsym.localloc,location.register);
|
||||
{ walk parents }
|
||||
while (currpi.procdef.owner.symtablelevel>parentpd.parast.symtablelevel) do
|
||||
@ -193,6 +197,7 @@ implementation
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user