summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/shared/spr.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 15:37:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-14 15:37:30 +0000
commit90ff45b78d0a8c4ae7e6c99ae58fddac2eb5b5bd (patch)
treec8b75202c4904b39f900d5e15515aa69551983a0 /c/src/lib/libcpu/powerpc/shared/spr.h
parentPatch rtemsdoc-4.5.0-rc-13-cvs.diff.gz from Ralf Corsepius (diff)
downloadrtems-90ff45b78d0a8c4ae7e6c99ae58fddac2eb5b5bd.tar.bz2
Moved from score/cpu/PowerPC.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/shared/spr.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/c/src/lib/libcpu/powerpc/shared/spr.h b/c/src/lib/libcpu/powerpc/shared/spr.h
deleted file mode 100644
index 2df38f5644..0000000000
--- a/c/src/lib/libcpu/powerpc/shared/spr.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * spr.h -- Access to special purpose registers.
- *
- * Copyright (C) 1998 Gabriel Paubert, paubert@iram.es
- *
- * Modified to compile in RTEMS development environment
- * by Eric Valette
- *
- * Copyright (C) 1999 Eric Valette. valette@crf.canon.fr
- *
- * The license and distribution terms for this file may be
- * found in found in the file LICENSE in this distribution or at
- * http://www.OARcorp.com/rtems/license.html.
- *
- * $Id$
- *
- */
-
-
-#ifndef _PPC_SPR_H
-#define _PPC_SPR_H
-
-#include <libcpu/cpu.h>
-
-#define __MFSPR(reg, val) \
- __asm__ __volatile__("mfspr %0,"#reg : "=r" (val))
-
-#define __MTSPR(val, reg) \
- __asm__ __volatile__("mtspr "#reg",%0" : : "r" (val))
-
-
-#define SPR_RW(reg) \
-static inline unsigned long _read_##reg(void) \
-{\
- unsigned long val;\
- __MFSPR(reg, val);\
- return val;\
-}\
-static inline void _write_##reg(unsigned long val)\
-{\
- __MTSPR(val,reg);\
- return;\
-}
-
-#define SPR_RO(reg) \
-static inline unsigned long _read_##reg(void) \
-{\
- unsigned long val;\
- __MFSPR(reg,val);\
- return val;\
-}
-
-static inline unsigned long _read_MSR(void)
-{
- unsigned long val;
- asm volatile("mfmsr %0" : "=r" (val));
- return val;
-}
-
-static inline void _write_MSR(unsigned long val)
-{
- asm volatile("mtmsr %0" : : "r" (val));
- return;
-}
-
-static inline unsigned long _read_SR(void * va)
-{
- unsigned long val;
- asm volatile("mfsrin %0,%1" : "=r" (val): "r" (va));
- return val;
-}
-
-static inline void _write_SR(unsigned long val, void * va)
-{
- asm volatile("mtsrin %0,%1" : : "r"(val), "r" (va): "memory");
- return;
-}
-
-
-#endif