about summary refs log tree commit diff
path: root/sysdeps/alpha/hp-timing.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha/hp-timing.h')
-rw-r--r--sysdeps/alpha/hp-timing.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
index 481132663c..08d8d6627c 100644
--- a/sysdeps/alpha/hp-timing.h
+++ b/sysdeps/alpha/hp-timing.h
@@ -17,16 +17,13 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _HP_TIMING_H
-#define _HP_TIMING_H	1
+#ifndef _HP_TIMING_ALPHA_H
+#define _HP_TIMING_ALPHA_H	1
 
+#if IS_IN(rtld)
 /* We always have the timestamp register, but it's got only a 4 second
    range.  Use it for ld.so profiling only.  */
-#define HP_TIMING_AVAIL		(0)
-#define HP_SMALL_TIMING_AVAIL	(1)
-
-/* We indeed have inlined functions.  */
-#define HP_TIMING_INLINE	(1)
+# define HP_TIMING_INLINE	(1)
 
 /* We use 32 bit values for the times.  */
 typedef unsigned int hp_timing_t;
@@ -34,13 +31,16 @@ typedef unsigned int hp_timing_t;
 /* The "rpcc" instruction returns a 32-bit counting half and a 32-bit
    "virtual cycle counter displacement".  Subtracting the two gives us
    a virtual cycle count.  */
-#define HP_TIMING_NOW(VAR) \
+# define HP_TIMING_NOW(VAR) \
   do {									      \
     unsigned long int x_;						      \
     asm volatile ("rpcc %0" : "=r"(x_));				      \
     (VAR) = (int) (x_) - (int) (x_ >> 32);				      \
   } while (0)
+# include <hp-timing-common.h>
 
-#include <hp-timing-common.h>
+#else
+# include <sysdeps/generic/hp-timing.h>
+#endif /* IS_IN(rtld)  */
 
 #endif	/* hp-timing.h */