diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-06-09 18:58:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-06-09 18:58:15 +0000 |
commit | 082186062f48c3eeb60057f9afc27164c0754cc3 (patch) | |
tree | a360a18db77a12253faf9df148e1ffda0a995d57 /sys/arch | |
parent | b572199aacfe7fe314e968cca47aff429c3d3a8b (diff) |
Add mtdec().
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc64/include/cpufunc.h | 8 |
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) { |