aboutsummaryrefslogtreecommitdiff
path: root/cpu-all.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-all.h')
-rw-r--r--cpu-all.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 2a2b1970ee..21ed731a59 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -20,7 +20,7 @@
#ifndef CPU_ALL_H
#define CPU_ALL_H
-#if defined(__arm__) || defined(__sparc__) || defined(__mips__)
+#if defined(__arm__) || defined(__sparc__) || defined(__mips__) || defined(__hppa__)
#define WORDS_ALIGNED
#endif
@@ -952,6 +952,15 @@ static inline int64_t cpu_get_real_ticks(void)
return val;
}
+#elif defined(__hppa__)
+
+static inline int64_t cpu_get_real_ticks(void)
+{
+ int val;
+ asm volatile ("mfctl %%cr16, %0" : "=r"(val));
+ return val;
+}
+
#elif defined(__ia64)
static inline int64_t cpu_get_real_ticks(void)