1
# thumb_blx_out_of_range.s
2
# Test THUMB/THUMB-2 blx instructions just out of the branch range limits.
7
# Add padding so that target is just output of branch range.
10
.global _forward_target
11
.global _backward_target
12
.type _backword_target, %function
15
.size _backward_target, .-_backward_target
18
# Use 256-byte alignment so that we know where the stubs start.
21
# Define _start so that linker does not complain.
25
.type _start, %function
28
.size _start, .-_start
30
.global _backward_test
33
.type _backward_test, %function
36
.size _backward_test, .-_backward_test
42
.type _forward_test, %function
44
# Bit 1 of the BLX target comes from bit 1 of branch base address,
45
# which is BLX instruction's address + 4. We intentionally put this
46
# forward BLX at an address n*4 + 2 so that the branch offset is
50
.size _forward_test, .-_forward_test
52
# switch back to ARM mode so that stubs are disassembled correctly.
56
.section .text.post,"x"
58
# Add padding so that target is just out of branch range.
62
.global _forward_target
63
.type _forward_target, %function
66
.size _forward_target, .-_forward_target