From 0dbfb99afaf6e5f577fe5297cc511da712a24f97 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 19 Apr 2014 18:48:40 +0000 Subject: [PATCH] * always use assembler directives that support unaligned data on AIX, as otherwise data in initialised packed records gets aligned wrongly. This should probably also be done for other targets that automatically align .short/.long/... git-svn-id: trunk@27600 - --- compiler/aggas.pas | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/aggas.pas b/compiler/aggas.pas index 2c17e85ef7..68c69aba48 100644 --- a/compiler/aggas.pas +++ b/compiler/aggas.pas @@ -1029,14 +1029,13 @@ implementation else if (constdef in ait_unaligned_consts) and (target_info.system in use_ua_elf_systems) then AsmWrite(ait_ua_elf_const2str[constdef]) - else if not(target_info.system in systems_aix) or - (constdef<>aitconst_64bit) then - AsmWrite(ait_const2str[constdef]) + { we can also have unaligned pointers in packed record + constants, which don't get translated into + unaligned tai -> always use vbyte } + else if target_info.system in systems_aix then + AsmWrite(#9'.vbyte'#9+tostr(tai_const(hp).size)+',') else - { can't use .llong, because that forces 8 byte - alignnment and we sometimes store addresses on - 4-byte aligned addresses (e.g. in the RTTI) } - AsmWrite('.vbyte'#9'8,'); + AsmWrite(ait_const2str[constdef]); l:=0; t := ''; repeat