summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2007-05-08 15:57:43 +0200
committerMichal Simek <monstr@monstr.eu>2007-05-08 15:57:43 +0200
commite69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1 (patch)
treea7b64115395d553515ecc0a3dfbde9442f4ad508 /include
parent1a50f164beb065f360fbddb76029607d6b099698 (diff)
downloadu-boot-imx-e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1.zip
u-boot-imx-e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1.tar.gz
u-boot-imx-e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1.tar.bz2
add: reading special purpose registers
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asm-microblaze/asm.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/include/asm-microblaze/asm.h b/include/asm-microblaze/asm.h
index 8302ed8..f10f89c 100755
--- a/include/asm-microblaze/asm.h
+++ b/include/asm-microblaze/asm.h
@@ -49,23 +49,18 @@
/* CPU dependent */
/* machine status register */
-#define MFS(val) \
- __asm__ __volatile__ ("mfs %0, rmsr":"=r" (val));
+#define MFS(val, reg) \
+ __asm__ __volatile__ ("mfs %0," #reg :"=r" (val));
-#define MTS(val) \
- __asm__ __volatile__ ("mts rmsr, %0"::"r" (val));
-
-/* exception status register */
-#define MFSEAR(val) \
- __asm__ __volatile ("mfs %0,rear":"=r" (val));
-
-#define MFSESR(val) \
- __asm__ __volatile ("mfs %0,resr":"=r" (val));
+#define MTS(val, reg) \
+ __asm__ __volatile__ ("mts " #reg ", %0"::"r" (val));
/* get return address from interrupt */
#define R14(val) \
__asm__ __volatile__ ("addi %0, r14, 0":"=r" (val));
+#define NOP __asm__ __volatile__ ("nop");
+
/* use machine status registe USE_MSR_REG */
#ifdef XILINX_USE_MSR_INSTR
#define MSRSET(val) \