From 905558ae874b295002e5c4c538e21937eba952e8 Mon Sep 17 00:00:00 2001 From: pk Date: Fri, 18 Mar 1994 08:35:56 +0000 Subject: [PATCH] Sparc support. --- sys/kern/subr_mcount.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_mcount.c b/sys/kern/subr_mcount.c index e74724a450a8..72c4622b6047 100644 --- a/sys/kern/subr_mcount.c +++ b/sys/kern/subr_mcount.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)subr_mcount.c 7.10 (Berkeley) 5/7/91 - * $Id: subr_mcount.c,v 1.7 1994/02/24 01:10:11 cgd Exp $ + * $Id: subr_mcount.c,v 1.8 1994/03/18 08:35:56 pk Exp $ */ #ifdef GPROF @@ -107,10 +107,24 @@ kmstartup() kcount = (u_short *)(((int)sbuf) + sizeof (struct phdr)); } +#ifdef sparc +asm (" .text"); +asm (" .global mcount"); +asm ("mcount:"); +asm (" add %o7, 8, %o0"); +asm (" ba ___mcount"); +asm (" add %i7, 8, %o1"); + +static __mcount(selfpc, frompcindex) + register char *selfpc; + register u_short *frompcindex; +{ +#else mcount() { register char *selfpc; /* r11 => r5 */ register u_short *frompcindex; /* r10 => r4 */ +#endif register struct tostruct *top; /* r9 => r3 */ register struct tostruct *prevtop; /* r8 => r2 */ register long toindex; /* r7 => r1 */