summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-02-17 21:33:48 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-02-17 21:33:48 +0000
commitbe1d3cc59ea0f3f3307a7248e61478fc1cf871b3 (patch)
treef4f347af09313d1c6f9f33fd78c708937ec242b0 /sys/arch
parent43395084b35458794440ac2432a1985955c498cb (diff)
add wrasr (the name says it all)
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/asm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sparc/sparc/asm.h b/sys/arch/sparc/sparc/asm.h
index 3258be1e584..d6972b91fac 100644
--- a/sys/arch/sparc/sparc/asm.h
+++ b/sys/arch/sparc/sparc/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.3 1999/09/03 18:11:28 art Exp $ */
+/* $OpenBSD: asm.h,v 1.4 2000/02/17 21:33:47 art Exp $ */
/* $NetBSD: asm.h,v 1.4 1996/07/01 18:01:26 abrown Exp $ */
/*
@@ -123,3 +123,7 @@
__asm __volatile("swap [%2],%0" : "=&r" (val) : "0" (val), "r" (loc)); \
})
+#define wrasr(value, asr) _wrasr(value, asr)
+#define _wrasr(value, asr) ({ \
+ __asm __volatile("wr %0, 0, %%asr"#asr : : "r" ((int)(value))); \
+})