18c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_ASM_COMPAT_H 28c2ecf20Sopenharmony_ci#define _ASM_POWERPC_ASM_COMPAT_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include <asm/asm-const.h> 58c2ecf20Sopenharmony_ci#include <asm/types.h> 68c2ecf20Sopenharmony_ci#include <asm/ppc-opcode.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifdef __powerpc64__ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* operations for longs and pointers */ 118c2ecf20Sopenharmony_ci#define PPC_LL stringify_in_c(ld) 128c2ecf20Sopenharmony_ci#define PPC_STL stringify_in_c(std) 138c2ecf20Sopenharmony_ci#define PPC_STLU stringify_in_c(stdu) 148c2ecf20Sopenharmony_ci#define PPC_LCMPI stringify_in_c(cmpdi) 158c2ecf20Sopenharmony_ci#define PPC_LCMPLI stringify_in_c(cmpldi) 168c2ecf20Sopenharmony_ci#define PPC_LCMP stringify_in_c(cmpd) 178c2ecf20Sopenharmony_ci#define PPC_LONG stringify_in_c(.8byte) 188c2ecf20Sopenharmony_ci#define PPC_LONG_ALIGN stringify_in_c(.balign 8) 198c2ecf20Sopenharmony_ci#define PPC_TLNEI stringify_in_c(tdnei) 208c2ecf20Sopenharmony_ci#define PPC_LLARX(t, a, b, eh) PPC_LDARX(t, a, b, eh) 218c2ecf20Sopenharmony_ci#define PPC_STLCX stringify_in_c(stdcx.) 228c2ecf20Sopenharmony_ci#define PPC_CNTLZL stringify_in_c(cntlzd) 238c2ecf20Sopenharmony_ci#define PPC_MTOCRF(FXM, RS) MTOCRF((FXM), RS) 248c2ecf20Sopenharmony_ci#define PPC_LR_STKOFF 16 258c2ecf20Sopenharmony_ci#define PPC_MIN_STKFRM 112 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN__ 288c2ecf20Sopenharmony_ci#define LHZX_BE stringify_in_c(lhzx) 298c2ecf20Sopenharmony_ci#define LWZX_BE stringify_in_c(lwzx) 308c2ecf20Sopenharmony_ci#define LDX_BE stringify_in_c(ldx) 318c2ecf20Sopenharmony_ci#define STWX_BE stringify_in_c(stwx) 328c2ecf20Sopenharmony_ci#define STDX_BE stringify_in_c(stdx) 338c2ecf20Sopenharmony_ci#else 348c2ecf20Sopenharmony_ci#define LHZX_BE stringify_in_c(lhbrx) 358c2ecf20Sopenharmony_ci#define LWZX_BE stringify_in_c(lwbrx) 368c2ecf20Sopenharmony_ci#define LDX_BE stringify_in_c(ldbrx) 378c2ecf20Sopenharmony_ci#define STWX_BE stringify_in_c(stwbrx) 388c2ecf20Sopenharmony_ci#define STDX_BE stringify_in_c(stdbrx) 398c2ecf20Sopenharmony_ci#endif 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#else /* 32-bit */ 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci/* operations for longs and pointers */ 448c2ecf20Sopenharmony_ci#define PPC_LL stringify_in_c(lwz) 458c2ecf20Sopenharmony_ci#define PPC_STL stringify_in_c(stw) 468c2ecf20Sopenharmony_ci#define PPC_STLU stringify_in_c(stwu) 478c2ecf20Sopenharmony_ci#define PPC_LCMPI stringify_in_c(cmpwi) 488c2ecf20Sopenharmony_ci#define PPC_LCMPLI stringify_in_c(cmplwi) 498c2ecf20Sopenharmony_ci#define PPC_LCMP stringify_in_c(cmpw) 508c2ecf20Sopenharmony_ci#define PPC_LONG stringify_in_c(.long) 518c2ecf20Sopenharmony_ci#define PPC_LONG_ALIGN stringify_in_c(.balign 4) 528c2ecf20Sopenharmony_ci#define PPC_TLNEI stringify_in_c(twnei) 538c2ecf20Sopenharmony_ci#define PPC_LLARX(t, a, b, eh) PPC_LWARX(t, a, b, eh) 548c2ecf20Sopenharmony_ci#define PPC_STLCX stringify_in_c(stwcx.) 558c2ecf20Sopenharmony_ci#define PPC_CNTLZL stringify_in_c(cntlzw) 568c2ecf20Sopenharmony_ci#define PPC_MTOCRF stringify_in_c(mtcrf) 578c2ecf20Sopenharmony_ci#define PPC_LR_STKOFF 4 588c2ecf20Sopenharmony_ci#define PPC_MIN_STKFRM 16 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#endif 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_ASM_COMPAT_H */ 63