* make textrec/filerec unpacked, this improves the code significantly on arm etc.

git-svn-id: trunk@22057 -
This commit is contained in:
florian 2012-08-10 21:17:50 +00:00
parent 2c122a9bf6
commit 49246b6263
3 changed files with 9 additions and 11 deletions

View File

@ -2446,13 +2446,13 @@ implementation
case filetyp of
ft_text :
if target_info.system in [system_x86_64_win64,system_ia64_win64] then
savesize:=634{+8}
savesize:=640
else
savesize:=630{+8};
savesize:=632;
ft_typed,
ft_untyped :
if target_info.system in [system_x86_64_win64,system_ia64_win64] then
savesize:=372
savesize:=376
else
savesize:=368;
end;

View File

@ -23,7 +23,9 @@
const
filerecnamelength = 255;
type
FileRec = Packed Record
{ using packed makes the compiler to generate ugly code on some CPUs, further
using packed causes the compiler to handle arrays of text wrongly, see see tw0754 e.g. on arm }
FileRec = {$ifdef VER2_6} packed {$endif} Record
Handle : THandle;
Mode : longint;
RecSize : SizeInt;

View File

@ -25,7 +25,9 @@ const
type
TLineEndStr = string [3];
TextBuf = array[0..TextRecBufSize-1] of char;
TextRec = Packed Record
{ using packed makes the compiler to generate ugly code on some CPUs, further
using packed causes the compiler to handle arrays of text wrongly, see see tw0754 e.g. on arm }
TextRec = {$ifdef VER2_6} packed {$endif} Record
Handle : THandle;
Mode : longint;
bufsize : SizeInt;
@ -44,11 +46,5 @@ type
{$ifdef FPC_HAS_CPSTRING}
CodePage : TSystemCodePage;
{$endif}
{$ifndef VER2_6}
{$ifdef CPU32}
{ keep textrec size divedable by 4 for proper alignment of arrays of text, see tw0754 e.g. on arm }
Dummy : Word;
{$endif CPU32}
{$endif VER2_6}
End;