浏览代码

* merged AIX changes from ncgutil.gen_proc_symbol_end() into
hlcgobj.gen_proc_symbol_end() and removed the routine from ncgutil (it's
not used anymore)

git-svn-id: trunk@21337 -

Jonas Maebe 13 年之前
父节点
当前提交
9d860904fe
共有 2 个文件被更改,包括 5 次插入33 次删除
  1. 5 2
      compiler/hlcgobj.pas
  2. 0 31
      compiler/ncgutil.pas

+ 5 - 2
compiler/hlcgobj.pas

@@ -3247,14 +3247,17 @@ implementation
 
       if (current_procinfo.procdef.proctypeoption=potype_proginit) then
         begin
-         if (target_info.system in (systems_darwin+[system_powerpc_macos])) and
+         if (target_info.system in (systems_darwin+[system_powerpc_macos]+systems_aix)) and
             not(current_module.islibrary) then
            begin
             new_section(list,sec_code,'',4);
             list.concat(tai_symbol.createname_global(
               target_info.cprefix+mainaliasname,AT_FUNCTION,0));
             { keep argc, argv and envp properly on the stack }
-            cg.a_jmp_name(list,target_info.cprefix+'FPC_SYSTEMMAIN');
+            if not(target_info.system in systems_aix) then
+              cg.a_jmp_name(list,target_info.cprefix+'FPC_SYSTEMMAIN')
+            else
+              cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN',false)
            end;
         end;
     end;

+ 0 - 31
compiler/ncgutil.pas

@@ -79,7 +79,6 @@ interface
     function  has_alias_name(pd:tprocdef;const s:string):boolean;
     procedure alloc_proc_symbol(pd: tprocdef);
     procedure gen_proc_symbol(list:TAsmList);
-    procedure gen_proc_symbol_end(list:TAsmList);
     procedure gen_proc_entry_code(list:TAsmList);
     procedure gen_proc_exit_code(list:TAsmList);
     procedure gen_stack_check_size_para(list:TAsmList);
@@ -1342,36 +1341,6 @@ implementation
 
 
 
-    procedure gen_proc_symbol_end(list:TAsmList);
-      begin
-        list.concat(Tai_symbol_end.Createname(current_procinfo.procdef.mangledname));
-
-        current_procinfo.procdef.procendtai:=tai(list.last);
-
-        if (current_module.islibrary) then
-          if (current_procinfo.procdef.proctypeoption = potype_proginit) then
-            { setinitname may generate a new section -> don't add to the
-              current list, because we assume this remains a text section }
-            exportlib.setinitname(current_asmdata.AsmLists[al_exports],current_procinfo.procdef.mangledname);
-
-        if (current_procinfo.procdef.proctypeoption=potype_proginit) then
-          begin
-           if (target_info.system in (systems_darwin+[system_powerpc_macos]+systems_aix)) and
-              not(current_module.islibrary) then
-             begin
-              new_section(list,sec_code,'',4);
-              list.concat(tai_symbol.createname_global(
-                target_info.cprefix+mainaliasname,AT_FUNCTION,0));
-              { keep argc, argv and envp properly on the stack }
-              if not(target_info.system in systems_aix) then
-                cg.a_jmp_name(list,target_info.cprefix+'FPC_SYSTEMMAIN')
-              else
-                cg.a_call_name(list,target_info.cprefix+'FPC_SYSTEMMAIN',false)
-             end;
-          end;
-      end;
-
-
     procedure gen_proc_entry_code(list:TAsmList);
       var
         hitemp,