mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 13:29:14 +02:00
* fixed copying of unaligned value parameters
git-svn-id: trunk@3369 -
This commit is contained in:
parent
f72f9c70eb
commit
13493a5355
@ -1531,6 +1531,10 @@ unit cgcpu;
|
|||||||
|
|
||||||
procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
|
procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
|
||||||
begin
|
begin
|
||||||
|
if (source.alignment in [1..3]) or
|
||||||
|
(dest.alignment in [1..3]) then
|
||||||
|
g_concatcopy_internal(list,source,dest,len,false)
|
||||||
|
else
|
||||||
g_concatcopy_internal(list,source,dest,len,true);
|
g_concatcopy_internal(list,source,dest,len,true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -850,7 +850,11 @@ implementation
|
|||||||
cg.g_copyshortstring(list,href,localcopyloc.reference,tstringdef(tparavarsym(p).vartype.def).len)
|
cg.g_copyshortstring(list,href,localcopyloc.reference,tstringdef(tparavarsym(p).vartype.def).len)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
|
{ pass proper alignment info }
|
||||||
|
localcopyloc.reference.alignment:=tparavarsym(p).vartype.def.alignment;
|
||||||
cg.g_concatcopy(list,href,localcopyloc.reference,tparavarsym(p).vartype.def.size);
|
cg.g_concatcopy(list,href,localcopyloc.reference,tparavarsym(p).vartype.def.size);
|
||||||
|
end;
|
||||||
{ update localloc of varsym }
|
{ update localloc of varsym }
|
||||||
tg.Ungetlocal(list,tparavarsym(p).localloc.reference);
|
tg.Ungetlocal(list,tparavarsym(p).localloc.reference);
|
||||||
tparavarsym(p).localloc:=localcopyloc;
|
tparavarsym(p).localloc:=localcopyloc;
|
||||||
|
Loading…
Reference in New Issue
Block a user