unified.h 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * include/asm-arm/unified.h - Unified Assembler Syntax helper macros
  4. *
  5. * Copyright (C) 2008 ARM Limited
  6. */
  7. #ifndef __ASM_UNIFIED_H
  8. #define __ASM_UNIFIED_H
  9. #if defined(__ASSEMBLY__)
  10. .syntax unified
  11. #else
  12. __asm__(".syntax unified");
  13. #endif
  14. #ifdef CONFIG_CPU_V7M
  15. #define AR_CLASS(x...)
  16. #define M_CLASS(x...) x
  17. #else
  18. #define AR_CLASS(x...) x
  19. #define M_CLASS(x...)
  20. #endif
  21. #ifdef CONFIG_THUMB2_KERNEL
  22. /* The CPSR bit describing the instruction set (Thumb) */
  23. #define PSR_ISETSTATE PSR_T_BIT
  24. #define ARM(x...)
  25. #define THUMB(x...) x
  26. #ifdef __ASSEMBLY__
  27. #define W(instr) instr.w
  28. #else
  29. #define WASM(instr) #instr ".w"
  30. #endif
  31. #else /* !CONFIG_THUMB2_KERNEL */
  32. /* The CPSR bit describing the instruction set (ARM) */
  33. #define PSR_ISETSTATE 0
  34. #define ARM(x...) x
  35. #define THUMB(x...)
  36. #ifdef __ASSEMBLY__
  37. #define W(instr) instr
  38. #else
  39. #define WASM(instr) #instr
  40. #endif
  41. #endif /* CONFIG_THUMB2_KERNEL */
  42. #endif /* !__ASM_UNIFIED_H */