ARM: first naive attempt to get gprofiling work for arm-linux. (Work-In-Progress, but at least for me it doesn't explode)

git-svn-id: trunk@28645 -
This commit is contained in:
Károly Balogh 2014-09-12 18:51:02 +00:00
parent 11201164e7
commit 739c66291d
2 changed files with 10 additions and 1 deletions

View File

@ -71,6 +71,8 @@ unit cgcpu;
procedure g_flags2reg(list: TAsmList; size: TCgSize; const f: TResFlags; reg: TRegister); override;
procedure g_profilecode(list : TAsmList); override;
procedure g_proc_entry(list : TAsmList;localsize : longint;nostackframe:boolean);override;
procedure g_proc_exit(list : TAsmList;parasize : longint;nostackframe:boolean); override;
procedure g_maybe_got_init(list : TAsmList); override;
@ -1796,6 +1798,13 @@ unit cgcpu;
list.concat(setcondition(taicpu.op_reg_const(A_MOV,reg,0),inverse_cond(flags_to_cond(f))));
end;
procedure tbasecgarm.g_profilecode(list : TAsmList);
begin
if target_info.system = system_arm_linux then
a_call_name(list,target_info.Cprefix+'mcount',false)
else
internalerror(2014091201);
end;
procedure tbasecgarm.g_proc_entry(list : TAsmList;localsize : longint;nostackframe:boolean);
var

View File

@ -112,7 +112,7 @@ var
const
{ gprof (requires implementation of g_profilecode in the code generator) }
supported_targets_pg = [system_i386_linux,system_x86_64_linux,system_mipseb_linux,system_mipsel_linux]
supported_targets_pg = [system_i386_linux,system_x86_64_linux,system_mipseb_linux,system_mipsel_linux,system_arm_linux]
+ [system_i386_win32]
+ [system_powerpc_darwin,system_x86_64_darwin]
+ [system_i386_GO32V2]