asm-compat.h 1.9 KB

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