ソースを参照

* prefer a loadsize of 4 over 8 bytes for packed loads on 64 bit,
because unaligned 8 byte loads are much slower (at least on ppc64)
than unaligned 4 byte loads

git-svn-id: trunk@6744 -

Jonas Maebe 18 年 前
コミット
eae0ba86e7
1 ファイル変更6 行追加1 行削除
  1. 6 1
      compiler/cutils.pas

+ 6 - 1
compiler/cutils.pas

@@ -280,7 +280,12 @@ implementation
            3,5,7,9,10,12,16:
            3,5,7,9,10,12,16:
              result := 2;
              result := 2;
   {$ifdef cpu64bit}
   {$ifdef cpu64bit}
-           11,13,14,15,17..26,28,32:
+           { performance penalty for unaligned 8 byte access is much   }
+           { higher than for unaligned 4 byte access, at least on ppc, }
+           { so use 4 bytes even in some cases where a value could     }
+           { always loaded using a single 8 byte load (e.g. in case of }
+           { 28 bit values)                                            }
+           11,13,14,15,17..32:
              result := 4;
              result := 4;
            else
            else
              result := 8;
              result := 8;