1# RUN: not llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 -mattr=+msa -arch=mips -mattr=+micromips 2>&1  | FileCheck %s
2#
3# CHECK: error: branch to misaligned address
4# CHECK:        b -65535
5# CHECK: error: branch target out of range
6# CHECK:        b -65537
7# CHECK: error: branch to misaligned address
8# CHECK:        b 65535
9# CHECK: error: branch target out of range
10# CHECK:        b 65536
11
12# CHECK: error: branch to misaligned address
13# CHECK:        beq $1, $1, -65535
14# CHECK: error: branch target out of range
15# CHECK:        beq $1, $1, -65537
16# CHECK: error: branch to misaligned address
17# CHECK:        beq $1, $1, 65535
18# CHECK: error: branch target out of range
19# CHECK:        beq $1, $1, 65536
20
21# CHECK: error: branch to misaligned address
22# CHECK:        bne $1, $1, -65535
23# CHECK: error: branch target out of range
24# CHECK:        bne $1, $1, -65537
25# CHECK: error: branch to misaligned address
26# CHECK:        bne $1, $1, 65535
27# CHECK: error: branch target out of range
28# CHECK:        bne $1, $1, 65536
29
30# CHECK: error: branch to misaligned address
31# CHECK:        bal -65535
32# CHECK: error: branch target out of range
33# CHECK:        bal -65537
34# CHECK: error: branch to misaligned address
35# CHECK:        bal 65535
36# CHECK: error: branch target out of range
37# CHECK:        bal 65536
38
39# CHECK: error: branch to misaligned address
40# CHECK:        bgez $1, -65535
41# CHECK: error: branch target out of range
42# CHECK:        bgez $1, -65537
43# CHECK: error: branch to misaligned address
44# CHECK:        bgez $1, 65535
45# CHECK: error: branch target out of range
46# CHECK:        bgez $1, 65536
47
48# CHECK: error: branch to misaligned address
49# CHECK:        bgtz $1, -65535
50# CHECK: error: branch target out of range
51# CHECK:        bgtz $1, -65537
52# CHECK: error: branch to misaligned address
53# CHECK:        bgtz $1, 65535
54# CHECK: error: branch target out of range
55# CHECK:        bgtz $1, 65536
56
57# CHECK: error: branch to misaligned address
58# CHECK:        blez $1, -65535
59# CHECK: error: branch target out of range
60# CHECK:        blez $1, -65537
61# CHECK: error: branch to misaligned address
62# CHECK:        blez $1, 65535
63# CHECK: error: branch target out of range
64# CHECK:        blez $1, 65536
65
66# CHECK: error: branch to misaligned address
67# CHECK:        bltz $1, -65535
68# CHECK: error: branch target out of range
69# CHECK:        bltz $1, -65537
70# CHECK: error: branch to misaligned address
71# CHECK:        bltz $1, 65535
72# CHECK: error: branch target out of range
73# CHECK:        bltz $1, 65536
74
75# CHECK: error: branch to misaligned address
76# CHECK:        bgezal $1, -65535
77# CHECK: error: branch target out of range
78# CHECK:        bgezal $1, -65537
79# CHECK: error: branch to misaligned address
80# CHECK:        bgezal $1, 65535
81# CHECK: error: branch target out of range
82# CHECK:        bgezal $1, 65536
83
84# CHECK: error: branch to misaligned address
85# CHECK:        bltzal $1, -65535
86# CHECK: error: branch target out of range
87# CHECK:        bltzal $1, -65537
88# CHECK: error: branch to misaligned address
89# CHECK:        bltzal $1, 65535
90# CHECK: error: branch target out of range
91# CHECK:        bltzal $1, 65536
92
93# CHECK: error: branch to misaligned address
94# CHECK:        bc1f -65535
95# CHECK: error: branch target out of range
96# CHECK:        bc1f -65537
97# CHECK: error: branch to misaligned address
98# CHECK:        bc1f 65535
99# CHECK: error: branch target out of range
100# CHECK:        bc1f 65536
101
102# CHECK: error: branch to misaligned address
103# CHECK:        bc1f $fcc0, -65535
104# CHECK: error: branch target out of range
105# CHECK:        bc1f $fcc0, -65537
106# CHECK: error: branch to misaligned address
107# CHECK:        bc1f $fcc0, 65535
108# CHECK: error: branch target out of range
109# CHECK:        bc1f $fcc0, 65536
110
111# CHECK: error: branch to misaligned address
112# CHECK:        bc1t -65535
113# CHECK: error: branch target out of range
114# CHECK:        bc1t -65537
115# CHECK: error: branch to misaligned address
116# CHECK:        bc1t 65535
117# CHECK: error: branch target out of range
118# CHECK:        bc1t 65536
119
120# CHECK: error: branch to misaligned address
121# CHECK:        bc1t $fcc0, -65535
122# CHECK: error: branch target out of range
123# CHECK:        bc1t $fcc0, -65537
124# CHECK: error: branch to misaligned address
125# CHECK:        bc1t $fcc0, 65535
126# CHECK: error: branch target out of range
127# CHECK:        bc1t $fcc0, 65536
128
129# CHECK: error: branch to misaligned address
130# CHECK:        beqz16 $6, 31
131# CHECK: error: branch target out of range
132# CHECK:        beqz16 $6, 130
133
134        b -65535
135        b -65536
136        b -65537
137        b 65534
138        b 65535
139        b 65536
140
141        beq $1, $1, -65535
142        beq $1, $1, -65536
143        beq $1, $1, -65537
144        beq $1, $1, 65534
145        beq $1, $1, 65535
146        beq $1, $1, 65536
147
148        bne $1, $1, -65535
149        bne $1, $1, -65536
150        bne $1, $1, -65537
151        bne $1, $1, 65534
152        bne $1, $1, 65535
153        bne $1, $1, 65536
154
155        bal -65535
156        bal -65536
157        bal -65537
158        bal 65534
159        bal 65535
160        bal 65536
161
162        bgez $1, -65535
163        bgez $1, -65536
164        bgez $1, -65537
165        bgez $1, 65534
166        bgez $1, 65535
167        bgez $1, 65536
168
169        bgtz $1, -65535
170        bgtz $1, -65536
171        bgtz $1, -65537
172        bgtz $1, 65534
173        bgtz $1, 65535
174        bgtz $1, 65536
175
176        blez $1, -65535
177        blez $1, -65536
178        blez $1, -65537
179        blez $1, 65534
180        blez $1, 65535
181        blez $1, 65536
182
183        bltz $1, -65535
184        bltz $1, -65536
185        bltz $1, -65537
186        bltz $1, 65534
187        bltz $1, 65535
188        bltz $1, 65536
189
190        bgezal $1, -65535
191        bgezal $1, -65536
192        bgezal $1, -65537
193        bgezal $1, 65534
194        bgezal $1, 65535
195        bgezal $1, 65536
196
197        bltzal $1, -65535
198        bltzal $1, -65536
199        bltzal $1, -65537
200        bltzal $1, 65534
201        bltzal $1, 65535
202        bltzal $1, 65536
203
204        bc1f -65535
205        bc1f -65536
206        bc1f -65537
207        bc1f 65534
208        bc1f 65535
209        bc1f 65536
210
211        bc1f $fcc0, -65535
212        bc1f $fcc0, -65536
213        bc1f $fcc0, -65537
214        bc1f $fcc0, 65534
215        bc1f $fcc0, 65535
216        bc1f $fcc0, 65536
217
218        bc1t -65535
219        bc1t -65536
220        bc1t -65537
221        bc1t 65534
222        bc1t 65535
223        bc1t 65536
224
225        bc1t $fcc0, -65535
226        bc1t $fcc0, -65536
227        bc1t $fcc0, -65537
228        bc1t $fcc0, 65534
229        bc1t $fcc0, 65535
230        bc1t $fcc0, 65536
231
232        beqz16 $6, 31
233        beqz16 $6, 130
234