mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 23:42:34 +02:00
* corrected def used for loads of the address of pass-by-reference
parameters git-svn-id: branches/hlcgllvm@26034 -
This commit is contained in:
parent
1df3039424
commit
967354bb4c
@ -256,6 +256,7 @@ implementation
|
|||||||
endrelocatelab,
|
endrelocatelab,
|
||||||
norelocatelab : tasmlabel;
|
norelocatelab : tasmlabel;
|
||||||
paraloc1 : tcgpara;
|
paraloc1 : tcgpara;
|
||||||
|
vd,
|
||||||
pvd : tdef;
|
pvd : tdef;
|
||||||
begin
|
begin
|
||||||
{ we don't know the size of all arrays }
|
{ we don't know the size of all arrays }
|
||||||
@ -452,10 +453,11 @@ implementation
|
|||||||
hregister:=location.register
|
hregister:=location.register
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
hregister:=hlcg.getaddressregister(current_asmdata.CurrAsmList,voidpointertype);
|
vd:=getpointerdef(resultdef);
|
||||||
|
hregister:=hlcg.getaddressregister(current_asmdata.CurrAsmList,vd);
|
||||||
{ we need to load only an address }
|
{ we need to load only an address }
|
||||||
location.size:=OS_ADDR;
|
location.size:=OS_ADDR;
|
||||||
hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,voidpointertype,voidpointertype,location,hregister);
|
hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,vd,vd,location,hregister);
|
||||||
end;
|
end;
|
||||||
{ assume packed records may always be unaligned }
|
{ assume packed records may always be unaligned }
|
||||||
if not(resultdef.typ in [recorddef,objectdef]) or
|
if not(resultdef.typ in [recorddef,objectdef]) or
|
||||||
|
Loading…
Reference in New Issue
Block a user