summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-12 00:19:17 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-12 00:19:17 +0000
commit48ac0597336da20bedb567734cfa10a34128008c (patch)
tree4a8bd63b90e10a0286a5c8a623dd1a385f360dbf /malloc
parent0d57f6957019317183e9e6d82dd587dc7bde48bf (diff)
downloadglibc-48ac0597336da20bedb567734cfa10a34128008c.tar.gz
glibc-48ac0597336da20bedb567734cfa10a34128008c.tar.xz
glibc-48ac0597336da20bedb567734cfa10a34128008c.zip
Update.
1999-10-11  Ulrich Drepper  <drepper@cygnus.com>

	* malloc/memprof.c (GETSP): Define for PowerPC.
	(GETTIME): Fix generic version.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/memprof.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/malloc/memprof.c b/malloc/memprof.c
index 1830d33ae6..c91b7cc237 100644
--- a/malloc/memprof.c
+++ b/malloc/memprof.c
@@ -83,6 +83,9 @@ static uintptr_t start_sp;
 #ifdef __sparc__
 # define GETSP() ({ register uintptr_t stack_ptr asm ("%sp"); stack_ptr; })
 #endif
+#ifdef __powerpc__
+# define GETSP() ({ register uintptr_t stack_ptr asm ("%r1"); stack_ptr; })
+#endif
 
 #ifdef __i386__
 # define GETTIME(low,high) asm ("rdtsc" : "=a" (low), "=d" (high))
@@ -93,7 +96,7 @@ static uintptr_t start_sp;
     struct timeval tval;						      \
     uint64_t usecs;							      \
     gettimeofday (&tval, NULL);						      \
-    usecs = (uint64_t) tval.tv_usec + (uint64_t) tval_usec * 1000000;	      \
+    usecs = (uint64_t) tval.tv_usec + (uint64_t) tval.tv_usec * 1000000;      \
     low = usecs & 0xffffffff;						      \
     high = usecs >> 32;							      \
   }