m68k: in g_concatcopy, check the actual alignment of references being copied rather than always excluding word and dword sized direct copies on a 68000

git-svn-id: trunk@47744 -
This commit is contained in:
Károly Balogh 2020-12-10 04:17:06 +00:00
parent 7f2c8857da
commit 7f96a26de0

View File

@ -1737,7 +1737,10 @@ unit cgcpu;
srcrefp,dstrefp : treference;
srcref,dstref : treference;
begin
if (len = 1) or ((len in [2,4]) and (current_settings.cputype <> cpu_mc68000)) then
if (len = 1) or
((len in [2,4]) and
not needs_unaligned(source.alignment,lentocgsize[len]) and
not needs_unaligned(dest.alignment,lentocgsize[len])) then
begin
//list.concat(tai_comment.create(strpnew('g_concatcopy: small')));
a_load_ref_ref(list,lentocgsize[len],lentocgsize[len],source,dest);