PR binutils/15834
[deliverable/binutils-gdb.git] / gas / testsuite / gas / arm / bundle-lock.s
1 .syntax unified
2 .bundle_align_mode 4
3
4 # We use these macros to test each pattern at every offset from
5 # bundle alignment, i.e. [0,16) by 2 or 4.
6
7 size_arm = 4
8 size_thumb = 2
9
10 .macro offset_sequence which, size, offset
11 .p2align 4
12 \which\()_sequence_\size\()_offset_\offset\():
13 .rept \offset / size_\which
14 bkpt
15 .endr
16 test_sequence \size
17 .endm
18
19 .macro test_offsets_arm size
20 .arm
21 offset_sequence arm, \size, 0
22 offset_sequence arm, \size, 4
23 offset_sequence arm, \size, 8
24 offset_sequence arm, \size, 12
25 .endm
26
27 .macro test_offsets_thumb size
28 .thumb
29 offset_sequence thumb, \size, 0
30 offset_sequence thumb, \size, 2
31 offset_sequence thumb, \size, 4
32 offset_sequence thumb, \size, 6
33 offset_sequence thumb, \size, 8
34 offset_sequence thumb, \size, 10
35 offset_sequence thumb, \size, 12
36 offset_sequence thumb, \size, 14
37 .endm
38
39 .macro test_sequence size
40 .bundle_lock
41 adds r0, r1
42 .rept \size - 1
43 subs r0, r1
44 .endr
45 .bundle_unlock
46 .endm
47
48 test_offsets_arm 1
49 test_offsets_arm 2
50 test_offsets_arm 3
51 test_offsets_arm 4
52
53 test_offsets_thumb 1
54 test_offsets_thumb 2
55 test_offsets_thumb 3
56 test_offsets_thumb 4
57 test_offsets_thumb 5
58 test_offsets_thumb 6
59 test_offsets_thumb 7
60 test_offsets_thumb 8
61
62 .arm
63 .p2align 4
64 bkpt
This page took 0.030472 seconds and 4 git commands to generate.