diff options
author | simokawa <simokawa@FreeBSD.org> | 1999-07-16 06:45:52 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 1999-07-16 06:45:52 +0000 |
commit | 404cd927b959aa49252d27a31638c08cbeda1eae (patch) | |
tree | 18826b754a12996cf787321862cf65f7bee8527c /sys/alpha/include | |
parent | 21fa36a2c1323e011b7bdaca4c409b642ad80d53 (diff) | |
download | FreeBSD-src-404cd927b959aa49252d27a31638c08cbeda1eae.zip FreeBSD-src-404cd927b959aa49252d27a31638c08cbeda1eae.tar.gz |
* Restore register correctly.
* Add missing bits for profiling.
Diffstat (limited to 'sys/alpha/include')
-rw-r--r-- | sys/alpha/include/asm.h | 4 | ||||
-rw-r--r-- | sys/alpha/include/profile.h | 30 |
2 files changed, 27 insertions, 7 deletions
diff --git a/sys/alpha/include/asm.h b/sys/alpha/include/asm.h index f5044df..8be98c1 100644 --- a/sys/alpha/include/asm.h +++ b/sys/alpha/include/asm.h @@ -1,4 +1,4 @@ -/* $Id: asm.h,v 1.1 1998/01/10 22:09:52 jb Exp $ */ +/* $Id: asm.h,v 1.2 1998/06/10 10:54:23 dfr Exp $ */ /* From: NetBSD: asm.h,v 1.18 1997/11/03 04:22:06 ross Exp */ /* @@ -226,7 +226,7 @@ * MCOUNT */ -#ifndef GPROF +#if !defined(GPROF) && !defined(PROF) #define MCOUNT /* nothing */ #else #define MCOUNT \ diff --git a/sys/alpha/include/profile.h b/sys/alpha/include/profile.h index e0eb101..065ae3f 100644 --- a/sys/alpha/include/profile.h +++ b/sys/alpha/include/profile.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: profile.h,v 1.1.1.1 1998/03/09 05:43:16 jb Exp $ */ /* From: NetBSD: profile.h,v 1.9 1997/04/06 08:47:37 cgd Exp */ /* @@ -30,6 +30,10 @@ #define _MCOUNT_DECL void mcount +#define FUNCTION_ALIGNMENT 32 + +typedef u_long fptrdiff_t; + #if 0 /* * XXX The definition of MCOUNT below is really the following code, run @@ -192,17 +196,18 @@ LX98: ldgp $29,0($27); \ ldq $23, 144($30); \ ldq $24, 152($30); \ ldq $25, 160($30); \ - ldq $25, 160($30); \ ldq $26, 168($30); \ ldq $27, 176($30); \ ldq $29, 184($30); \ \ + ldq $28, 0($30); \ + \ lda $30, 192($30); \ ret $31, ($28), 1; \ \ .end _mcount"); -#ifdef _KERNEL +#ifdef KERNEL /* * The following two macros do splhigh and splx respectively. * _alpha_pal_swpipl is a special version of alpha_pal_swpipl which @@ -210,8 +215,23 @@ LX98: ldgp $29,0($27); \ * * XXX These macros should probably use inline assembly. */ -#define MCOUNT_ENTER \ +#define MCOUNT_ENTER(s) \ s = _alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH) -#define MCOUNT_EXIT \ +#define MCOUNT_EXIT(s) \ (void)_alpha_pal_swpipl(s); +#define MCOUNT_DECL(s) u_long s; +#ifdef GUPROF +struct gmonparam; + +void nullfunc_loop_profiled __P((void)); +void nullfunc_profiled __P((void)); +void startguprof __P((struct gmonparam *p)); +void stopguprof __P((struct gmonparam *p)); +#else +#define startguprof(p) +#define stopguprof(p) +#endif /* GUPROF */ + +#else /* !KERNEL */ +typedef u_long uintfptr_t; #endif |