From 3e20261f8ae7b7abe3167edff7962383c34c5006 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 8 Jan 2002 04:36:01 +0000 Subject: [PATCH] Add a mov() macro, which is used in conjunction with the register defines for setting reserved global registers from c. --- sys/sparc64/include/cpufunc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h index 861b1bdcfe10..26f3c05fa52d 100644 --- a/sys/sparc64/include/cpufunc.h +++ b/sys/sparc64/include/cpufunc.h @@ -80,6 +80,10 @@ __asm __volatile("flushw" : :); \ } while (0) +#define mov(val, reg) do { \ + __asm __volatile("mov %0, %" __XSTRING(reg) : : "r" (val)); \ +} while (0) + /* Generate ld*a/st*a functions for non-constant ASI's. */ #define LDNC_GEN(tp, o) \ static __inline tp \