From 43e87179f8693aed6bdcce5ae1592039917bed28 Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Wed, 5 Feb 2003 11:59:27 +0000 Subject: [PATCH] Add an inline function wrapper for the mfpvf (Move From Processor Version Register) instruction. --- sys/powerpc/include/cpufunc.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 94ec9e12b34..fbbb5015837 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -101,6 +101,16 @@ mfdec(void) return (value); } +static __inline register_t +mfpvr(void) +{ + register_t value; + + __asm __volatile ("mfpvr %0" : "=r"(value)); + + return (value); +} + static __inline void eieio(void) {