Call mcount for profiling.
This commit is contained in:
parent
fa2f94238c
commit
84ecfb5e88
12
gnu/dist/gcc/config/sh/netbsdcoff.h
vendored
12
gnu/dist/gcc/config/sh/netbsdcoff.h
vendored
@ -89,3 +89,15 @@
|
|||||||
and initialization stuff better. */
|
and initialization stuff better. */
|
||||||
#undef DWARF2_UNWIND_INFO
|
#undef DWARF2_UNWIND_INFO
|
||||||
|
|
||||||
|
/* XXX shouldn't use "1f"-style labels */
|
||||||
|
#undef FUNCTION_PROFILER
|
||||||
|
#define FUNCTION_PROFILER(STREAM,LABELNO) \
|
||||||
|
{ \
|
||||||
|
fprintf((STREAM), "\tmov.l\t11f,r1\n"); \
|
||||||
|
fprintf((STREAM), "\tmova\t12f,r0\n"); \
|
||||||
|
fprintf((STREAM), "\tjmp\t@r1\n"); \
|
||||||
|
fprintf((STREAM), "\tnop\n"); \
|
||||||
|
fprintf((STREAM), "\t.align\t2\n"); \
|
||||||
|
fprintf((STREAM), "11:\t.long\t__mcount\n"); \
|
||||||
|
fprintf((STREAM), "12:\n"); \
|
||||||
|
}
|
||||||
|
13
gnu/dist/gcc/config/sh/netbsdelf.h
vendored
13
gnu/dist/gcc/config/sh/netbsdelf.h
vendored
@ -128,3 +128,16 @@ do { \
|
|||||||
%{rdynamic:-export-dynamic} \
|
%{rdynamic:-export-dynamic} \
|
||||||
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||||
%{static:-static}}"
|
%{static:-static}}"
|
||||||
|
|
||||||
|
/* XXX shouldn't use "1f"-style labels */
|
||||||
|
#undef FUNCTION_PROFILER
|
||||||
|
#define FUNCTION_PROFILER(STREAM,LABELNO) \
|
||||||
|
{ \
|
||||||
|
fprintf((STREAM), "\tmov.l\t11f,r1\n"); \
|
||||||
|
fprintf((STREAM), "\tmova\t12f,r0\n"); \
|
||||||
|
fprintf((STREAM), "\tjmp\t@r1\n"); \
|
||||||
|
fprintf((STREAM), "\tnop\n"); \
|
||||||
|
fprintf((STREAM), "\t.align\t2\n"); \
|
||||||
|
fprintf((STREAM), "11:\t.long\t__mcount\n"); \
|
||||||
|
fprintf((STREAM), "12:\n"); \
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user