asm-compat.h 1.9 KB
Newer Older
1 2 3
#ifndef _ASM_POWERPC_ASM_COMPAT_H
#define _ASM_POWERPC_ASM_COMPAT_H

4
#include <asm/asm-const.h>
5
#include <asm/types.h>
6
#include <asm/ppc-opcode.h>
7 8 9 10 11 12

#ifdef __powerpc64__

/* operations for longs and pointers */
#define PPC_LL		stringify_in_c(ld)
#define PPC_STL		stringify_in_c(std)
A
Alexander Graf 已提交
13
#define PPC_STLU	stringify_in_c(stdu)
14
#define PPC_LCMPI	stringify_in_c(cmpdi)
15 16
#define PPC_LCMPLI	stringify_in_c(cmpldi)
#define PPC_LCMP	stringify_in_c(cmpd)
17
#define PPC_LONG	stringify_in_c(.8byte)
18
#define PPC_LONG_ALIGN	stringify_in_c(.balign 8)
19
#define PPC_TLNEI	stringify_in_c(tdnei)
20
#define PPC_LLARX(t, a, b, eh)	PPC_LDARX(t, a, b, eh)
21 22
#define PPC_STLCX	stringify_in_c(stdcx.)
#define PPC_CNTLZL	stringify_in_c(cntlzd)
23
#define PPC_MTOCRF(FXM, RS) MTOCRF((FXM), RS)
24
#define PPC_LR_STKOFF	16
25
#define PPC_MIN_STKFRM	112
26 27

#ifdef __BIG_ENDIAN__
28
#define LHZX_BE	stringify_in_c(lhzx)
29
#define LWZX_BE	stringify_in_c(lwzx)
30
#define LDX_BE	stringify_in_c(ldx)
31
#define STWX_BE	stringify_in_c(stwx)
32 33
#define STDX_BE	stringify_in_c(stdx)
#else
34
#define LHZX_BE	stringify_in_c(lhbrx)
35
#define LWZX_BE	stringify_in_c(lwbrx)
36
#define LDX_BE	stringify_in_c(ldbrx)
37
#define STWX_BE	stringify_in_c(stwbrx)
38 39 40
#define STDX_BE	stringify_in_c(stdbrx)
#endif

41 42 43 44 45
#else /* 32-bit */

/* operations for longs and pointers */
#define PPC_LL		stringify_in_c(lwz)
#define PPC_STL		stringify_in_c(stw)
A
Alexander Graf 已提交
46
#define PPC_STLU	stringify_in_c(stwu)
47
#define PPC_LCMPI	stringify_in_c(cmpwi)
48 49
#define PPC_LCMPLI	stringify_in_c(cmplwi)
#define PPC_LCMP	stringify_in_c(cmpw)
50
#define PPC_LONG	stringify_in_c(.long)
51
#define PPC_LONG_ALIGN	stringify_in_c(.balign 4)
52
#define PPC_TLNEI	stringify_in_c(twnei)
53
#define PPC_LLARX(t, a, b, eh)	PPC_LWARX(t, a, b, eh)
54 55
#define PPC_STLCX	stringify_in_c(stwcx.)
#define PPC_CNTLZL	stringify_in_c(cntlzw)
56
#define PPC_MTOCRF	stringify_in_c(mtcrf)
57
#define PPC_LR_STKOFF	4
58
#define PPC_MIN_STKFRM	16
59 60 61 62

#endif

#endif /* _ASM_POWERPC_ASM_COMPAT_H */