From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Jaeger To: GNU libc hacker Subject: [Patch] GETSP for MIPS Date: Tue, 01 Feb 2000 09:19:00 -0000 Message-id: X-SW-Source: 2000-02/msg00004.html I got on MIPS the following warning: memprof.c:146: warning: implicit declaration of function `GETSP' We should check if we really have a definition for GETSP. I'm appending a patch. Andreas Schwab, could you add a m68k version? Andreas 2000-02-01 Andreas Jaeger * malloc/memprof.c (GETSP): Add version for Mips, warn if GETSP is not defined. ============================================================ Index: malloc/memprof.c --- malloc/memprof.c 1999/10/12 00:19:09 1.2 +++ malloc/memprof.c 2000/02/01 17:10:37 @@ -1,5 +1,5 @@ /* Profile heap and stack memory usage of running program. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -85,6 +85,13 @@ #endif #ifdef __powerpc__ # define GETSP() ({ register uintptr_t stack_ptr asm ("%r1"); stack_ptr; }) +#endif +#ifdef __mips__ +# define GETSP() ({ register uintptr_t stack_ptr asm ("$29"); stack_ptr; }) +#endif +#ifndef GETSP +# warning "GETSP is not defined for this architecture." +# define GETSP 0 #endif #ifdef __i386__ -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de