summaryrefslogtreecommitdiffstats
path: root/include/asm-microblaze
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/asm-microblaze
parent1a50f164beb065f360fbddb76029607d6b099698 (diff)
downloadblackbird-obmc-uboot-e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1.tar.gz
blackbird-obmc-uboot-e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1.zip
add: reading special purpose registers
Diffstat (limited to 'include/asm-microblaze')
-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 8302ed8850..f10f89c941 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) \
OpenPOWER on IntegriCloud