Home | History | Annotate | Line # | Download | only in include
profile.h revision 1.4
      1  1.4   tsubai /*	$NetBSD: profile.h,v 1.4 1999/03/05 07:59:14 tsubai Exp $	*/
      2  1.2  thorpej 
      3  1.2  thorpej #define	_MCOUNT_DECL	void mcount
      4  1.2  thorpej 
      5  1.4   tsubai #ifdef PIC
      6  1.4   tsubai #define _PLT "@plt"
      7  1.4   tsubai #else
      8  1.4   tsubai #define _PLT
      9  1.4   tsubai #endif
     10  1.2  thorpej 
     11  1.4   tsubai #define MCOUNT __asm("		\
     12  1.4   tsubai 	.globl _mcount;		\
     13  1.4   tsubai _mcount:			\
     14  1.4   tsubai 	stwu	1,-64(1);	\
     15  1.4   tsubai 	stw	3,16(1);	\
     16  1.4   tsubai 	stw	4,20(1);	\
     17  1.4   tsubai 	stw	5,24(1);	\
     18  1.4   tsubai 	stw	6,28(1);	\
     19  1.4   tsubai 	stw	7,32(1);	\
     20  1.4   tsubai 	stw	8,36(1);	\
     21  1.4   tsubai 	stw	9,40(1);	\
     22  1.4   tsubai 	stw	10,44(1);	\
     23  1.4   tsubai 				\
     24  1.4   tsubai 	mflr	4;		\
     25  1.4   tsubai 	stw	4,48(1);	\
     26  1.4   tsubai 	lwz	3,68(1);	\
     27  1.4   tsubai 	bl	mcount" _PLT ";	\
     28  1.4   tsubai 	lwz	3,68(1);	\
     29  1.4   tsubai 	mtlr	3;		\
     30  1.4   tsubai 	lwz	4,48(1);	\
     31  1.4   tsubai 	mtctr	4;		\
     32  1.4   tsubai 				\
     33  1.4   tsubai 	lwz	3,16(1);	\
     34  1.4   tsubai 	lwz	4,20(1);	\
     35  1.4   tsubai 	lwz	5,24(1);	\
     36  1.4   tsubai 	lwz	6,28(1);	\
     37  1.4   tsubai 	lwz	7,32(1);	\
     38  1.4   tsubai 	lwz	8,36(1);	\
     39  1.4   tsubai 	lwz	9,40(1);	\
     40  1.4   tsubai 	lwz	10,44(1);	\
     41  1.4   tsubai 	addi	1,1,64;		\
     42  1.4   tsubai 	bctr;			");
     43  1.3  thorpej 
     44  1.3  thorpej #ifdef _KERNEL
     45  1.3  thorpej #define	MCOUNT_ENTER
     46  1.3  thorpej #define	MCONT_EXIT
     47  1.3  thorpej #endif
     48