Bladeren bron

* write pointer data on AIX/ppc64 using .vbyte rather than using .llong
(= equivalent of gas .quad), because .llong forces the alignment to
8 bytes and this causes problems with some typed constant records (such
as RTTI)

git-svn-id: trunk@21045 -

Jonas Maebe 13 jaren geleden
bovenliggende
commit
b99a8c129d
2 gewijzigde bestanden met toevoegingen van 8 en 8 verwijderingen
  1. 8 1
      compiler/aggas.pas
  2. 0 7
      compiler/ppcgen/agppcgas.pas

+ 8 - 1
compiler/aggas.pas

@@ -930,7 +930,14 @@ implementation
                        end
                      else
                        begin
-                         AsmWrite(ait_const2str[constdef]);
+                         if not(target_info.system in systems_aix) or
+                            (constdef<>aitconst_64bit) then
+                           AsmWrite(ait_const2str[constdef])
+                         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,');
                          l:=0;
                          t := '';
                          repeat

+ 0 - 7
compiler/ppcgen/agppcgas.pas

@@ -463,13 +463,6 @@ unit agppcgas;
         i: longint;
       begin
         inherited WriteExtraHeader;
-        { AIX assembler notation for .quad is .llong, let assembler itself
-          perform the substitution; the aix assembler uses .quad for defining
-          128 bit floating point numbers, but
-            a) we don't support those yet
-            b) once we support them, we'll encode them byte per byte like other
-               floating point numbers }
-        AsmWriteln(#9'.set'#9'.quad,.llong');
         { map cr registers to plain numbers }
         for i:=0 to 7 do
           AsmWriteln(#9'.set'#9'cr'+tostr(i)+','+tostr(i));