Browse Source

Merged revisions 1319 via svnmerge from
http://[email protected]/svn/fpc/trunk

r1319 (florian)
* on cpus requiring proper alignment, shortstrings are to two byte boundaries aligned

git-svn-id: branches/fixes_2_0@1528 -

peter 20 năm trước cách đây
mục cha
commit
9abbd7599e
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      compiler/symdef.pas

+ 5 - 0
compiler/symdef.pas

@@ -1637,7 +1637,12 @@ implementation
             alignment:=size_2_align(savesize);
             alignment:=size_2_align(savesize);
           st_longstring,
           st_longstring,
           st_shortstring:
           st_shortstring:
+{$ifdef cpurequiresproperalignment}
+            { char to string accesses byte 0 and 1 with one word access }
+            alignment:=size_2_align(2);
+{$else cpurequiresproperalignment}
             alignment:=size_2_align(1);
             alignment:=size_2_align(1);
+{$endif cpurequiresproperalignment}
           else
           else
             internalerror(200412301);
             internalerror(200412301);
         end;
         end;