diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-05 13:38:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-01-05 13:38:23 +0000 |
commit | 2a3afa013c54e90eca1f362f0d66938024368eff (patch) | |
tree | bcfd58a89ee9187c34f27f1a1cf484cad8f79e23 /sys/arch/vax | |
parent | 3032d99f42052661c0c6f4a7b59da92f46ba6f6f (diff) |
from ragge: do not declare _mcount as static, gcc will optimize it away then
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/include/profile.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/vax/include/profile.h b/sys/arch/vax/include/profile.h index 2bb0ab25d14..dc5e0983eaa 100644 --- a/sys/arch/vax/include/profile.h +++ b/sys/arch/vax/include/profile.h @@ -1,4 +1,4 @@ -/* $NetBSD: profile.h,v 1.4 1995/05/11 16:53:15 jtc Exp $ */ +/* $NetBSD: profile.h,v 1.5 1995/12/31 12:15:58 ragge Exp $ */ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. @@ -34,8 +34,17 @@ * @(#)profile.h 7.1 (Berkeley) 7/16/92 */ -#define _MCOUNT_DECL static inline void _mcount +/* + * _mcount can't be declared static, gcc will optimize it away then. + */ +#define _MCOUNT_DECL void _mcount +/* + * Note here: the second argument to __mcount() is pc when mcount + * was called. Because it's already on the stack we only have to + * push previous pc _and_ tell calls that it is only one argument + * to __mcount, so that our return address won't get popped from stack. + */ #define MCOUNT \ asm(".text; .globl mcount; mcount: pushl 16(fp); calls $1,__mcount; rsb"); |