浏览代码

* fixed padding of records to alignment

peter 21 年之前
父节点
当前提交
8184ad2048
共有 2 个文件被更改,包括 11 次插入11 次删除
  1. 5 6
      compiler/symdef.pas
  2. 6 5
      compiler/symtable.pas

+ 5 - 6
compiler/symdef.pas

@@ -455,11 +455,7 @@ interface
 {$ifdef i386}
           fpu_used        : byte;    { how many stack fpu must be empty }
 {$endif i386}
-          funcret_paraloc :
-{$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}
-            packed
-{$endif FPC_REQUIRES_PROPER_ALIGNMENT}
-            array[tcallercallee] of tparalocation;
+          funcret_paraloc : array[tcallercallee] of tparalocation;
           has_paraloc_info : boolean; { paraloc info is available }
           constructor create(level:byte);
           constructor ppuload(ppufile:tcompilerppufile);
@@ -6150,7 +6146,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.250  2004-08-14 14:50:42  florian
+  Revision 1.251  2004-08-15 15:05:16  peter
+    * fixed padding of records to alignment
+
+  Revision 1.250  2004/08/14 14:50:42  florian
     * fixed several sparc alignment issues
     + Jonas' inline node patch; non functional yet
 

+ 6 - 5
compiler/symtable.pas

@@ -1050,13 +1050,11 @@ implementation
         { make the record size aligned correctly so it can be
           used as elements in an array. For C records we
           use the fieldalignment, because that is updated with the
-          used alignment. For normal records we use minimum from
-          recordalginment or fieldalignment. This is required to
-          be able to override the natural alignment with 'packed' }
+          used alignment. }
         if usefieldalignment=-1 then
           padalign:=fieldalignment
         else
-          padalign:=min(fieldalignment,recordalignment);
+          padalign:=recordalignment;
         datasize:=align(datasize,padalign);
       end;
 
@@ -2316,7 +2314,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.153  2004-08-15 13:30:18  florian
+  Revision 1.154  2004-08-15 15:05:16  peter
+    * fixed padding of records to alignment
+
+  Revision 1.153  2004/08/15 13:30:18  florian
     * fixed alignment of variant records
     * more alignment problems fixed