瀏覽代碼

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 5 年之前
父節點
當前提交
7f96a26de0
共有 1 個文件被更改,包括 4 次插入1 次删除
  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);