summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-06-09 18:58:15 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-06-09 18:58:15 +0000
commit082186062f48c3eeb60057f9afc27164c0754cc3 (patch)
treea360a18db77a12253faf9df148e1ffda0a995d57 /sys/arch
parentb572199aacfe7fe314e968cca47aff429c3d3a8b (diff)
Add mtdec().
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/powerpc64/include/cpufunc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/arch/powerpc64/include/cpufunc.h b/sys/arch/powerpc64/include/cpufunc.h
index 9568b018188..4803107d7dd 100644
--- a/sys/arch/powerpc64/include/cpufunc.h
+++ b/sys/arch/powerpc64/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.3 2020/06/07 13:17:24 kettenis Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.4 2020/06/09 18:58:14 kettenis Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
@@ -119,6 +119,12 @@ mfdar(void)
return value;
}
+static inline void
+mtdec(uint32_t value)
+{
+ __asm volatile ("mtdec %0" :: "r"(value));
+}
+
static inline uint64_t
mflpcr(void)
{