arm_asm.h 912 B

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