Commit 9e362bd0 by Chung-Ju Wu Committed by Chung-Ju Wu

[NDS32] Implement PROFILE_HOOK.

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

From-SVN: r258996
parent 7f983342
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com> 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 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
type and 32-bit size. type and 32-bit size.
......
...@@ -801,7 +801,15 @@ enum reg_class ...@@ -801,7 +801,15 @@ enum reg_class
#define EXIT_IGNORE_STACK 1 #define EXIT_IGNORE_STACK 1
#define FUNCTION_PROFILER(file, labelno) \ #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. */ /* Implementing the Varargs Macros. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment