summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/ia64/include/ia64_cpu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h
index bd91987..ca6c112 100644
--- a/sys/ia64/include/ia64_cpu.h
+++ b/sys/ia64/include/ia64_cpu.h
@@ -221,6 +221,17 @@ ia64_ptc_l(u_int64_t va, u_int64_t log2size)
}
/*
+ * Read the value of psr.
+ */
+static __inline u_int64_t
+ia64_get_psr(void)
+{
+ u_int64_t result;
+ __asm __volatile("mov %0=psr;;" : "=r" (result));
+ return result;
+}
+
+/*
* Read the value of ar.k0.
*/
static __inline u_int64_t
OpenPOWER on IntegriCloud