* config/spu/spu-elf.h (STARTFILE_SPEC): Add support for gprof
startup files.
* config/spu/spu-protos.h (spu_function_profiler): Add prototype.
* config/spu/spu.c (spu_function_profiler): New function.
* config/spu/spu.h (FUNCTION_PROFILER): Invoke
spu_function_profiler.
(NO_PROFILE_COUNTERS): Define.
(PROFILE_BEFORE_PROLOGUE): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154942
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-12-03 Ken Werner <ken.werner@de.ibm.com>
+
+ * config/spu/spu-elf.h (STARTFILE_SPEC): Add support for gprof
+ startup files.
+ * config/spu/spu-protos.h (spu_function_profiler): Add prototype.
+ * config/spu/spu.c (spu_function_profiler): New function.
+ * config/spu/spu.h (FUNCTION_PROFILER): Invoke
+ spu_function_profiler.
+ (NO_PROFILE_COUNTERS): Define.
+ (PROFILE_BEFORE_PROLOGUE): Likewise.
+
2009-12-03 Dave Korn <dave.korn.cygwin@gmail.com>
* ggc-page.c (struct free_object): Pull definition out ...
object constructed before entering `main'. */
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mstdmain: crt2.o%s} %{!mstdmain: crt1.o%s} \
- crti.o%s crtbegin.o%s"
+#define STARTFILE_SPEC "%{mstdmain: %{pg|p:gcrt2.o%s;:crt2.o%s}}\
+ %{!mstdmain: %{pg|p:gcrt1.o%s;:crt1.o%s}}\
+ crti.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
extern void spu_expand_vector_init (rtx target, rtx vals);
extern void spu_init_expanders (void);
extern void spu_split_convert (rtx *);
+extern void spu_function_profiler (FILE *, int);
/* spu-c.c */
extern tree spu_resolve_overloaded_builtin (location_t, tree fndecl,
}
}
+void
+spu_function_profiler (FILE * file, int labelno)
+{
+ fprintf (file, "# profile\n");
+ fprintf (file, "brsl $75, _mcount\n");
+}
+
#include "gt-spu.h"
\f
/* Profiling */
-/* Nothing, for now. */
#define FUNCTION_PROFILER(FILE, LABELNO) \
- fprintf (FILE, "\t\n")
+ spu_function_profiler ((FILE), (LABELNO));
+
+#define NO_PROFILE_COUNTERS 1
+
+#define PROFILE_BEFORE_PROLOGUE 1
\f
/* Trampolines */