From 5e77d28b5fade908e4db9ea3a44c1cf2c2350c24 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Sun, 1 Mar 1998 17:01:25 +0000 Subject: mips and alpha GCC does not unwind the stack beyond the current frame --- sys/miscfs/nullfs/null.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3