ppc_asm.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __SELFTESTS_POWERPC_PPC_ASM_H
  3. #define __SELFTESTS_POWERPC_PPC_ASM_H
  4. #include <ppc-asm.h>
  5. #define CONFIG_ALTIVEC
  6. #define r1 1
  7. #define R14 r14
  8. #define R15 r15
  9. #define R16 r16
  10. #define R17 r17
  11. #define R18 r18
  12. #define R19 r19
  13. #define R20 r20
  14. #define R21 r21
  15. #define R22 r22
  16. #define R29 r29
  17. #define R30 r30
  18. #define R31 r31
  19. #define STACKFRAMESIZE 256
  20. #define STK_REG(i) (112 + ((i)-14)*8)
  21. #define _GLOBAL(A) FUNC_START(test_ ## A)
  22. #define _GLOBAL_TOC(A) _GLOBAL(A)
  23. #define PPC_MTOCRF(A, B) mtocrf A, B
  24. #define EX_TABLE(x, y) \
  25. .section __ex_table,"a"; \
  26. .8byte x, y; \
  27. .previous
  28. #define BEGIN_FTR_SECTION .if test_feature
  29. #define FTR_SECTION_ELSE .else
  30. #define ALT_FTR_SECTION_END_IFCLR(x) .endif
  31. #define ALT_FTR_SECTION_END_IFSET(x) .endif
  32. #define ALT_FTR_SECTION_END(x, y) .endif
  33. #define END_FTR_SECTION_IFCLR(x) .endif
  34. #define END_FTR_SECTION_IFSET(x) .endif
  35. /* Default to taking the first of any alternative feature sections */
  36. test_feature = 1
  37. #endif /* __SELFTESTS_POWERPC_PPC_ASM_H */