MIPS: Verify the ISA mode and alignment of branch and jump targets
[external/binutils.git] / gas / testsuite / gas / mips / unaligned-branch-micromips-2.s
1         .text
2         .set    noreorder
3         .space  0x1000
4
5         .align  4
6         .set    micromips
7         .ent    foo
8 foo:
9         not     $2, $3
10         bal     bar0
11          not    $2, $3
12         bal     bar1
13          not    $2, $3
14         bal     bar2
15          not    $2, $3
16         bal     bar3
17          not    $2, $3
18         bal     bar4
19          not    $2, $3
20         bal     bar4 + 1
21          not    $2, $3
22         bal     bar4 + 2
23          not    $2, $3
24         bal     bar4 + 3
25          not    $2, $3
26         bal     bar4 + 4
27          not    $2, $3
28         bal     bar16
29          not    $2, $3
30         bal     bar17
31          not    $2, $3
32         bal     bar18
33          not    $2, $3
34         bal     bar18 + 1
35          not    $2, $3
36         bal     bar18 + 2
37          not    $2, $3
38         bal     bar18 + 3
39          not    $2, $3
40         bal     bar18 + 4
41          not    $2, $3
42         bals    bar0
43          not    $2, $3
44         bals    bar1
45          not    $2, $3
46         bals    bar2
47          not    $2, $3
48         bals    bar3
49          not    $2, $3
50         bals    bar4
51          not    $2, $3
52         bals    bar4 + 1
53          not    $2, $3
54         bals    bar4 + 2
55          not    $2, $3
56         bals    bar4 + 3
57          not    $2, $3
58         bals    bar4 + 4
59          not    $2, $3
60         bals    bar16
61          not    $2, $3
62         bals    bar17
63          not    $2, $3
64         bals    bar18
65          not    $2, $3
66         bals    bar18 + 1
67          not    $2, $3
68         bals    bar18 + 2
69          not    $2, $3
70         bals    bar18 + 3
71          not    $2, $3
72         bals    bar18 + 4
73          not    $2, $3
74         bne     $2, $3, bar0
75          not    $2, $3
76         bne     $2, $3, bar1
77          not    $2, $3
78         bne     $2, $3, bar2
79          not    $2, $3
80         bne     $2, $3, bar3
81          not    $2, $3
82         bne     $2, $3, bar4
83          not    $2, $3
84         bne     $2, $3, bar4 + 1
85          not    $2, $3
86         bne     $2, $3, bar4 + 2
87          not    $2, $3
88         bne     $2, $3, bar4 + 3
89          not    $2, $3
90         bne     $2, $3, bar4 + 4
91          not    $2, $3
92         bne     $2, $3, bar16
93          not    $2, $3
94         bne     $2, $3, bar17
95          not    $2, $3
96         bne     $2, $3, bar18
97          not    $2, $3
98         bne     $2, $3, bar18 + 1
99          not    $2, $3
100         bne     $2, $3, bar18 + 2
101          not    $2, $3
102         bne     $2, $3, bar18 + 3
103          not    $2, $3
104         bne     $2, $3, bar18 + 4
105          not    $2, $3
106         b       bar0
107          not    $2, $3
108         b       bar1
109          not    $2, $3
110         b       bar2
111          not    $2, $3
112         b       bar3
113          not    $2, $3
114         b       bar4
115          not    $2, $3
116         b       bar4 + 1
117          not    $2, $3
118         b       bar4 + 2
119          not    $2, $3
120         b       bar4 + 3
121          not    $2, $3
122         b       bar4 + 4
123          not    $2, $3
124         b       bar16
125          not    $2, $3
126         b       bar17
127          not    $2, $3
128         b       bar18
129          not    $2, $3
130         b       bar18 + 1
131          not    $2, $3
132         b       bar18 + 2
133          not    $2, $3
134         b       bar18 + 3
135          not    $2, $3
136         b       bar18 + 4
137          not    $2, $3
138         bnez    $2, bar0
139          not    $2, $3
140         bnez    $2, bar1
141          not    $2, $3
142         bnez    $2, bar2
143          not    $2, $3
144         bnez    $2, bar3
145          not    $2, $3
146         bnez    $2, bar4
147          not    $2, $3
148         bnez    $2, bar4 + 1
149          not    $2, $3
150         bnez    $2, bar4 + 2
151          not    $2, $3
152         bnez    $2, bar4 + 3
153          not    $2, $3
154         bnez    $2, bar4 + 4
155          not    $2, $3
156         bnez    $2, bar16
157          not    $2, $3
158         bnez    $2, bar17
159          not    $2, $3
160         bnez    $2, bar18
161          not    $2, $3
162         bnez    $2, bar18 + 1
163          not    $2, $3
164         bnez    $2, bar18 + 2
165          not    $2, $3
166         bnez    $2, bar18 + 3
167          not    $2, $3
168         bnez    $2, bar18 + 4
169          not    $2, $3
170         jalr    $0, $ra
171          not    $2, $3
172         .end    foo
173
174 # Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
175         .align  4, 0
176         .space  16
177
178         .macro  obj n:req
179         .globl  bar\@
180         .type   bar\@, @object
181 bar\@ :
182         .byte   0
183         .size   bar\@, . - bar\@
184         .if     \n - 1
185         obj     \n - 1
186         .endif
187         .endm
188
189         .macro  fun n:req
190         .globl  bar\@
191         .type   bar\@, @function
192 bar\@ :
193         .insn
194         .hword  0
195         .size   bar\@, . - bar\@
196         .if     \n - 1
197         fun     \n - 1
198         .endif
199         .endm
200
201         .align  4
202         obj     16
203         fun     8