mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 03:29:33 +02:00
* tcgloadparentfpnode.pass_generate_code converted to the high level code
generator. This fixes nested access to parentfp in i8086 memory models where DS<>SS. git-svn-id: trunk@27690 -
This commit is contained in:
parent
a7e5896504
commit
cb33e51425
@ -158,8 +158,8 @@ implementation
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
currpi:=current_procinfo;
|
currpi:=current_procinfo;
|
||||||
location_reset(location,LOC_REGISTER,OS_ADDR);
|
location_reset(location,LOC_REGISTER,def_cgsize(parentfpvoidpointertype));
|
||||||
location.register:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
location.register:=hlcg.getaddressregister(current_asmdata.CurrAsmList,parentfpvoidpointertype);
|
||||||
{ load framepointer of current proc }
|
{ load framepointer of current proc }
|
||||||
hsym:=tparavarsym(currpi.procdef.parast.Find('parentfp'));
|
hsym:=tparavarsym(currpi.procdef.parast.Find('parentfp'));
|
||||||
if not assigned(hsym) then
|
if not assigned(hsym) then
|
||||||
@ -178,8 +178,8 @@ implementation
|
|||||||
if hsym.localloc.loc<>LOC_REFERENCE then
|
if hsym.localloc.loc<>LOC_REFERENCE then
|
||||||
internalerror(200309283);
|
internalerror(200309283);
|
||||||
|
|
||||||
reference_reset_base(href,location.register,hsym.localloc.reference.offset,sizeof(pint));
|
hlcg.reference_reset_base(href,parentfpvoidpointertype,location.register,hsym.localloc.reference.offset,sizeof(pint));
|
||||||
cg.a_load_ref_reg(current_asmdata.CurrAsmList,OS_ADDR,OS_ADDR,href,location.register);
|
hlcg.a_load_ref_reg(current_asmdata.CurrAsmList,parentfpvoidpointertype,parentfpvoidpointertype,href,location.register);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user