Commit | Line | Data |
---|---|---|
3ddfbcf1 DG |
1 | #ifndef _ASM_POWERPC_ASM_COMPAT_H |
2 | #define _ASM_POWERPC_ASM_COMPAT_H | |
3 | ||
ec0c464c | 4 | #include <asm/asm-const.h> |
3ddfbcf1 | 5 | #include <asm/types.h> |
864b9e6f | 6 | #include <asm/ppc-opcode.h> |
3ddfbcf1 | 7 | |
3ddfbcf1 DG |
8 | #ifdef __powerpc64__ |
9 | ||
10 | /* operations for longs and pointers */ | |
11 | #define PPC_LL stringify_in_c(ld) | |
12 | #define PPC_STL stringify_in_c(std) | |
56db45a5 | 13 | #define PPC_STLU stringify_in_c(stdu) |
3ddfbcf1 | 14 | #define PPC_LCMPI stringify_in_c(cmpdi) |
fb7fc08e DK |
15 | #define PPC_LCMPLI stringify_in_c(cmpldi) |
16 | #define PPC_LCMP stringify_in_c(cmpd) | |
eb039161 | 17 | #define PPC_LONG stringify_in_c(.8byte) |
6a2a24bb | 18 | #define PPC_LONG_ALIGN stringify_in_c(.balign 8) |
3ddfbcf1 | 19 | #define PPC_TLNEI stringify_in_c(tdnei) |
864b9e6f | 20 | #define PPC_LLARX(t, a, b, eh) PPC_LDARX(t, a, b, eh) |
3ddfbcf1 DG |
21 | #define PPC_STLCX stringify_in_c(stdcx.) |
22 | #define PPC_CNTLZL stringify_in_c(cntlzd) | |
86e32fdc | 23 | #define PPC_MTOCRF(FXM, RS) MTOCRF((FXM), RS) |
9eff26ea | 24 | #define PPC_LR_STKOFF 16 |
0016a4cf | 25 | #define PPC_MIN_STKFRM 112 |
7ffcf8ec AB |
26 | |
27 | #ifdef __BIG_ENDIAN__ | |
156d0e29 | 28 | #define LHZX_BE stringify_in_c(lhzx) |
8f6822c4 | 29 | #define LWZX_BE stringify_in_c(lwzx) |
7ffcf8ec | 30 | #define LDX_BE stringify_in_c(ldx) |
8f6822c4 | 31 | #define STWX_BE stringify_in_c(stwx) |
7ffcf8ec AB |
32 | #define STDX_BE stringify_in_c(stdx) |
33 | #else | |
156d0e29 | 34 | #define LHZX_BE stringify_in_c(lhbrx) |
8f6822c4 | 35 | #define LWZX_BE stringify_in_c(lwbrx) |
7ffcf8ec | 36 | #define LDX_BE stringify_in_c(ldbrx) |
8f6822c4 | 37 | #define STWX_BE stringify_in_c(stwbrx) |
7ffcf8ec AB |
38 | #define STDX_BE stringify_in_c(stdbrx) |
39 | #endif | |
40 | ||
3ddfbcf1 DG |
41 | #else /* 32-bit */ |
42 | ||
43 | /* operations for longs and pointers */ | |
44 | #define PPC_LL stringify_in_c(lwz) | |
45 | #define PPC_STL stringify_in_c(stw) | |
56db45a5 | 46 | #define PPC_STLU stringify_in_c(stwu) |
3ddfbcf1 | 47 | #define PPC_LCMPI stringify_in_c(cmpwi) |
fb7fc08e DK |
48 | #define PPC_LCMPLI stringify_in_c(cmplwi) |
49 | #define PPC_LCMP stringify_in_c(cmpw) | |
3ddfbcf1 | 50 | #define PPC_LONG stringify_in_c(.long) |
6a2a24bb | 51 | #define PPC_LONG_ALIGN stringify_in_c(.balign 4) |
3ddfbcf1 | 52 | #define PPC_TLNEI stringify_in_c(twnei) |
864b9e6f | 53 | #define PPC_LLARX(t, a, b, eh) PPC_LWARX(t, a, b, eh) |
3ddfbcf1 DG |
54 | #define PPC_STLCX stringify_in_c(stwcx.) |
55 | #define PPC_CNTLZL stringify_in_c(cntlzw) | |
3467bfd3 | 56 | #define PPC_MTOCRF stringify_in_c(mtcrf) |
9eff26ea | 57 | #define PPC_LR_STKOFF 4 |
0016a4cf | 58 | #define PPC_MIN_STKFRM 16 |
3ddfbcf1 DG |
59 | |
60 | #endif | |
61 | ||
3ddfbcf1 | 62 | #endif /* _ASM_POWERPC_ASM_COMPAT_H */ |