1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
1999-10-11  Ulrich Drepper  <drepper@cygnus.com>

	* malloc/memprof.c (GETSP): Define for PowerPC.
	(GETTIME): Fix generic version.
This commit is contained in:
Ulrich Drepper
1999-10-12 00:19:17 +00:00
parent 0d57f69570
commit 48ac059733
6 changed files with 17 additions and 9 deletions

View File

@ -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; \
}