1 #ifndef _ASM_POWERPC_ASM_COMPAT_H
2 #define _ASM_POWERPC_ASM_COMPAT_H
4 #include <linux/config.h>
8 # define stringify_in_c(...) __VA_ARGS__
9 # define ASM_CONST(x) x
11 /* This version of stringify will deal with commas... */
12 # define __stringify_in_c(...) #__VA_ARGS__
13 # define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
14 # define __ASM_CONST(x) x##UL
15 # define ASM_CONST(x) __ASM_CONST(x)
20 /* operations for longs and pointers */
21 #define PPC_LL stringify_in_c(ld)
22 #define PPC_STL stringify_in_c(std)
23 #define PPC_LCMPI stringify_in_c(cmpdi)
24 #define PPC_LONG stringify_in_c(.llong)
25 #define PPC_TLNEI stringify_in_c(tdnei)
26 #define PPC_LLARX stringify_in_c(ldarx)
27 #define PPC_STLCX stringify_in_c(stdcx.)
28 #define PPC_CNTLZL stringify_in_c(cntlzd)
32 /* operations for longs and pointers */
33 #define PPC_LL stringify_in_c(lwz)
34 #define PPC_STL stringify_in_c(stw)
35 #define PPC_LCMPI stringify_in_c(cmpwi)
36 #define PPC_LONG stringify_in_c(.long)
37 #define PPC_TLNEI stringify_in_c(twnei)
38 #define PPC_LLARX stringify_in_c(lwarx)
39 #define PPC_STLCX stringify_in_c(stwcx.)
40 #define PPC_CNTLZL stringify_in_c(cntlzw)
44 #ifdef CONFIG_IBM405_ERR77
45 /* Erratum #77 on the 405 means we need a sync or dcbt before every
46 * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this.
48 #define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;)
49 #define PPC405_ERR77_SYNC stringify_in_c(sync;)
51 #define PPC405_ERR77(ra,rb)
52 #define PPC405_ERR77_SYNC
55 #endif /* _ASM_POWERPC_ASM_COMPAT_H */