فهرست منبع

* Tcgx86.g_concatcopy use: copy_move (mov sequence) instead of copy_string (rep
movsb) when copying a 4 byte block on i8086, when optimizing for size. 4 movs
are usually shorter than the instructions needed to setup rep movsb and also
greatly reduce register pressure. This fixes i8086 snapshot building with -Os,
Mantis #27387

git-svn-id: trunk@29639 -

nickysn 10 سال پیش
والد
کامیت
2d3ab816b0
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      compiler/x86/cgx86.pas

+ 2 - 1
compiler/x86/cgx86.pas

@@ -2283,7 +2283,8 @@ unit cgx86;
         REGCX=NR_CX;
         REGCX=NR_CX;
         REGSI=NR_SI;
         REGSI=NR_SI;
         REGDI=NR_DI;
         REGDI=NR_DI;
-        copy_len_sizes = [1, 2];
+        copy_len_sizes = [1, 2, 4]; { 4 is included here, because it's still more
+          efficient to use copy_move instead of copy_string for copying 4 bytes }
         push_segment_size = S_W;
         push_segment_size = S_W;
 {$endif}
 {$endif}