Ver Fonte

* initial gprof code for ppc64/linux
* compilation fixes
* alignment related fixes

git-svn-id: trunk@3270 -

tom_at_work há 19 anos atrás
pai
commit
b64981a704
2 ficheiros alterados com 12 adições e 6 exclusões
  1. 7 1
      compiler/aggas.pas
  2. 5 5
      compiler/systems/i_linux.pas

+ 7 - 1
compiler/aggas.pas

@@ -839,6 +839,11 @@ implementation
 
            ait_symbol :
              begin
+               if (target_info.system = system_powerpc64_linux) and
+                 (tai_symbol(hp).sym.typ = AT_FUNCTION) and (cs_profile in aktmoduleswitches) then
+                 begin
+                 AsmWriteLn('.globl _mcount');
+               end;
                if tai_symbol(hp).is_global then
                 begin
                   AsmWrite('.globl'#9);
@@ -853,7 +858,8 @@ implementation
                    AsmWriteLn('.quad .' + tai_symbol(hp).sym.name + ', .TOC.@tocbase, 0');
                    AsmWriteLn('.previous');
                    AsmWriteLn('.size ' + tai_symbol(hp).sym.name + ', 24');
-                   AsmWriteLn('.globl .' + tai_symbol(hp).sym.name);
+                   if (tai_symbol(hp).is_global) then
+                     AsmWriteLn('.globl .' + tai_symbol(hp).sym.name);
                    AsmWriteLn('.type .' + tai_symbol(hp).sym.name + ', @function');
                    { the dotted name is the name of the actual function entry }
                    AsmWrite('.');

+ 5 - 5
compiler/systems/i_linux.pas

@@ -327,14 +327,14 @@ unit i_linux;
                 loopalign       : 4;
                 jumpalign       : 0;
                 constalignmin   : 4;
-                constalignmax   : 8;
+                constalignmax   : 16;
                 varalignmin     : 4;
-                varalignmax     : 8;
+                varalignmax     : 16;
                 localalignmin   : 0;
-                localalignmax   : 8;
+                localalignmax   : 16;
                 recordalignmin  : 0;
-                recordalignmax  : 8;
-                maxCrecordalign : 8
+                recordalignmax  : 16;
+                maxCrecordalign : 16
               );
             first_parm_offset : 8;
             stacksize    : 10*1024*1024;