Skip to content

Commit 25c7281

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: Add PROFILE_HOOK
1 parent 19b23cf commit 25c7281

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gcc/config/arc64/linux.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,13 @@ along with GCC; see the file COPYING3. If not see
9090
: "=r" (_beg) \
9191
: "0" (_beg), "r" (_end), "r" (_xtr), "r" (_scno)); \
9292
}
93+
94+
/* Emit rtl for profiling. Output assembler code to FILE
95+
to call "_mcount" for profiling a function entry. */
96+
#define PROFILE_HOOK(LABEL) \
97+
{ \
98+
rtx fun, rt; \
99+
rt = get_hard_reg_initial_val (Pmode, BLINK_REGNUM); \
100+
fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \
101+
emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode); \
102+
}

0 commit comments

Comments
 (0)