* fixed copying of unaligned value parameters

git-svn-id: trunk@3369 -
This commit is contained in:
florian 2006-04-29 20:13:57 +00:00
parent f72f9c70eb
commit 13493a5355
3 changed files with 12 additions and 4 deletions

View File

@ -1531,6 +1531,10 @@ unit cgcpu;
procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : aint);
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);
end;

View File

@ -850,7 +850,11 @@ implementation
cg.g_copyshortstring(list,href,localcopyloc.reference,tstringdef(tparavarsym(p).vartype.def).len)
end
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);
end;
{ update localloc of varsym }
tg.Ungetlocal(list,tparavarsym(p).localloc.reference);
tparavarsym(p).localloc:=localcopyloc;