* Removed "packed" attribute from TUC_Prop on alignment-sensitive targets (temporary solution, see comment in source), and from TUCA_DataBook on all targets (does not add noticeable bloat because this type is used just a few times. OTOH having unaligned pointers in record hurts performance on all targets).

This change fixes fpwidestring-related tests at least on mips-linux.

git-svn-id: trunk@29322 -
This commit is contained in:
sergei 2014-12-25 10:11:16 +00:00
parent 38d5be4182
commit 38068acd42

View File

@ -207,7 +207,12 @@ type
{ TUC_Prop }
TUC_Prop = packed record
{ On alignment-sensitive targets, at least some of them, assembler uses to forcibly align data >1 byte.
This breaks intended layout of initialized constants/variables.
A proper solution is to patch compiler to emit always unaligned directives for words/dwords/etc,
but for now just declare this record as "unpacked". This causes bloat, but it's better than having
entire unit not working at all. }
TUC_Prop = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif} record
private
function GetCategory : Byte;inline;
procedure SetCategory(AValue : Byte);
@ -322,7 +327,7 @@ type
TCollationName = string[128];
PUCA_DataBook = ^TUCA_DataBook;
TUCA_DataBook = packed record
TUCA_DataBook = record
public
Base : PUCA_DataBook;
Version : TCollationName;