diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-03-01 17:01:25 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-03-01 17:01:25 +0000 |
commit | 5e77d28b5fade908e4db9ea3a44c1cf2c2350c24 (patch) | |
tree | 9585153fdc8d09acee35e3256396d6c8810cbe3b /sys | |
parent | 3f857ca30272a52bdc844d6a8e54a2d90e053cec (diff) |
mips and alpha GCC does not unwind the stack beyond the current frame
Diffstat (limited to 'sys')
-rw-r--r-- | sys/miscfs/nullfs/null.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/miscfs/nullfs/null.h b/sys/miscfs/nullfs/null.h index 3a777e78e34..bee798d2c03 100644 --- a/sys/miscfs/nullfs/null.h +++ b/sys/miscfs/nullfs/null.h @@ -1,4 +1,4 @@ -/* $OpenBSD: null.h,v 1.7 1997/11/06 05:58:39 csapuntz Exp $ */ +/* $OpenBSD: null.h,v 1.8 1998/03/01 17:01:24 niklas Exp $ */ /* $NetBSD: null.h,v 1.7 1996/05/17 20:53:11 gwr Exp $ */ /* @@ -65,13 +65,16 @@ struct null_node { #endif }; -/* XXX - __builtin_return_address() broken on alpha due to gcc bug */ -#if defined(__alpha__) || !defined(__GNUC__) || __GNUC__ < 2 || \ - (__GNUC__ == 2 && __GNUC_MINOR__ < 5) +#if !defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) #define RETURN_PC(frameno) (void *)0 #else +/* Some architectures can just get the current frame's return address */ +#if defined(alpha) || defined(arc) +#define RETURN_PC(frameno) (frameno ? 0 : __builtin_return_address(frameno)) +#else #define RETURN_PC(frameno) __builtin_return_address(frameno) #endif +#endif #define NULL_WANTED 0x01 #define NULL_LOCKED 0x02 |