Updated localalign values, and changed the behaviour of alignment of load/stores to not break aligned half-word copies

git-svn-id: branches/laksen/arm-embedded@22828 -
This commit is contained in:
Jeppe Johansen 2012-10-23 12:45:40 +00:00
parent bd87c854c1
commit 818b43c060
2 changed files with 10 additions and 4 deletions

View File

@ -2213,6 +2213,12 @@ unit cgcpu;
a_load_ref_reg(list,OS_32,OS_32,source,tmpreg);
a_load_reg_ref(list,OS_32,OS_32,tmpreg,dest);
end
else if aligned and (len=2) then
begin
tmpreg:=getintregister(list,OS_16);
a_load_ref_reg(list,OS_16,OS_16,source,tmpreg);
a_load_reg_ref(list,OS_16,OS_16,tmpreg,dest);
end
else if (len<=helpsize) and aligned then
begin
tmpregi:=0;
@ -2337,8 +2343,8 @@ unit cgcpu;
procedure tcgarm.g_concatcopy(list : TAsmList;const source,dest : treference;len : tcgint);
begin
if (source.alignment in [1..3]) or
(dest.alignment in [1..3]) then
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);

View File

@ -79,8 +79,8 @@ unit i_embed;
constalignmax : 4;
varalignmin : 0;
varalignmax : 4;
localalignmin : 4;
localalignmax : 8;
localalignmin : 0;
localalignmax : 4;
recordalignmin : 0;
recordalignmax : 4;
maxCrecordalign : 4