mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 16:49:20 +02:00
* use the size of the generated anonymous record instead of the manual tracked size so that any padding is picked up as well
git-svn-id: trunk@42521 -
This commit is contained in:
parent
8fc5c9edb2
commit
0b3418e978
@ -1814,7 +1814,6 @@ implementation
|
|||||||
arglab : tasmlabel;
|
arglab : tasmlabel;
|
||||||
argdef : tdef;
|
argdef : tdef;
|
||||||
i : sizeint;
|
i : sizeint;
|
||||||
arglen : word;
|
|
||||||
begin
|
begin
|
||||||
if length(attr.paras)=0 then
|
if length(attr.paras)=0 then
|
||||||
begin
|
begin
|
||||||
@ -1830,7 +1829,6 @@ implementation
|
|||||||
argtcb.begin_anonymous_record('',defaultpacking,min(reqalign,SizeOf(PInt)),
|
argtcb.begin_anonymous_record('',defaultpacking,min(reqalign,SizeOf(PInt)),
|
||||||
targetinfos[target_info.system]^.alignment.recordalignmin);
|
targetinfos[target_info.system]^.alignment.recordalignmin);
|
||||||
|
|
||||||
arglen:=0;
|
|
||||||
for i:=0 to High(attr.paras) do
|
for i:=0 to High(attr.paras) do
|
||||||
begin
|
begin
|
||||||
case attr.paras[i].nodetype of
|
case attr.paras[i].nodetype of
|
||||||
@ -1840,9 +1838,9 @@ implementation
|
|||||||
stringconstn,
|
stringconstn,
|
||||||
pointerconstn,
|
pointerconstn,
|
||||||
guidconstn:
|
guidconstn:
|
||||||
inc(arglen,tconstnode(attr.paras[i]).emit_data(argtcb));
|
tconstnode(attr.paras[i]).emit_data(argtcb);
|
||||||
setconstn:
|
setconstn:
|
||||||
inc(arglen,tsetconstnode(attr.paras[i]).emit_data(argtcb));
|
tsetconstnode(attr.paras[i]).emit_data(argtcb);
|
||||||
else
|
else
|
||||||
internalerror(2019070803);
|
internalerror(2019070803);
|
||||||
end;
|
end;
|
||||||
@ -1857,7 +1855,7 @@ implementation
|
|||||||
argtcb.free;
|
argtcb.free;
|
||||||
|
|
||||||
{ write argument size and the reference to the argument entry }
|
{ write argument size and the reference to the argument entry }
|
||||||
tbltcb.emit_ord_const(arglen,u16inttype);
|
tbltcb.emit_ord_const(argdef.size,u16inttype);
|
||||||
tbltcb.emit_tai(Tai_const.Create_sym(arglab),voidpointertype);
|
tbltcb.emit_tai(Tai_const.Create_sym(arglab),voidpointertype);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user