This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Patch] GETSP for MIPS



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  <aj@suse.de>

	* 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 <drepper@cygnus.com>, 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]