arm_asm.h 962 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Various definitons used the the ARM uClibc assembly code. */
  2. #ifndef _ARM_ASM_H
  3. #define _ARM_ASM_H
  4. #ifdef __thumb2__
  5. # ifdef __ASSEMBLER__
  6. .thumb
  7. .syntax unified
  8. # endif /* __ASSEMBLER__ */
  9. #define IT(t, cond) i##t cond
  10. #else
  11. /* XXX: This can be removed if/when we require an assembler that supports
  12. unified assembly syntax. */
  13. #define IT(t, cond)
  14. /* Code to return from a thumb function stub. */
  15. #ifdef __ARM_ARCH_4T__
  16. #define POP_RET pop {r2, pc}
  17. #else
  18. #define POP_RET pop {r2, r3}; bx r3
  19. #endif
  20. #endif
  21. #if defined(__ARM_ARCH_6M__)
  22. /* Force arm mode to flush out errors on M profile cores. */
  23. #undef IT
  24. #define THUMB1_ONLY 1
  25. #endif
  26. #if defined(__USE_BX__)
  27. # if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
  28. || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
  29. )
  30. # error Use of BX was requested, but is not available on the target processor.
  31. # endif /* ARCH level */
  32. #endif /* __USE_BX__ */
  33. #endif /* _ARM_ASM_H */