Procházet zdrojové kódy

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 -
Károly Balogh před 4 roky
rodič
revize
7f96a26de0
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      compiler/m68k/cgcpu.pas

+ 4 - 1
compiler/m68k/cgcpu.pas

@@ -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);