]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/nios2.h
Add hash command to perform hashing using various algorithms
[karo-tx-uboot.git] / include / nios2.h
index 54954e3f5ae735432851602e7b42a89dff0db4c5..cbca0dc01fca50ec88d247f60d25c1b2ec3c1872 100644 (file)
 /*------------------------------------------------------------------------
  * Access to control regs
  *----------------------------------------------------------------------*/
-#define _str_(x) #x
 
-#define rdctl(reg)\
-       ({unsigned int val;\
-       asm volatile( "rdctl %0, ctl" _str_(reg)\
-               : "=r" (val) ); val;})
-
-#define wrctl(reg,val)\
-       asm volatile( "wrctl ctl" _str_(reg) ",%0"\
-               : : "r" (val))
+#define rdctl(reg) __builtin_rdctl(reg)
+#define wrctl(reg, val) __builtin_wrctl(reg, val)
 
 /*------------------------------------------------------------------------
  * Control reg bit masks