浏览代码

* talignmentinfo must be packed, it is written to the ppu during streaming, further it is member of tsettings which packed too
* reordered fields of tsetting to avoid unaligned fields
* fixed compilation of arm after disableddircache was added
* increased ppu version

git-svn-id: trunk@13327 -

florian 16 年之前
父节点
当前提交
fc5e5d9258
共有 3 个文件被更改,包括 26 次插入18 次删除
  1. 23 16
      compiler/globals.pas
  2. 1 1
      compiler/ppu.pas
  3. 2 1
      compiler/systems.pas

+ 23 - 16
compiler/globals.pas

@@ -104,7 +104,9 @@ interface
     type
     type
        tcodepagestring = string[20];
        tcodepagestring = string[20];
 
 
+       { this is written to ppus during token recording for generics so it must be packed }
        tsettings = packed record
        tsettings = packed record
+         alignment       : talignmentinfo;
          globalswitches  : tglobalswitches;
          globalswitches  : tglobalswitches;
          moduleswitches  : tmoduleswitches;
          moduleswitches  : tmoduleswitches;
          localswitches   : tlocalswitches;
          localswitches   : tlocalswitches;
@@ -119,7 +121,10 @@ interface
            >0: round to this size }
            >0: round to this size }
          setalloc,
          setalloc,
          packenum        : shortint;
          packenum        : shortint;
-         alignment       : talignmentinfo;
+
+         packrecords     : shortint;
+         maxfpuregisters : shortint;
+
          cputype,
          cputype,
          optimizecputype : tcputype;
          optimizecputype : tcputype;
          fputype         : tfputype;
          fputype         : tfputype;
@@ -128,9 +133,6 @@ interface
          defproccall     : tproccalloption;
          defproccall     : tproccalloption;
          sourcecodepage  : tcodepagestring;
          sourcecodepage  : tcodepagestring;
 
 
-         packrecords     : shortint;
-         maxfpuregisters : shortint;
-
          minfpconstprec  : tfloattype;
          minfpconstprec  : tfloattype;
 
 
          disabledircache : boolean;
          disabledircache : boolean;
@@ -330,16 +332,6 @@ interface
 
 
     const
     const
       default_settings : TSettings = (
       default_settings : TSettings = (
-        globalswitches : [cs_check_unit_name,cs_link_static];
-        moduleswitches : [cs_extsyntax,cs_implicit_exceptions];
-        localswitches : [cs_check_io,cs_typed_const_writable];
-        modeswitches : fpcmodeswitches;
-        optimizerswitches : [];
-        genwpoptimizerswitches : [];
-        dowpoptimizerswitches : [];
-        debugswitches : [];
-        setalloc : 0;
-        packenum : 4;
         alignment : (
         alignment : (
           procalign : 0;
           procalign : 0;
           loopalign : 0;
           loopalign : 0;
@@ -354,6 +346,21 @@ interface
           recordalignmax : 0;
           recordalignmax : 0;
           maxCrecordalign : 0;
           maxCrecordalign : 0;
         );
         );
+        globalswitches : [cs_check_unit_name,cs_link_static];
+        moduleswitches : [cs_extsyntax,cs_implicit_exceptions];
+        localswitches : [cs_check_io,cs_typed_const_writable];
+        modeswitches : fpcmodeswitches;
+        optimizerswitches : [];
+        genwpoptimizerswitches : [];
+        dowpoptimizerswitches : [];
+        debugswitches : [];
+
+        setalloc : 0;
+        packenum : 4;
+
+        packrecords     : 0;
+        maxfpuregisters : 0;
+
 {$ifdef i386}
 {$ifdef i386}
         cputype : cpu_Pentium;
         cputype : cpu_Pentium;
         optimizecputype : cpu_Pentium3;
         optimizecputype : cpu_Pentium3;
@@ -398,9 +405,9 @@ interface
         interfacetype : it_interfacecom;
         interfacetype : it_interfacecom;
         defproccall : pocall_default;
         defproccall : pocall_default;
         sourcecodepage : '8859-1';
         sourcecodepage : '8859-1';
-        packrecords     : 0;
-        maxfpuregisters : 0;
         minfpconstprec : s32real;
         minfpconstprec : s32real;
+
+        disabledircache : false;
 {$if defined(ARM)}
 {$if defined(ARM)}
         controllertype : ct_none;
         controllertype : ct_none;
 {$endif defined(ARM)}
 {$endif defined(ARM)}

+ 1 - 1
compiler/ppu.pas

@@ -43,7 +43,7 @@ type
 {$endif Test_Double_checksum}
 {$endif Test_Double_checksum}
 
 
 const
 const
-  CurrentPPUVersion = 99;
+  CurrentPPUVersion = 100;
 
 
 { buffer sizes }
 { buffer sizes }
   maxentrysize = 1024;
   maxentrysize = 1024;

+ 2 - 1
compiler/systems.pas

@@ -236,7 +236,8 @@ interface
 
 
 
 
        palignmentinfo = ^talignmentinfo;
        palignmentinfo = ^talignmentinfo;
-       talignmentinfo = record
+       { this is written to ppus during token recording for generics so it must be packed }
+       talignmentinfo = packed record
          procalign,
          procalign,
          loopalign,
          loopalign,
          jumpalign,
          jumpalign,