From 9090899a3ed7e26b69f97860bff9b43ad8ced70d Mon Sep 17 00:00:00 2001 From: Steve Murphree Date: Sat, 22 Dec 2001 17:43:15 +0000 Subject: add get_psr() inline for mc88410.h --- sys/arch/mvme88k/include/asm_macro.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/arch/mvme88k') 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 @@ -88,6 +88,16 @@ static __inline__ void set_psr(m88k_psr_type psr) __asm__ __volatile__ (FLUSH_PIPELINE_STRING); } +/* + * 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. */ -- cgit v1.2.3