Pārlūkot izejas kodu

* for proper alignment in arrays of text, text should be a multiple of 4 in size on 32 bit platforms

git-svn-id: trunk@21956 -
florian 13 gadi atpakaļ
vecāks
revīzija
c2eb030632
2 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. 1 1
      compiler/symdef.pas
  2. 6 1
      rtl/inc/textrec.inc

+ 1 - 1
compiler/symdef.pas

@@ -2460,7 +2460,7 @@ implementation
 {$ifdef cpu32bitaddr}
         case filetyp of
           ft_text :
-            savesize:=594{+4};
+            savesize:=596; { keep this dividable by 4 for proper alignment of arrays of text, see tw0754 e.g. on arm }
           ft_typed,
           ft_untyped :
             savesize:=332;

+ 6 - 1
rtl/inc/textrec.inc

@@ -4,7 +4,6 @@
 
     Textrec record definition
 
-
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
 
@@ -45,5 +44,11 @@ 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;