瀏覽代碼

Merged revisions 8058 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r8058 | daniel | 2007-07-14 23:29:57 +0200 (Sat, 14 Jul 2007) | 3 lines

+ Change constants in g_concatcopy to make the right decisions on x86_64.
* Fix move copy in g_concatcopy for x86_64.

........

git-svn-id: branches/fixes_2_2@8238 -

peter 18 年之前
父節點
當前提交
e680cfe19b
共有 1 個文件被更改,包括 11 次插入3 次删除
  1. 11 3
      compiler/x86/cgx86.pas

+ 11 - 3
compiler/x86/cgx86.pas

@@ -1567,9 +1567,9 @@ unit cgx86;
 
     begin
       cm:=copy_move;
-      helpsize:=12;
+      helpsize:=3*sizeof(aword);
       if cs_opt_size in current_settings.optimizerswitches then
-        helpsize:=8;
+        helpsize:=2*sizeof(aword);
       if (cs_mmx in current_settings.localswitches) and
          not(pi_uses_fpu in current_procinfo.flags) and
          ((len=8) or (len=16) or (len=24) or (len=32)) then
@@ -1602,7 +1602,15 @@ unit cgx86;
                   begin
                     copysize:=4;
                     cgsize:=OS_32;
-                  end;
+                  end
+{$ifdef cpu64bit}
+                else if len<16 then
+                  begin
+                    copysize:=8;
+                    cgsize:=OS_64;
+                  end
+{$endif}
+                ;
                 dec(len,copysize);
                 r:=getintregister(list,cgsize);
                 a_load_ref_reg(list,cgsize,cgsize,srcref,r);