Browse Source

ARM: mimic what GNU C does while calling the profiling mcount on ARM

git-svn-id: trunk@28648 -
Károly Balogh 11 years ago
parent
commit
1b0a1f4508
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/arm/cgcpu.pas

+ 4 - 1
compiler/arm/cgcpu.pas

@@ -1801,7 +1801,10 @@ unit cgcpu;
     procedure tbasecgarm.g_profilecode(list : TAsmList);
     procedure tbasecgarm.g_profilecode(list : TAsmList);
       begin
       begin
         if target_info.system = system_arm_linux then
         if target_info.system = system_arm_linux then
-          a_call_name(list,target_info.Cprefix+'mcount',false)
+          begin
+            list.concat(taicpu.op_regset(A_PUSH,R_INTREGISTER,R_SUBWHOLE,[RS_R14]));
+            a_call_name(list,'__gnu_mcount_nc',false);
+          end
         else
         else
           internalerror(2014091201);
           internalerror(2014091201);
       end;
       end;