diff options
author | Michal Simek <monstr@monstr.eu> | 2007-05-08 15:57:43 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2007-05-08 15:57:43 +0200 |
commit | e69f66c6ebe82bbbd1da766bc4eda40ec7ee5af1 (patch) | |
tree | a7b64115395d553515ecc0a3dfbde9442f4ad508 /include/asm-microblaze/asm.h | |
parent | 1a50f164beb065f360fbddb76029607d6b099698 (diff) | |
download | u-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/asm-microblaze/asm.h')
-rwxr-xr-x | include/asm-microblaze/asm.h | 17 |
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) \ |