summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k
diff options
context:
space:
mode:
authorSteve Murphree <smurph@cvs.openbsd.org>2001-12-22 17:43:15 +0000
committerSteve Murphree <smurph@cvs.openbsd.org>2001-12-22 17:43:15 +0000
commit9090899a3ed7e26b69f97860bff9b43ad8ced70d (patch)
treef95815f9410da5d3a8757ed1c792a7f370f27f58 /sys/arch/mvme88k
parent9e4b929823c28a67cb07c546ab691af75ff0565e (diff)
add get_psr() inline for mc88410.h
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r--sys/arch/mvme88k/include/asm_macro.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/arch/mvme88k/include/asm_macro.h b/sys/arch/mvme88k/include/asm_macro.h
index 0d548208676..34ebe3218a2 100644
--- a/sys/arch/mvme88k/include/asm_macro.h
+++ b/sys/arch/mvme88k/include/asm_macro.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm_macro.h,v 1.18 2001/12/16 23:49:46 miod Exp $ */
+/* $OpenBSD: asm_macro.h,v 1.19 2001/12/22 17:43:14 smurph Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1991 Carnegie Mellon University
@@ -89,6 +89,16 @@ static __inline__ void set_psr(m88k_psr_type psr)
}
/*
+ * Gets the PSR. See comments above.
+ */
+static __inline__ m88k_psr_type get_psr(void)
+{
+ m88k_psr_type psr;
+ __asm__ __volatile__ ("ldcr %0, cr1" : "=r" (psr));
+ return psr;
+}
+
+/*
* Enables interrupts.
*/
static __inline__ m88k_psr_type enable_interrupts_return_psr(void)