about summary refs log tree commit diff
path: root/sysdeps/sh/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sh/sysdep.h')
-rw-r--r--sysdeps/sh/sysdep.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sysdeps/sh/sysdep.h b/sysdeps/sh/sysdep.h
index 2e1e380908..202c701a10 100644
--- a/sysdeps/sh/sysdep.h
+++ b/sysdeps/sh/sysdep.h
@@ -60,7 +60,15 @@
 
 /* If compiled for profiling, call `mcount' at the start of each function.  */
 #ifdef	PROF
-#define CALL_MCOUNT	/* NOTYET */
+#define CALL_MCOUNT					\
+	mov.l	1f,r1;					\
+	sts.l	pr,@-r15;				\
+	mova	2f,r0;					\
+	jmp	@r1;					\
+	 lds	r0,pr;					\
+	.align	2;					\
+1:	.long	mcount;					\
+2:	lds.l	@r15+,pr
 #else
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif