[NDS32] Implement PROFILE_HOOK.

gcc/
	* config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
	(PROFILE_HOOK): Define its implementation.

From-SVN: r258996
This commit is contained in:
Chung-Ju Wu 2018-04-01 08:52:24 +00:00 committed by Chung-Ju Wu
parent 7f9833429c
commit 9e362bd034
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
(PROFILE_HOOK): Define its implementation.
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int

View File

@ -801,7 +801,15 @@ enum reg_class
#define EXIT_IGNORE_STACK 1
#define FUNCTION_PROFILER(file, labelno) \
fprintf (file, "/* profiler %d */", (labelno))
fprintf (file, "/* profiler %d */\n", (labelno))
#define PROFILE_HOOK(LABEL) \
{ \
rtx fun, lp; \
lp = get_hard_reg_initial_val (Pmode, LP_REGNUM); \
fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \
emit_library_call (fun, LCT_NORMAL, VOIDmode, lp, Pmode); \
}
/* Implementing the Varargs Macros. */