diff options
Diffstat (limited to 'sysdeps/ia64')
-rw-r--r-- | sysdeps/ia64/hp-timing.h | 6 | ||||
-rw-r--r-- | sysdeps/ia64/memusage.h | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h index ed1dc6067e..da2cd8e9c6 100644 --- a/sysdeps/ia64/hp-timing.h +++ b/sysdeps/ia64/hp-timing.h @@ -92,11 +92,7 @@ extern hp_timing_t __libc_hp_timing_overhead; processor implementation. */ #define REPEAT_READ(val) __builtin_expect ((int) val == -1, 0) -/* That's quite simple. Use the `rdtsc' instruction. Note that the value - might not be 100% accurate since there might be some more instructions - running in this moment. This could be changed by using a barrier like - 'cpuid' right before the `rdtsc' instruciton. But we are not interested - in accurate clock cycles here so we don't do this. */ +/* That's quite simple. Use the `ar.itc' instruction. */ #define HP_TIMING_NOW(Var) \ ({ unsigned long int __itc; \ do \ diff --git a/sysdeps/ia64/memusage.h b/sysdeps/ia64/memusage.h index 5ca0782e2c..5f395b88d6 100644 --- a/sysdeps/ia64/memusage.h +++ b/sysdeps/ia64/memusage.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,7 +16,15 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <hp-timing.h> #define GETSP() ({ register uintptr_t stack_ptr asm ("%r12"); stack_ptr; }) +#define GETTIME(low, high) \ + { \ + hp_timing_t __now; \ + HP_TIMING_NOW (__now); \ + low = __now & 0xffffffff; \ + high = __now >> 32; \ + } #include <sysdeps/generic/memusage.h> |