arm_bl_in_range.s 841 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # arm_bl_in_range.s
  2. # Test ARM bl instructions just within branch range limits.
  3. .syntax unified
  4. .arch armv5te
  5. .section .text.pre,"x"
  6. # Add padding so that target is just within branch range.
  7. .space 12
  8. .align 2
  9. .global _backward_target
  10. _backward_target:
  11. bx lr
  12. .size _backward_target, .-_backward_target
  13. .text
  14. .align 2
  15. # Define _start so that linker does not complain.
  16. .global _start
  17. _start:
  18. bx lr
  19. .size _start, .-_start
  20. .global _backward_test
  21. _backward_test:
  22. bl _backward_target
  23. .size _backward_test, .-_backward_test
  24. .global _forward_test
  25. _forward_test:
  26. bl _forward_target
  27. .size _forward_test, .-_forward_test
  28. .section .text.post,"x"
  29. # Add padding so that target is just within of branch range.
  30. .space 12
  31. .align 2
  32. .global _forward_target
  33. _forward_target:
  34. bx lr
  35. .size _forward_target, .-_forward_target