asm-compat.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 stringify_in_c(ldarx)
  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_SRL stringify_in_c(srd)
  22. #define PPC_LR_STKOFF 16
  23. #define PPC_MIN_STKFRM 112
  24. #ifdef __BIG_ENDIAN__
  25. #define LHZX_BE stringify_in_c(lhzx)
  26. #define LWZX_BE stringify_in_c(lwzx)
  27. #define LDX_BE stringify_in_c(ldx)
  28. #define STWX_BE stringify_in_c(stwx)
  29. #define STDX_BE stringify_in_c(stdx)
  30. #else
  31. #define LHZX_BE stringify_in_c(lhbrx)
  32. #define LWZX_BE stringify_in_c(lwbrx)
  33. #define LDX_BE stringify_in_c(ldbrx)
  34. #define STWX_BE stringify_in_c(stwbrx)
  35. #define STDX_BE stringify_in_c(stdbrx)
  36. #endif
  37. #else /* 32-bit */
  38. /* operations for longs and pointers */
  39. #define PPC_LL stringify_in_c(lwz)
  40. #define PPC_STL stringify_in_c(stw)
  41. #define PPC_STLU stringify_in_c(stwu)
  42. #define PPC_LCMPI stringify_in_c(cmpwi)
  43. #define PPC_LCMPLI stringify_in_c(cmplwi)
  44. #define PPC_LCMP stringify_in_c(cmpw)
  45. #define PPC_LONG stringify_in_c(.long)
  46. #define PPC_LONG_ALIGN stringify_in_c(.balign 4)
  47. #define PPC_TLNEI stringify_in_c(twnei)
  48. #define PPC_LLARX stringify_in_c(lwarx)
  49. #define PPC_STLCX stringify_in_c(stwcx.)
  50. #define PPC_CNTLZL stringify_in_c(cntlzw)
  51. #define PPC_MTOCRF stringify_in_c(mtcrf)
  52. #define PPC_SRL stringify_in_c(srw)
  53. #define PPC_LR_STKOFF 4
  54. #define PPC_MIN_STKFRM 16
  55. #endif
  56. #endif /* _ASM_POWERPC_ASM_COMPAT_H */