Browse Source

Create .ent/.end pair for mips/mipsel and alpha

git-svn-id: trunk@21787 -
pierre 13 years ago
parent
commit
024bde8875
1 changed files with 11 additions and 0 deletions
  1. 11 0
      compiler/hlcgobj.pas

+ 11 - 0
compiler/hlcgobj.pas

@@ -3480,6 +3480,13 @@ implementation
        current_filepos:=storepos;
        current_filepos:=storepos;
     end;
     end;
 
 
+
+  function use_ent : boolean;
+    begin
+	  use_ent := (target_info.system in [system_mipsel_linux,system_mipseb_linux])
+	             or (target_info.cpu=cpu_alpha);
+    end;
+
   procedure thlcgobj.gen_proc_symbol(list: TAsmList);
   procedure thlcgobj.gen_proc_symbol(list: TAsmList);
     var
     var
       item,
       item,
@@ -3513,11 +3520,15 @@ implementation
           previtem:=item;
           previtem:=item;
           item := TCmdStrListItem(item.next);
           item := TCmdStrListItem(item.next);
         end;
         end;
+	  if (use_ent) then
+	    list.concat(Tai_ent.create(current_procinfo.procdef.mangledname));
       current_procinfo.procdef.procstarttai:=tai(list.last);
       current_procinfo.procdef.procstarttai:=tai(list.last);
     end;
     end;
 
 
   procedure thlcgobj.gen_proc_symbol_end(list: TAsmList);
   procedure thlcgobj.gen_proc_symbol_end(list: TAsmList);
     begin
     begin
+	  if (use_ent) then
+	    list.concat(Tai_ent_end.create(current_procinfo.procdef.mangledname));
       list.concat(Tai_symbol_end.Createname(current_procinfo.procdef.mangledname));
       list.concat(Tai_symbol_end.Createname(current_procinfo.procdef.mangledname));
 
 
       current_procinfo.procdef.procendtai:=tai(list.last);
       current_procinfo.procdef.procendtai:=tai(list.last);