[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ARM / basic-thumb2-instructions.s
blobb8afd2917fd0b657126eb5f793489863e27fe238
1 @ RUN: llvm-mc -triple=thumbv7-apple-darwin -mcpu=cortex-a8 -show-encoding < %s | FileCheck %s
2 @ RUN: llvm-mc -triple=thumbebv7-unknown-unknown -mcpu=cortex-a8 -show-encoding < %s | FileCheck --check-prefix=CHECK-BE %s
3 .syntax unified
4 .globl _func
6 @ Check that the assembler can handle the documented syntax from the ARM ARM.
7 @ For complex constructs like shifter operands, check more thoroughly for them
8 @ once then spot check that following instructions accept the form generally.
9 @ This gives us good coverage while keeping the overall size of the test
10 @ more reasonable.
13 @ FIXME: Some 3-operand instructions have a 2-operand assembly syntax.
15 _func:
16 @ CHECK: _func
18 @------------------------------------------------------------------------------
19 @ ADC (immediate)
20 @------------------------------------------------------------------------------
21 adc r0, r1, #4
22 adcs r0, r1, #0
23 adc r1, r2, #255
24 adc r3, r7, #0x00550055
25 adc r8, r12, #0xaa00aa00
26 adc r9, r7, #0xa5a5a5a5
27 adc r5, r3, #0x87000000
28 adc r4, r2, #0x7f800000
29 adc r4, r2, #0x00000680
31 @ CHECK: adc r0, r1, #4 @ encoding: [0x41,0xf1,0x04,0x00]
32 @ CHECK: adcs r0, r1, #0 @ encoding: [0x51,0xf1,0x00,0x00]
33 @ CHECK: adc r1, r2, #255 @ encoding: [0x42,0xf1,0xff,0x01]
34 @ CHECK: adc r3, r7, #5570645 @ encoding: [0x47,0xf1,0x55,0x13]
35 @ CHECK: adc r8, r12, #2852170240 @ encoding: [0x4c,0xf1,0xaa,0x28]
36 @ CHECK: adc r9, r7, #2779096485 @ encoding: [0x47,0xf1,0xa5,0x39]
37 @ CHECK: adc r5, r3, #2264924160 @ encoding: [0x43,0xf1,0x07,0x45]
38 @ CHECK: adc r4, r2, #2139095040 @ encoding: [0x42,0xf1,0xff,0x44]
39 @ CHECK: adc r4, r2, #1664 @ encoding: [0x42,0xf5,0xd0,0x64]
41 @------------------------------------------------------------------------------
42 @ ADC (register)
43 @------------------------------------------------------------------------------
44 adc r4, r5, r6
45 adcs r4, r5, r6
46 adc.w r9, r1, r3
47 adcs.w r9, r1, r3
48 adc r0, r1, r3, ror #4
49 adcs r0, r1, r3, lsl #7
50 adc.w r0, r1, r3, lsr #31
51 adcs.w r0, r1, r3, asr #32
53 @ CHECK: adc.w r4, r5, r6 @ encoding: [0x45,0xeb,0x06,0x04]
54 @ CHECK: adcs.w r4, r5, r6 @ encoding: [0x55,0xeb,0x06,0x04]
55 @ CHECK: adc.w r9, r1, r3 @ encoding: [0x41,0xeb,0x03,0x09]
56 @ CHECK: adcs.w r9, r1, r3 @ encoding: [0x51,0xeb,0x03,0x09]
57 @ CHECK: adc.w r0, r1, r3, ror #4 @ encoding: [0x41,0xeb,0x33,0x10]
58 @ CHECK: adcs.w r0, r1, r3, lsl #7 @ encoding: [0x51,0xeb,0xc3,0x10]
59 @ CHECK: adc.w r0, r1, r3, lsr #31 @ encoding: [0x41,0xeb,0xd3,0x70]
60 @ CHECK: adcs.w r0, r1, r3, asr #32 @ encoding: [0x51,0xeb,0x23,0x00]
63 @------------------------------------------------------------------------------
64 @ ADD (immediate)
65 @------------------------------------------------------------------------------
66 itet eq
67 addeq r1, r2, #4
68 addwne r5, r3, #1023
69 addeq r4, r5, #293
70 add r2, sp, #1024
71 add r2, r8, #0xff00
72 add r2, r3, #257
73 addw r2, r3, #257
74 add r12, r6, #0x100
75 addw r12, r6, #0x100
76 adds r1, r2, #0x1f0
77 add r2, #1
78 add r0, r0, #32
79 adds r2, r2, #56
80 adds r2, #56
81 add r1, r7, #0xcbcbcbcb
83 adds.w r2, #-16
84 adds.w r2, r2, #-16
85 addw r2, #-16
86 addw r2, #-16
87 addw r2, r2, #-16
89 @ CHECK: itet eq @ encoding: [0x0a,0xbf]
90 @ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d]
91 @ CHECK: addwne r5, r3, #1023 @ encoding: [0x03,0xf2,0xff,0x35]
92 @ CHECK: addweq r4, r5, #293 @ encoding: [0x05,0xf2,0x25,0x14]
93 @ CHECK: add.w r2, sp, #1024 @ encoding: [0x0d,0xf5,0x80,0x62]
94 @ CHECK: add.w r2, r8, #65280 @ encoding: [0x08,0xf5,0x7f,0x42]
95 @ CHECK: addw r2, r3, #257 @ encoding: [0x03,0xf2,0x01,0x12]
96 @ CHECK: addw r2, r3, #257 @ encoding: [0x03,0xf2,0x01,0x12]
97 @ CHECK: add.w r12, r6, #256 @ encoding: [0x06,0xf5,0x80,0x7c]
98 @ CHECK: addw r12, r6, #256 @ encoding: [0x06,0xf2,0x00,0x1c]
99 @ CHECK: adds.w r1, r2, #496 @ encoding: [0x12,0xf5,0xf8,0x71]
100 @ CHECK: add.w r2, r2, #1 @ encoding: [0x02,0xf1,0x01,0x02]
101 @ CHECK: add.w r0, r0, #32 @ encoding: [0x00,0xf1,0x20,0x00]
102 @ CHECK: adds r2, #56 @ encoding: [0x38,0x32]
103 @ CHECK: adds r2, #56 @ encoding: [0x38,0x32]
104 @ CHECK: add.w r1, r7, #3419130827 @ encoding: [0x07,0xf1,0xcb,0x31]
106 @ CHECK: subs.w r2, r2, #16 @ encoding: [0xb2,0xf1,0x10,0x02]
107 @ CHECK: subs.w r2, r2, #16 @ encoding: [0xb2,0xf1,0x10,0x02]
108 @ CHECK: subw r2, r2, #16 @ encoding: [0xa2,0xf2,0x10,0x02]
109 @ CHECK: subw r2, r2, #16 @ encoding: [0xa2,0xf2,0x10,0x02]
110 @ CHECK: subw r2, r2, #16 @ encoding: [0xa2,0xf2,0x10,0x02]
113 @------------------------------------------------------------------------------
114 @ ADD (register, not SP) A8.8.6
115 @------------------------------------------------------------------------------
116 add r1, r2, r8
117 add r5, r9, r2, asr #32
118 adds r7, r3, r1, lsl #31
119 adds.w r0, r3, r6, lsr #25
120 add.w r4, r8, r1, ror #12
121 adds r1, r1, r7 // T1
122 it eq
123 addeq r1, r3, r5 // T1
124 it eq
125 addeq r1, r1, r5 // T1
126 it eq
127 addseq r1, r3, r5 // T3
128 it eq
129 addseq r1, r1, r5 // T3
130 add r10, r8
131 add r10, r10, r8
132 it eq
133 addeq r1, r10 // T2
134 it eq
135 addseq r1, r10 // T3
137 @ CHECK: add.w r1, r2, r8 @ encoding: [0x02,0xeb,0x08,0x01]
138 @ CHECK: add.w r5, r9, r2, asr #32 @ encoding: [0x09,0xeb,0x22,0x05]
139 @ CHECK: adds.w r7, r3, r1, lsl #31 @ encoding: [0x13,0xeb,0xc1,0x77]
140 @ CHECK: adds.w r0, r3, r6, lsr #25 @ encoding: [0x13,0xeb,0x56,0x60]
141 @ CHECK: add.w r4, r8, r1, ror #12 @ encoding: [0x08,0xeb,0x31,0x34]
142 @ CHECK: adds r1, r1, r7 @ encoding: [0xc9,0x19]
143 @ CHECK: it eq @ encoding: [0x08,0xbf]
144 @ CHECK: addeq r1, r3, r5 @ encoding: [0x59,0x19]
145 @ CHECK: it eq @ encoding: [0x08,0xbf]
146 @ CHECK: addeq r1, r1, r5 @ encoding: [0x49,0x19]
147 @ CHECK: it eq @ encoding: [0x08,0xbf]
148 @ CHECK: addseq.w r1, r3, r5 @ encoding: [0x13,0xeb,0x05,0x01]
149 @ CHECK: it eq @ encoding: [0x08,0xbf]
150 @ CHECK: addseq.w r1, r1, r5 @ encoding: [0x11,0xeb,0x05,0x01]
151 @ CHECK: add r10, r8 @ encoding: [0xc2,0x44]
152 @ CHECK: add r10, r8 @ encoding: [0xc2,0x44]
153 @ CHECK: it eq @ encoding: [0x08,0xbf]
154 @ CHECK: addeq r1, r10 @ encoding: [0x51,0x44]
155 @ CHECK: it eq @ encoding: [0x08,0xbf]
156 @ CHECK: addseq.w r1, r1, r10 @ encoding: [0x11,0xeb,0x0a,0x01]
158 @------------------------------------------------------------------------------
159 @ ADD (SP plus immediate) A8.8.9
160 @------------------------------------------------------------------------------
161 it eq
162 @ CHECK: it eq @ encoding: [0x08,0xbf]
163 addeq r7, sp, #1020 // T1
164 @ CHECK: addeq r7, sp, #1020 @ encoding: [0xff,0xaf]
166 it eq
167 @ CHECK: it eq @ encoding: [0x08,0xbf]
168 addeq sp, sp, #508 // T2
169 @ FIXME: ARMARM says 'addeq sp, sp, #508'
170 @ CHECK: addeq sp, #508 @ encoding: [0x7f,0xb0]
172 add r7, sp, #15 // T3
173 @ CHECK: add.w r7, sp, #15 @ encoding: [0x0d,0xf1,0x0f,0x07]
174 adds r7, sp, #16 // T3
175 @ CHECK: adds.w r7, sp, #16 @ encoding: [0x1d,0xf1,0x10,0x07]
176 add r8, sp, #16 // T3
177 @ CHECK: add.w r8, sp, #16 @ encoding: [0x0d,0xf1,0x10,0x08]
179 addw r6, sp, #1020 // T4
180 @ CHECK: addw r6, sp, #1020 @ encoding: [0x0d,0xf2,0xfc,0x36]
181 add r6, sp, #1019 // T4
182 @ CHECK: addw r6, sp, #1019 @ encoding: [0x0d,0xf2,0xfb,0x36]
183 addw r0, r0, #4095
184 addw r0, #4095
185 add r0, r0, #4095
186 add r0, #4095
187 @ CHECK-NEXT: addw r0, r0, #4095 @ encoding: [0x00,0xf6,0xff,0x70]
188 @ CHECK-NEXT: addw r0, r0, #4095 @ encoding: [0x00,0xf6,0xff,0x70]
189 @ CHECK-NEXT: addw r0, r0, #4095 @ encoding: [0x00,0xf6,0xff,0x70]
190 @ CHECK-NEXT: addw r0, r0, #4095 @ encoding: [0x00,0xf6,0xff,0x70]
191 add.w r0, r0, #-4096
192 add r0, r0, #-4096
193 add.w r0, #-4096
194 add r0, #-4096
195 @ CHECK-NEXT: sub.w r0, r0, #4096 @ encoding: [0xa0,0xf5,0x80,0x50]
196 @ CHECK-NEXT: sub.w r0, r0, #4096 @ encoding: [0xa0,0xf5,0x80,0x50]
197 @ CHECK-NEXT: sub.w r0, r0, #4096 @ encoding: [0xa0,0xf5,0x80,0x50]
198 @ CHECK-NEXT: sub.w r0, r0, #4096 @ encoding: [0xa0,0xf5,0x80,0x50]
199 adds.w r0, r0, #-4096
200 adds r0, r0, #-4096
201 adds.w r0, #-4096
202 adds r0, #-4096
203 @ CHECK-NEXT: subs.w r0, r0, #4096 @ encoding: [0xb0,0xf5,0x80,0x50]
204 @ CHECK-NEXT: subs.w r0, r0, #4096 @ encoding: [0xb0,0xf5,0x80,0x50]
205 @ CHECK-NEXT: subs.w r0, r0, #4096 @ encoding: [0xb0,0xf5,0x80,0x50]
206 @ CHECK-NEXT: subs.w r0, r0, #4096 @ encoding: [0xb0,0xf5,0x80,0x50]
207 @------------------------------------------------------------------------------
208 @ ADD (SP plus immediate, writing to SP)
209 @------------------------------------------------------------------------------
210 add.w sp, sp, #0x1fe0000 //T3
211 add.w sp, #0x1fe0000
212 add sp, sp, #0x1fe0000
213 add sp, #0x1fe0000
214 @ CHECK-NEXT: add.w sp, sp, #33423360 @ encoding: [0x0d,0xf1,0xff,0x7d]
215 @ CHECK-NEXT: add.w sp, sp, #33423360 @ encoding: [0x0d,0xf1,0xff,0x7d]
216 @ CHECK-NEXT: add.w sp, sp, #33423360 @ encoding: [0x0d,0xf1,0xff,0x7d]
217 @ CHECK-NEXT: add.w sp, sp, #33423360 @ encoding: [0x0d,0xf1,0xff,0x7d]
218 adds.w sp, sp, #0x1fe0000 //T3
219 adds.w sp, #0x1fe0000
220 adds sp, sp, #0x1fe0000
221 adds sp, #0x1fe0000
222 @ CHECK-NEXT: adds.w sp, sp, #33423360 @ encoding: [0x1d,0xf1,0xff,0x7d]
223 @ CHECK-NEXT: adds.w sp, sp, #33423360 @ encoding: [0x1d,0xf1,0xff,0x7d]
224 @ CHECK-NEXT: adds.w sp, sp, #33423360 @ encoding: [0x1d,0xf1,0xff,0x7d]
225 @ CHECK-NEXT: adds.w sp, sp, #33423360 @ encoding: [0x1d,0xf1,0xff,0x7d]
226 addw sp, sp, #4095 //T4
227 add sp, sp, #4095
228 addw sp, #4095
229 add sp, #4095
230 @ CHECK-NEXT: addw sp, sp, #4095 @ encoding: [0x0d,0xf6,0xff,0x7d]
231 @ CHECK-NEXT: addw sp, sp, #4095 @ encoding: [0x0d,0xf6,0xff,0x7d]
232 @ CHECK-NEXT: addw sp, sp, #4095 @ encoding: [0x0d,0xf6,0xff,0x7d]
233 @ CHECK-NEXT: addw sp, sp, #4095 @ encoding: [0x0d,0xf6,0xff,0x7d]
234 add sp, sp, #128 //T2
235 add sp, #128
236 @ CHECK-NEXT: add sp, #128 @ encoding: [0x20,0xb0]
237 @ CHECK-NEXT: add sp, #128 @ encoding: [0x20,0xb0]
238 adds sp, sp, #128 //T3
239 adds sp, #128
240 @ CHECK-NEXT: adds.w sp, sp, #128 @ encoding: [0x1d,0xf1,0x80,0x0d]
241 @ CHECK-NEXT: adds.w sp, sp, #128 @ encoding: [0x1d,0xf1,0x80,0x0d]
242 add r0, sp, #128 //T1
243 @ CHECK-NEXT: add r0, sp, #128 @ encoding: [0x20,0xa8]
244 adds r0, sp, #128 //T3
245 @ CHECK-NEXT: adds.w r0, sp, #128 @ encoding: [0x1d,0xf1,0x80,0x00]
246 addw r0, sp, #128
247 @ CHECK-NEXT: addw r0, sp, #128 @ encoding: [0x0d,0xf2,0x80,0x00]
248 @------------------------------------------------------------------------------
249 @ ADD (SP plus negative immediate, writing to SP)
250 @------------------------------------------------------------------------------
251 add sp, sp, #-508
252 add sp, #-508
253 @ CHECK-NEXT: sub sp, #508 @ encoding: [0xff,0xb0]
254 @ CHECK-NEXT: sub sp, #508 @ encoding: [0xff,0xb0]
255 addw sp, sp, #-4095
256 add sp, sp, #-4095
257 addw sp, #-4095
258 add sp, #-4095
259 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
260 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
261 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
262 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
263 add.w sp, sp, #-4096
264 add sp, sp, #-4096
265 add.w sp, #-4096
266 add sp, #-4096
267 @ CHECK-NEXT: sub.w sp, sp, #4096 @ encoding: [0xad,0xf5,0x80,0x5d]
268 @ CHECK-NEXT: sub.w sp, sp, #4096 @ encoding: [0xad,0xf5,0x80,0x5d]
269 @ CHECK-NEXT: sub.w sp, sp, #4096 @ encoding: [0xad,0xf5,0x80,0x5d]
270 @ CHECK-NEXT: sub.w sp, sp, #4096 @ encoding: [0xad,0xf5,0x80,0x5d]
271 adds.w sp, sp, #-4096
272 adds sp, sp, #-4096
273 adds.w sp, #-4096
274 adds sp, #-4096
275 @ CHECK-NEXT: subs.w sp, sp, #4096 @ encoding: [0xbd,0xf5,0x80,0x5d]
276 @ CHECK-NEXT: subs.w sp, sp, #4096 @ encoding: [0xbd,0xf5,0x80,0x5d]
277 @ CHECK-NEXT: subs.w sp, sp, #4096 @ encoding: [0xbd,0xf5,0x80,0x5d]
278 @ CHECK-NEXT: subs.w sp, sp, #4096 @ encoding: [0xbd,0xf5,0x80,0x5d]
279 @------------------------------------------------------------------------------
280 @ ADD (SP plus register) A8.8.10
281 @------------------------------------------------------------------------------
282 it eq
283 @ CHECK: it eq @ encoding: [0x08,0xbf]
284 addeq r8, sp, r8 // T1
285 @ CHECK: addeq r8, sp, r8 @ encoding: [0xe8,0x44]
286 it eq
287 @ CHECK: it eq @ encoding: [0x08,0xbf]
288 addeq r8, sp // T1
289 @ CHECK: addeq r8, sp @ encoding: [0xe8,0x44]
291 it eq
292 @ CHECK: it eq @ encoding: [0x08,0xbf]
293 addeq sp, r9 // T2
294 @ CHECK: addeq sp, r9 @ encoding: [0xcd,0x44]
296 add r2, sp, ip // T3
297 @ CHECK: add.w r2, sp, r12 @ encoding: [0x0d,0xeb,0x0c,0x02]
298 it eq
299 @ CHECK: it eq @ encoding: [0x08,0xbf]
300 addeq r2, sp, ip // T3
301 @ CHECK: addeq.w r2, sp, r12 @ encoding: [0x0d,0xeb,0x0c,0x02]
302 add.w r0, sp, r0, ror #2
303 add r0, sp, r0, ror #2
304 add sp, r1, lsl #15
305 adds.w r0, sp, r0, ror #2
306 adds r0, sp, r0, ror #2
307 adds.w sp, sp, r0, ror #31
308 adds sp, sp, r0, ror #31
309 adds sp, r0, ror #31
310 @ CHECK-NEXT: add.w r0, sp, r0, ror #2 @ encoding: [0x0d,0xeb,0xb0,0x00]
311 @ CHECK-NEXT: add.w r0, sp, r0, ror #2 @ encoding: [0x0d,0xeb,0xb0,0x00]
312 @ CHECK-NEXT: add.w sp, sp, r1, lsl #15 @ encoding: [0x0d,0xeb,0xc1,0x3d]
313 @ CHECK-NEXT: adds.w r0, sp, r0, ror #2 @ encoding: [0x1d,0xeb,0xb0,0x00]
314 @ CHECK-NEXT: adds.w r0, sp, r0, ror #2 @ encoding: [0x1d,0xeb,0xb0,0x00]
315 @ CHECK-NEXT: adds.w sp, sp, r0, ror #31 @ encoding: [0x1d,0xeb,0xf0,0x7d]
316 @ CHECK-NEXT: adds.w sp, sp, r0, ror #31 @ encoding: [0x1d,0xeb,0xf0,0x7d]
317 @ CHECK-NEXT: adds.w sp, sp, r0, ror #31 @ encoding: [0x1d,0xeb,0xf0,0x7d]
318 @------------------------------------------------------------------------------
319 @ FIXME: ADR
320 @------------------------------------------------------------------------------
322 subw r11, pc, #3270
323 adr.w r2, #3
324 adr.w r11, #-826
325 adr.w r1, #-0x0
327 @ CHECK: subw r11, pc, #3270 @ encoding: [0xaf,0xf6,0xc6,0x4b]
328 @ CHECK: adr.w r2, #3 @ encoding: [0x0f,0xf2,0x03,0x02]
329 @ CHECK: adr.w r11, #-826 @ encoding: [0xaf,0xf2,0x3a,0x3b]
330 @ CHECK: adr.w r1, #-0 @ encoding: [0xaf,0xf2,0x00,0x01]
332 @------------------------------------------------------------------------------
333 @ AND (immediate)
334 @------------------------------------------------------------------------------
335 and r2, r5, #0xff000
336 ands r3, r12, #0xf
337 and r1, #0xff
338 and r1, r1, #0xff
339 and r5, r4, #0xffffffff
340 ands r1, r9, #0xffffffff
342 @ CHECK: and r2, r5, #1044480 @ encoding: [0x05,0xf4,0x7f,0x22]
343 @ CHECK: ands r3, r12, #15 @ encoding: [0x1c,0xf0,0x0f,0x03]
344 @ CHECK: and r1, r1, #255 @ encoding: [0x01,0xf0,0xff,0x01]
345 @ CHECK: and r1, r1, #255 @ encoding: [0x01,0xf0,0xff,0x01]
346 @ CHECK: and r5, r4, #4294967295 @ encoding: [0x04,0xf0,0xff,0x35]
347 @ CHECK: ands r1, r9, #4294967295 @ encoding: [0x19,0xf0,0xff,0x31]
349 @------------------------------------------------------------------------------
350 @ AND (register)
351 @------------------------------------------------------------------------------
352 and r4, r9, r8
353 and r1, r4, r8, asr #3
354 ands r2, r1, r7, lsl #1
355 ands.w r4, r5, r2, lsr #20
356 and.w r9, r12, r1, ror #17
358 @ CHECK: and.w r4, r9, r8 @ encoding: [0x09,0xea,0x08,0x04]
359 @ CHECK: and.w r1, r4, r8, asr #3 @ encoding: [0x04,0xea,0xe8,0x01]
360 @ CHECK: ands.w r2, r1, r7, lsl #1 @ encoding: [0x11,0xea,0x47,0x02]
361 @ CHECK: ands.w r4, r5, r2, lsr #20 @ encoding: [0x15,0xea,0x12,0x54]
362 @ CHECK: and.w r9, r12, r1, ror #17 @ encoding: [0x0c,0xea,0x71,0x49]
364 @------------------------------------------------------------------------------
365 @ ASR (immediate)
366 @------------------------------------------------------------------------------
367 asr r2, r3, #12
368 asrs r8, r3, #32
369 asrs.w r2, r3, #1
370 asr r2, r3, #4
371 asrs r2, r12, #15
373 asr r3, #19
374 asrs r8, #2
375 asrs.w r7, #5
376 asr.w r12, #21
378 asrs r1, r2, #1
379 itt eq
380 asrseq r1, r2, #1
381 asreq r1, r2, #1
383 @ CHECK: asr.w r2, r3, #12 @ encoding: [0x4f,0xea,0x23,0x32]
384 @ CHECK: asrs.w r8, r3, #32 @ encoding: [0x5f,0xea,0x23,0x08]
385 @ CHECK: asrs.w r2, r3, #1 @ encoding: [0x5f,0xea,0x63,0x02]
386 @ CHECK: asr.w r2, r3, #4 @ encoding: [0x4f,0xea,0x23,0x12]
387 @ CHECK: asrs.w r2, r12, #15 @ encoding: [0x5f,0xea,0xec,0x32]
389 @ CHECK: asr.w r3, r3, #19 @ encoding: [0x4f,0xea,0xe3,0x43]
390 @ CHECK: asrs.w r8, r8, #2 @ encoding: [0x5f,0xea,0xa8,0x08]
391 @ CHECK: asrs.w r7, r7, #5 @ encoding: [0x5f,0xea,0x67,0x17]
392 @ CHECK: asr.w r12, r12, #21 @ encoding: [0x4f,0xea,0x6c,0x5c]
394 @ CHECK: asrs r1, r2, #1 @ encoding: [0x51,0x10]
395 @ CHECK: itt eq @ encoding: [0x04,0xbf]
396 @ CHECK: asrseq.w r1, r2, #1 @ encoding: [0x5f,0xea,0x62,0x01]
397 @ CHECK: asreq r1, r2, #1 @ encoding: [0x51,0x10]
399 @------------------------------------------------------------------------------
400 @ ASR (register)
401 @------------------------------------------------------------------------------
402 asr r3, r4, r2
403 asr.w r1, r2
404 asrs r3, r4, r8
406 @ CHECK: asr.w r3, r4, r2 @ encoding: [0x44,0xfa,0x02,0xf3]
407 @ CHECK: asr.w r1, r1, r2 @ encoding: [0x41,0xfa,0x02,0xf1]
408 @ CHECK: asrs.w r3, r4, r8 @ encoding: [0x54,0xfa,0x08,0xf3]
411 @------------------------------------------------------------------------------
413 @------------------------------------------------------------------------------
414 b.w _bar
415 beq.w _bar
416 it eq
417 beq.w _bar
418 bmi.w #-183396
420 @ CHECK: b.w _bar @ encoding: [A,0xf0'A',A,0x90'A']
421 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_uncondbranch
422 @ CHECK-BE: b.w _bar @ encoding: [0xf0'A',A,0x90'A',A]
423 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_uncondbranch
424 @ CHECK: beq.w _bar @ encoding: [A,0xf0'A',A,0x80'A']
425 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_condbranch
426 @ CHECK-BE: beq.w _bar @ encoding: [0xf0'A',A,0x80'A',A]
427 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_condbranch
428 @ CHECK: it eq @ encoding: [0x08,0xbf]
429 @ CHECK: beq.w _bar @ encoding: [A,0xf0'A',A,0x90'A']
430 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_uncondbranch
431 @ CHECK-BE: beq.w _bar @ encoding: [0xf0'A',A,0x90'A',A]
432 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_uncondbranch
433 @ CHECK: bmi.w #-183396 @ encoding: [0x13,0xf5,0xce,0xa9]
436 @------------------------------------------------------------------------------
437 @ BFC
438 @------------------------------------------------------------------------------
439 bfc r5, #3, #17
440 it lo
441 bfccc r5, #3, #17
443 @ CHECK: bfc r5, #3, #17 @ encoding: [0x6f,0xf3,0xd3,0x05]
444 @ CHECK: it lo @ encoding: [0x38,0xbf]
445 @ CHECK: bfclo r5, #3, #17 @ encoding: [0x6f,0xf3,0xd3,0x05]
448 @------------------------------------------------------------------------------
449 @ BFI
450 @------------------------------------------------------------------------------
451 bfi r5, r2, #3, #17
452 it ne
453 bfine r5, r2, #3, #17
455 @ CHECK: bfi r5, r2, #3, #17 @ encoding: [0x62,0xf3,0xd3,0x05]
456 @ CHECK: it ne @ encoding: [0x18,0xbf]
457 @ CHECK: bfine r5, r2, #3, #17 @ encoding: [0x62,0xf3,0xd3,0x05]
460 @------------------------------------------------------------------------------
461 @ BIC
462 @------------------------------------------------------------------------------
463 bic r10, r1, #0xf
464 bic r5, r2, #0xffffffff
465 bics r11, r10, #0xffffffff
466 bic r12, r3, r6
467 bic r11, r2, r6, lsl #12
468 bic r8, r4, r1, lsr #11
469 bic r7, r5, r7, lsr #15
470 bic r6, r7, r9, asr #32
471 bic r5, r6, r8, ror #1
473 @ destination register is optional
474 bic r1, #0xf
475 bic r1, r1
476 bic r4, r2, lsl #31
477 bic r6, r3, lsr #12
478 bic r7, r4, lsr #7
479 bic r8, r5, asr #15
480 bic r12, r6, ror #29
482 @ CHECK: bic r10, r1, #15 @ encoding: [0x21,0xf0,0x0f,0x0a]
483 @ CHECK: bic r5, r2, #4294967295 @ encoding: [0x22,0xf0,0xff,0x35]
484 @ CHECK: bics r11, r10, #4294967295 @ encoding: [0x3a,0xf0,0xff,0x3b]
485 @ CHECK: bic.w r12, r3, r6 @ encoding: [0x23,0xea,0x06,0x0c]
486 @ CHECK: bic.w r11, r2, r6, lsl #12 @ encoding: [0x22,0xea,0x06,0x3b]
487 @ CHECK: bic.w r8, r4, r1, lsr #11 @ encoding: [0x24,0xea,0xd1,0x28]
488 @ CHECK: bic.w r7, r5, r7, lsr #15 @ encoding: [0x25,0xea,0xd7,0x37]
489 @ CHECK: bic.w r6, r7, r9, asr #32 @ encoding: [0x27,0xea,0x29,0x06]
490 @ CHECK: bic.w r5, r6, r8, ror #1 @ encoding: [0x26,0xea,0x78,0x05]
492 @ CHECK: bic r1, r1, #15 @ encoding: [0x21,0xf0,0x0f,0x01]
493 @ CHECK: bic.w r1, r1, r1 @ encoding: [0x21,0xea,0x01,0x01]
494 @ CHECK: bic.w r4, r4, r2, lsl #31 @ encoding: [0x24,0xea,0xc2,0x74]
495 @ CHECK: bic.w r6, r6, r3, lsr #12 @ encoding: [0x26,0xea,0x13,0x36]
496 @ CHECK: bic.w r7, r7, r4, lsr #7 @ encoding: [0x27,0xea,0xd4,0x17]
497 @ CHECK: bic.w r8, r8, r5, asr #15 @ encoding: [0x28,0xea,0xe5,0x38]
498 @ CHECK: bic.w r12, r12, r6, ror #29 @ encoding: [0x2c,0xea,0x76,0x7c]
500 @------------------------------------------------------------------------------
501 @ BKPT
502 @------------------------------------------------------------------------------
503 it pl
504 bkpt #234
506 @ CHECK: it pl @ encoding: [0x58,0xbf]
507 @ CHECK: bkpt #234 @ encoding: [0xea,0xbe]
509 @------------------------------------------------------------------------------
510 @ BXJ
511 @------------------------------------------------------------------------------
512 bxj r5
513 it ne
514 bxjne r7
516 @ CHECK: bxj r5 @ encoding: [0xc5,0xf3,0x00,0x8f]
517 @ CHECK: it ne @ encoding: [0x18,0xbf]
518 @ CHECK: bxjne r7 @ encoding: [0xc7,0xf3,0x00,0x8f]
521 @------------------------------------------------------------------------------
522 @ CBZ/CBNZ
523 @------------------------------------------------------------------------------
524 cbnz r7, #6
525 cbnz r7, #12
526 cbz r6, _bar
527 cbnz r6, _bar
529 @ CHECK: cbnz r7, #6 @ encoding: [0x1f,0xb9]
530 @ CHECK: cbnz r7, #12 @ encoding: [0x37,0xb9]
531 @ CHECK: cbz r6, _bar @ encoding: [0x06'A',0xb1'A']
532 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_cb
533 @ CHECK-BE: cbz r6, _bar @ encoding: [0xb1'A',0x06'A']
534 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_cb
535 @ CHECK: cbnz r6, _bar @ encoding: [0x06'A',0xb9'A']
536 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_cb
537 @ CHECK-BE: cbnz r6, _bar @ encoding: [0xb9'A',0x06'A']
538 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_cb
541 @------------------------------------------------------------------------------
542 @ CDP/CDP2
543 @------------------------------------------------------------------------------
544 cdp p7, #1, c1, c1, c1, #4
545 cdp2 p7, #1, c1, c1, c1, #4
547 @ CHECK: cdp p7, #1, c1, c1, c1, #4 @ encoding: [0x11,0xee,0x81,0x17]
548 @ CHECK: cdp2 p7, #1, c1, c1, c1, #4 @ encoding: [0x11,0xfe,0x81,0x17]
551 @------------------------------------------------------------------------------
552 @ CLREX
553 @------------------------------------------------------------------------------
554 clrex
555 it ne
556 clrexne
558 @ CHECK: clrex @ encoding: [0xbf,0xf3,0x2f,0x8f]
559 @ CHECK: it ne @ encoding: [0x18,0xbf]
560 @ CHECK: clrexne @ encoding: [0xbf,0xf3,0x2f,0x8f]
563 @------------------------------------------------------------------------------
564 @ CLZ
565 @------------------------------------------------------------------------------
566 clz r1, r2
567 it eq
568 clzeq r1, r2
570 @ CHECK: clz r1, r2 @ encoding: [0xb2,0xfa,0x82,0xf1]
571 @ CHECK: it eq @ encoding: [0x08,0xbf]
572 @ CHECK: clzeq r1, r2 @ encoding: [0xb2,0xfa,0x82,0xf1]
575 @------------------------------------------------------------------------------
576 @ CMN
577 @------------------------------------------------------------------------------
578 cmn r1, #0xf
579 cmn r8, r6
580 cmn r1, r6, lsl #10
581 cmn r1, r6, lsr #10
582 cmn sp, r6, lsr #10
583 cmn r1, r6, asr #10
584 cmn r1, r6, ror #10
586 @ CHECK: cmn.w r1, #15 @ encoding: [0x11,0xf1,0x0f,0x0f]
587 @ CHECK: cmn.w r8, r6 @ encoding: [0x18,0xeb,0x06,0x0f]
588 @ CHECK: cmn.w r1, r6, lsl #10 @ encoding: [0x11,0xeb,0x86,0x2f]
589 @ CHECK: cmn.w r1, r6, lsr #10 @ encoding: [0x11,0xeb,0x96,0x2f]
590 @ CHECK: cmn.w sp, r6, lsr #10 @ encoding: [0x1d,0xeb,0x96,0x2f]
591 @ CHECK: cmn.w r1, r6, asr #10 @ encoding: [0x11,0xeb,0xa6,0x2f]
592 @ CHECK: cmn.w r1, r6, ror #10 @ encoding: [0x11,0xeb,0xb6,0x2f]
595 @------------------------------------------------------------------------------
596 @ CMP
597 @------------------------------------------------------------------------------
598 cmp r5, #0xff00
599 cmp.w r4, r12
600 cmp r9, r6, lsl #12
601 cmp r3, r7, lsr #31
602 cmp sp, r6, lsr #1
603 cmp r2, r5, asr #24
604 cmp r1, r4, ror #15
605 cmp r2, #-2
606 cmp r9, #1
608 @ CHECK: cmp.w r5, #65280 @ encoding: [0xb5,0xf5,0x7f,0x4f]
609 @ CHECK: cmp.w r4, r12 @ encoding: [0xb4,0xeb,0x0c,0x0f]
610 @ CHECK: cmp.w r9, r6, lsl #12 @ encoding: [0xb9,0xeb,0x06,0x3f]
611 @ CHECK: cmp.w r3, r7, lsr #31 @ encoding: [0xb3,0xeb,0xd7,0x7f]
612 @ CHECK: cmp.w sp, r6, lsr #1 @ encoding: [0xbd,0xeb,0x56,0x0f]
613 @ CHECK: cmp.w r2, r5, asr #24 @ encoding: [0xb2,0xeb,0x25,0x6f]
614 @ CHECK: cmp.w r1, r4, ror #15 @ encoding: [0xb1,0xeb,0xf4,0x3f]
615 @ CHECK: cmn.w r2, #2 @ encoding: [0x12,0xf1,0x02,0x0f]
616 @ CHECK: cmp.w r9, #1 @ encoding: [0xb9,0xf1,0x01,0x0f]
618 @------------------------------------------------------------------------------
619 @ CPS
620 @------------------------------------------------------------------------------
622 cpsie f
623 cpsid a
624 cpsie.w f
625 cpsid.w a
626 cpsie i, #3
627 cpsie.w i, #3
628 cpsid f, #9
629 cpsid.w f, #9
630 cps #0
631 cps.w #0
633 @ CHECK: cpsie f @ encoding: [0x61,0xb6]
634 @ CHECK: cpsid a @ encoding: [0x74,0xb6]
635 @ CHECK: cpsie.w f @ encoding: [0xaf,0xf3,0x20,0x84]
636 @ CHECK: cpsid.w a @ encoding: [0xaf,0xf3,0x80,0x86]
637 @ CHECK: cpsie i, #3 @ encoding: [0xaf,0xf3,0x43,0x85]
638 @ CHECK: cpsie i, #3 @ encoding: [0xaf,0xf3,0x43,0x85]
639 @ CHECK: cpsid f, #9 @ encoding: [0xaf,0xf3,0x29,0x87]
640 @ CHECK: cpsid f, #9 @ encoding: [0xaf,0xf3,0x29,0x87]
641 @ CHECK: cps #0 @ encoding: [0xaf,0xf3,0x00,0x81]
642 @ CHECK: cps #0 @ encoding: [0xaf,0xf3,0x00,0x81]
644 @------------------------------------------------------------------------------
645 @ DBG
646 @------------------------------------------------------------------------------
647 dbg #5
648 dbg #0
649 dbg #15
650 dbg.w #0
651 it ne
652 dbgne.w #0
654 @ CHECK: dbg #5 @ encoding: [0xaf,0xf3,0xf5,0x80]
655 @ CHECK: dbg #0 @ encoding: [0xaf,0xf3,0xf0,0x80]
656 @ CHECK: dbg #15 @ encoding: [0xaf,0xf3,0xff,0x80]
657 @ CHECK: dbg #0 @ encoding: [0xaf,0xf3,0xf0,0x80]
658 @ CHECK: it ne @ encoding: [0x18,0xbf]
659 @ CHECK: dbgne #0 @ encoding: [0xaf,0xf3,0xf0,0x80]
662 @------------------------------------------------------------------------------
663 @ DMB
664 @------------------------------------------------------------------------------
665 dmb #0xf
666 dmb #0xe
667 dmb #0xd
668 dmb #0xc
669 dmb #0xb
670 dmb #0xa
671 dmb #0x9
672 dmb #0x8
673 dmb #0x7
674 dmb #0x6
675 dmb #0x5
676 dmb #0x4
677 dmb #0x3
678 dmb #0x2
679 dmb #0x1
680 dmb #0x0
682 dmb sy
683 dmb.w sy
684 dmb st
685 dmb sh
686 dmb ish
687 dmb shst
688 dmb ishst
689 dmb un
690 dmb nsh
691 dmb unst
692 dmb nshst
693 dmb osh
694 dmb oshst
696 dmb.w
698 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
699 @ CHECK: dmb st @ encoding: [0xbf,0xf3,0x5e,0x8f]
700 @ CHECK: dmb #0xd @ encoding: [0xbf,0xf3,0x5d,0x8f]
701 @ CHECK: dmb #0xc @ encoding: [0xbf,0xf3,0x5c,0x8f]
702 @ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
703 @ CHECK: dmb ishst @ encoding: [0xbf,0xf3,0x5a,0x8f]
704 @ CHECK: dmb #0x9 @ encoding: [0xbf,0xf3,0x59,0x8f]
705 @ CHECK: dmb #0x8 @ encoding: [0xbf,0xf3,0x58,0x8f]
706 @ CHECK: dmb nsh @ encoding: [0xbf,0xf3,0x57,0x8f]
707 @ CHECK: dmb nshst @ encoding: [0xbf,0xf3,0x56,0x8f]
708 @ CHECK: dmb #0x5 @ encoding: [0xbf,0xf3,0x55,0x8f]
709 @ CHECK: dmb #0x4 @ encoding: [0xbf,0xf3,0x54,0x8f]
710 @ CHECK: dmb osh @ encoding: [0xbf,0xf3,0x53,0x8f]
711 @ CHECK: dmb oshst @ encoding: [0xbf,0xf3,0x52,0x8f]
712 @ CHECK: dmb #0x1 @ encoding: [0xbf,0xf3,0x51,0x8f]
713 @ CHECK: dmb #0x0 @ encoding: [0xbf,0xf3,0x50,0x8f]
715 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
716 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
717 @ CHECK: dmb st @ encoding: [0xbf,0xf3,0x5e,0x8f]
718 @ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
719 @ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
720 @ CHECK: dmb ishst @ encoding: [0xbf,0xf3,0x5a,0x8f]
721 @ CHECK: dmb ishst @ encoding: [0xbf,0xf3,0x5a,0x8f]
722 @ CHECK: dmb nsh @ encoding: [0xbf,0xf3,0x57,0x8f]
723 @ CHECK: dmb nsh @ encoding: [0xbf,0xf3,0x57,0x8f]
724 @ CHECK: dmb nshst @ encoding: [0xbf,0xf3,0x56,0x8f]
725 @ CHECK: dmb nshst @ encoding: [0xbf,0xf3,0x56,0x8f]
726 @ CHECK: dmb osh @ encoding: [0xbf,0xf3,0x53,0x8f]
727 @ CHECK: dmb oshst @ encoding: [0xbf,0xf3,0x52,0x8f]
728 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
729 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
732 @------------------------------------------------------------------------------
733 @ DSB
734 @------------------------------------------------------------------------------
735 dsb #0xf
736 dsb #0xe
737 dsb #0xd
738 dsb #0xc
739 dsb #0xb
740 dsb #0xa
741 dsb #0x9
742 dsb #0x8
743 dsb #0x7
744 dsb #0x6
745 dsb #0x5
746 dsb #0x4
747 dsb #0x3
748 dsb #0x2
749 dsb #0x1
750 dsb #0x0
752 dsb sy
753 dsb.w sy
754 dsb st
755 dsb sh
756 dsb ish
757 dsb shst
758 dsb ishst
759 dsb un
760 dsb nsh
761 dsb unst
762 dsb nshst
763 dsb osh
764 dsb oshst
766 dsb.w
768 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
769 @ CHECK: dsb st @ encoding: [0xbf,0xf3,0x4e,0x8f]
770 @ CHECK: dsb #0xd @ encoding: [0xbf,0xf3,0x4d,0x8f]
771 @ CHECK: dsb #0xc @ encoding: [0xbf,0xf3,0x4c,0x8f]
772 @ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
773 @ CHECK: dsb ishst @ encoding: [0xbf,0xf3,0x4a,0x8f]
774 @ CHECK: dsb #0x9 @ encoding: [0xbf,0xf3,0x49,0x8f]
775 @ CHECK: dsb #0x8 @ encoding: [0xbf,0xf3,0x48,0x8f]
776 @ CHECK: dsb nsh @ encoding: [0xbf,0xf3,0x47,0x8f]
777 @ CHECK: dsb nshst @ encoding: [0xbf,0xf3,0x46,0x8f]
778 @ CHECK: dsb #0x5 @ encoding: [0xbf,0xf3,0x45,0x8f]
779 @ CHECK: pssbb @ encoding: [0xbf,0xf3,0x44,0x8f]
780 @ CHECK: dsb osh @ encoding: [0xbf,0xf3,0x43,0x8f]
781 @ CHECK: dsb oshst @ encoding: [0xbf,0xf3,0x42,0x8f]
782 @ CHECK: dsb #0x1 @ encoding: [0xbf,0xf3,0x41,0x8f]
783 @ CHECK: ssbb @ encoding: [0xbf,0xf3,0x40,0x8f]
785 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
786 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
787 @ CHECK: dsb st @ encoding: [0xbf,0xf3,0x4e,0x8f]
788 @ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
789 @ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
790 @ CHECK: dsb ishst @ encoding: [0xbf,0xf3,0x4a,0x8f]
791 @ CHECK: dsb ishst @ encoding: [0xbf,0xf3,0x4a,0x8f]
792 @ CHECK: dsb nsh @ encoding: [0xbf,0xf3,0x47,0x8f]
793 @ CHECK: dsb nsh @ encoding: [0xbf,0xf3,0x47,0x8f]
794 @ CHECK: dsb nshst @ encoding: [0xbf,0xf3,0x46,0x8f]
795 @ CHECK: dsb nshst @ encoding: [0xbf,0xf3,0x46,0x8f]
796 @ CHECK: dsb osh @ encoding: [0xbf,0xf3,0x43,0x8f]
797 @ CHECK: dsb oshst @ encoding: [0xbf,0xf3,0x42,0x8f]
798 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
799 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
802 @------------------------------------------------------------------------------
803 @ EOR
804 @------------------------------------------------------------------------------
805 eor r4, r5, #0xf000
806 eor r4, r5, r6
807 eor r4, r5, r6, lsl #5
808 eor r4, r5, r6, lsr #5
809 eor r4, r5, r6, lsr #5
810 eor r4, r5, r6, asr #5
811 eor r4, r5, r6, ror #5
813 @ CHECK: eor r4, r5, #61440 @ encoding: [0x85,0xf4,0x70,0x44]
814 @ CHECK: eor.w r4, r5, r6 @ encoding: [0x85,0xea,0x06,0x04]
815 @ CHECK: eor.w r4, r5, r6, lsl #5 @ encoding: [0x85,0xea,0x46,0x14]
816 @ CHECK: eor.w r4, r5, r6, lsr #5 @ encoding: [0x85,0xea,0x56,0x14]
817 @ CHECK: eor.w r4, r5, r6, lsr #5 @ encoding: [0x85,0xea,0x56,0x14]
818 @ CHECK: eor.w r4, r5, r6, asr #5 @ encoding: [0x85,0xea,0x66,0x14]
819 @ CHECK: eor.w r4, r5, r6, ror #5 @ encoding: [0x85,0xea,0x76,0x14]
822 @------------------------------------------------------------------------------
823 @ ISB
824 @------------------------------------------------------------------------------
825 isb sy
826 isb.w sy
828 isb.w
829 isb #15
830 isb #1
832 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
833 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
834 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
835 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
836 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
837 @ CHECK: isb #0x1 @ encoding: [0xbf,0xf3,0x61,0x8f]
840 @------------------------------------------------------------------------------
841 @ IT
842 @------------------------------------------------------------------------------
843 @ Test encodings of a few full IT blocks, not just the IT instruction
845 iteet eq
846 addeq r0, r1, r2
847 nopne
848 subne r5, r6, r7
849 addeq r1, r2, #4
851 @ CHECK: iteet eq @ encoding: [0x0d,0xbf]
852 @ CHECK: addeq r0, r1, r2 @ encoding: [0x88,0x18]
853 @ CHECK: nopne @ encoding: [0x00,0xbf]
854 @ CHECK: subne r5, r6, r7 @ encoding: [0xf5,0x1b]
855 @ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d]
857 @ Should also work for UPPER CASE condition codes.
859 ITEET EQ
860 ADDEQ R0, R1, R2
861 NOPNE
862 SUBNE R5, R6, R7
863 ADDEQ R1, R2, #4
865 @ CHECK: iteet eq @ encoding: [0x0d,0xbf]
866 @ CHECK: addeq r0, r1, r2 @ encoding: [0x88,0x18]
867 @ CHECK: nopne @ encoding: [0x00,0xbf]
868 @ CHECK: subne r5, r6, r7 @ encoding: [0xf5,0x1b]
869 @ CHECK: addeq r1, r2, #4 @ encoding: [0x11,0x1d]
871 @------------------------------------------------------------------------------
872 @ LDC{L}/LDC2{L}
873 @------------------------------------------------------------------------------
874 ldc2 p0, c8, [r1, #4]
875 ldc2 p1, c7, [r2]
876 ldc2 p2, c6, [r3, #-224]
877 ldc2 p3, c5, [r4, #-120]!
878 ldc2 p4, c4, [r5], #16
879 ldc2 p5, c3, [r6], #-72
880 ldc2l p6, c2, [r7, #4]
881 ldc2l p7, c1, [r8]
882 ldc2l p8, c0, [r9, #-224]
883 ldc2l p9, c1, [r10, #-120]!
884 ldc2l p0, c2, [r11], #16
885 ldc2l p1, c3, [r12], #-72
887 ldc p12, c4, [r0, #4]
888 ldc p13, c5, [r1]
889 ldc p14, c6, [r2, #-224]
890 ldc p15, c7, [r3, #-120]!
891 ldc p5, c8, [r4], #16
892 ldc p4, c9, [r5], #-72
893 ldcl p3, c10, [r6, #4]
894 ldcl p2, c11, [r7]
895 ldcl p1, c12, [r8, #-224]
896 ldcl p0, c13, [r9, #-120]!
897 ldcl p6, c14, [r10], #16
898 ldcl p7, c15, [r11], #-72
900 ldc2 p2, c8, [r1], { 25 }
902 @ CHECK: ldc2 p0, c8, [r1, #4] @ encoding: [0x91,0xfd,0x01,0x80]
903 @ CHECK: ldc2 p1, c7, [r2] @ encoding: [0x92,0xfd,0x00,0x71]
904 @ CHECK: ldc2 p2, c6, [r3, #-224] @ encoding: [0x13,0xfd,0x38,0x62]
905 @ CHECK: ldc2 p3, c5, [r4, #-120]! @ encoding: [0x34,0xfd,0x1e,0x53]
906 @ CHECK: ldc2 p4, c4, [r5], #16 @ encoding: [0xb5,0xfc,0x04,0x44]
907 @ CHECK: ldc2 p5, c3, [r6], #-72 @ encoding: [0x36,0xfc,0x12,0x35]
908 @ CHECK: ldc2l p6, c2, [r7, #4] @ encoding: [0xd7,0xfd,0x01,0x26]
909 @ CHECK: ldc2l p7, c1, [r8] @ encoding: [0xd8,0xfd,0x00,0x17]
910 @ CHECK: ldc2l p8, c0, [r9, #-224] @ encoding: [0x59,0xfd,0x38,0x08]
911 @ CHECK: ldc2l p9, c1, [r10, #-120]! @ encoding: [0x7a,0xfd,0x1e,0x19]
912 @ CHECK: ldc2l p0, c2, [r11], #16 @ encoding: [0xfb,0xfc,0x04,0x20]
913 @ CHECK: ldc2l p1, c3, [r12], #-72 @ encoding: [0x7c,0xfc,0x12,0x31]
915 @ CHECK: ldc p12, c4, [r0, #4] @ encoding: [0x90,0xed,0x01,0x4c]
916 @ CHECK: ldc p13, c5, [r1] @ encoding: [0x91,0xed,0x00,0x5d]
917 @ CHECK: ldc p14, c6, [r2, #-224] @ encoding: [0x12,0xed,0x38,0x6e]
918 @ CHECK: ldc p15, c7, [r3, #-120]! @ encoding: [0x33,0xed,0x1e,0x7f]
919 @ CHECK: ldc p5, c8, [r4], #16 @ encoding: [0xb4,0xec,0x04,0x85]
920 @ CHECK: ldc p4, c9, [r5], #-72 @ encoding: [0x35,0xec,0x12,0x94]
921 @ CHECK: ldcl p3, c10, [r6, #4] @ encoding: [0xd6,0xed,0x01,0xa3]
922 @ CHECK: ldcl p2, c11, [r7] @ encoding: [0xd7,0xed,0x00,0xb2]
923 @ CHECK: ldcl p1, c12, [r8, #-224] @ encoding: [0x58,0xed,0x38,0xc1]
924 @ CHECK: ldcl p0, c13, [r9, #-120]! @ encoding: [0x79,0xed,0x1e,0xd0]
925 @ CHECK: ldcl p6, c14, [r10], #16 @ encoding: [0xfa,0xec,0x04,0xe6]
926 @ CHECK: ldcl p7, c15, [r11], #-72 @ encoding: [0x7b,0xec,0x12,0xf7]
928 @ CHECK: ldc2 p2, c8, [r1], {25} @ encoding: [0x91,0xfc,0x19,0x82]
931 @------------------------------------------------------------------------------
932 @ LDMIA
933 @------------------------------------------------------------------------------
934 ldmia.w r4, {r4, r5, r8, r9}
935 ldmia.w r4, {r5, r6}
936 ldmia.w r5!, {r3, r8}
937 ldm.w r4, {r4, r5, r8, r9}
938 ldm.w r4, {r5, r6}
939 ldm.w r5!, {r3, r8}
940 ldm.w r5!, {r1, r2}
941 ldm.w r2, {r1, r2}
943 ldmia r4, {r4, r5, r8, r9}
944 ldmia r4, {r5, r6}
945 ldmia r5!, {r3, r8}
946 ldm r4, {r4, r5, r8, r9}
947 ldm r4, {r5, r6}
948 ldm r5!, {r3, r8}
949 ldmfd r5!, {r3, r8}
950 ldmia sp!, {r4-r11, pc}
952 @ CHECK: ldm.w r4, {r4, r5, r8, r9} @ encoding: [0x94,0xe8,0x30,0x03]
953 @ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
954 @ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
955 @ CHECK: ldm.w r4, {r4, r5, r8, r9} @ encoding: [0x94,0xe8,0x30,0x03]
956 @ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
957 @ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
958 @ CHECK: ldm.w r5!, {r1, r2} @ encoding: [0xb5,0xe8,0x06,0x00]
959 @ CHECK: ldm.w r2, {r1, r2} @ encoding: [0x92,0xe8,0x06,0x00]
961 @ CHECK: ldm.w r4, {r4, r5, r8, r9} @ encoding: [0x94,0xe8,0x30,0x03]
962 @ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
963 @ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
964 @ CHECK: ldm.w r4, {r4, r5, r8, r9} @ encoding: [0x94,0xe8,0x30,0x03]
965 @ CHECK: ldm.w r4, {r5, r6} @ encoding: [0x94,0xe8,0x60,0x00]
966 @ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
967 @ CHECK: ldm.w r5!, {r3, r8} @ encoding: [0xb5,0xe8,0x08,0x01]
968 @ CHECK: pop.w {r4, r5, r6, r7, r8, r9, r10, r11, pc} @ encoding: [0xbd,0xe8,0xf0,0x8f]
971 @------------------------------------------------------------------------------
972 @ LDMDB
973 @------------------------------------------------------------------------------
974 ldmdb r4, {r4, r5, r8, r9}
975 ldmdb r4, {r5, r6}
976 ldmdb r5!, {r3, r8}
977 ldmea r5!, {r3, r8}
978 ldmdb.w r4, {r5, r6}
979 ldmdb.w r5!, {r3, r8}
981 @ CHECK: ldmdb r4, {r4, r5, r8, r9} @ encoding: [0x14,0xe9,0x30,0x03]
982 @ CHECK: ldmdb r4, {r5, r6} @ encoding: [0x14,0xe9,0x60,0x00]
983 @ CHECK: ldmdb r5!, {r3, r8} @ encoding: [0x35,0xe9,0x08,0x01]
984 @ CHECK: ldmdb r5!, {r3, r8} @ encoding: [0x35,0xe9,0x08,0x01]
985 @ CHECK: ldmdb r4, {r5, r6} @ encoding: [0x14,0xe9,0x60,0x00]
986 @ CHECK: ldmdb r5!, {r3, r8} @ encoding: [0x35,0xe9,0x08,0x01]
989 @------------------------------------------------------------------------------
990 @ LDR(immediate)
991 @------------------------------------------------------------------------------
992 ldr r5, [r5, #-4]
993 ldr r5, [r6, #32]
994 ldr r5, [r6, #33]
995 ldr r5, [r6, #257]
996 ldr.w pc, [r7, #257]
997 ldr r2, [r4, #255]!
998 ldr r8, [sp, #4]!
999 ldr lr, [sp, #-4]!
1000 ldr r2, [r4], #255
1001 ldr r8, [sp], #4
1002 ldr lr, [sp], #-4
1004 @ CHECK: ldr r5, [r5, #-4] @ encoding: [0x55,0xf8,0x04,0x5c]
1005 @ CHECK: ldr r5, [r6, #32] @ encoding: [0x35,0x6a]
1006 @ CHECK: ldr.w r5, [r6, #33] @ encoding: [0xd6,0xf8,0x21,0x50]
1007 @ CHECK: ldr.w r5, [r6, #257] @ encoding: [0xd6,0xf8,0x01,0x51]
1008 @ CHECK: ldr.w pc, [r7, #257] @ encoding: [0xd7,0xf8,0x01,0xf1]
1009 @ CHECK: ldr r2, [r4, #255]! @ encoding: [0x54,0xf8,0xff,0x2f]
1010 @ CHECK: ldr r8, [sp, #4]! @ encoding: [0x5d,0xf8,0x04,0x8f]
1011 @ CHECK: ldr lr, [sp, #-4]! @ encoding: [0x5d,0xf8,0x04,0xed]
1012 @ CHECK: ldr r2, [r4], #255 @ encoding: [0x54,0xf8,0xff,0x2b]
1013 @ CHECK: ldr r8, [sp], #4 @ encoding: [0x5d,0xf8,0x04,0x8b]
1014 @ CHECK: ldr lr, [sp], #-4 @ encoding: [0x5d,0xf8,0x04,0xe9]
1017 @------------------------------------------------------------------------------
1018 @ LDR(literal)
1019 @------------------------------------------------------------------------------
1020 ldr.w r5, _foo
1021 ldr lr, (_strcmp-4)
1022 ldr sp, _foo
1023 ldr pc, _foo
1025 @ CHECK: ldr.w r5, _foo @ encoding: [0x5f'A',0xf8'A',A,0x50'A']
1026 @ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1027 @ CHECK-BE: ldr.w r5, _foo @ encoding: [0xf8'A',0x5f'A',0x50'A',A]
1028 @ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1029 @ CHECK: ldr.w lr, _strcmp-4 @ encoding: [0x5f'A',0xf8'A',A,0xe0'A']
1030 @ CHECK: @ fixup A - offset: 0, value: _strcmp-4, kind: fixup_t2_ldst_pcrel_12
1031 @ CHECK-BE: ldr.w lr, _strcmp-4 @ encoding: [0xf8'A',0x5f'A',0xe0'A',A]
1032 @ CHECK-BE: @ fixup A - offset: 0, value: _strcmp-4, kind: fixup_t2_ldst_pcrel_12
1033 @ CHECK: ldr.w sp, _foo @ encoding: [0x5f'A',0xf8'A',A,0xd0'A']
1034 @ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1035 @ CHECK-BE: ldr.w sp, _foo @ encoding: [0xf8'A',0x5f'A',0xd0'A',A]
1036 @ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1037 @ CHECK: ldr.w pc, _foo @ encoding: [0x5f'A',0xf8'A',A,0xf0'A']
1038 @ CHECK: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1039 @ CHECK-BE: ldr.w pc, _foo @ encoding: [0xf8'A',0x5f'A',0xf0'A',A]
1040 @ CHECK-BE: @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1042 ldr r7, [pc, #8]
1043 ldr.n r7, [pc, #8]
1044 ldr.w r7, [pc, #8]
1045 ldr r4, [pc, #1020]
1046 ldr r3, [pc, #-1020]
1047 ldr r6, [pc, #1024]
1048 ldr r0, [pc, #-1024]
1049 ldr r2, [pc, #4095]
1050 ldr r1, [pc, #-4095]
1051 ldr r8, [pc, #132]
1052 ldr pc, [pc, #256]
1053 ldr pc, [pc, #-400]
1054 ldr sp, [pc, #4]
1056 @ CHECK: ldr r7, [pc, #8] @ encoding: [0x02,0x4f]
1057 @ CHECK: ldr r7, [pc, #8] @ encoding: [0x02,0x4f]
1058 @ CHECK: ldr.w r7, [pc, #8] @ encoding: [0xdf,0xf8,0x08,0x70]
1059 @ CHECK: ldr r4, [pc, #1020] @ encoding: [0xff,0x4c]
1060 @ CHECK: ldr.w r3, [pc, #-1020] @ encoding: [0x5f,0xf8,0xfc,0x33]
1061 @ CHECK: ldr.w r6, [pc, #1024] @ encoding: [0xdf,0xf8,0x00,0x64]
1062 @ CHECK: ldr.w r0, [pc, #-1024] @ encoding: [0x5f,0xf8,0x00,0x04]
1063 @ CHECK: ldr.w r2, [pc, #4095] @ encoding: [0xdf,0xf8,0xff,0x2f]
1064 @ CHECK: ldr.w r1, [pc, #-4095] @ encoding: [0x5f,0xf8,0xff,0x1f]
1065 @ CHECK: ldr.w r8, [pc, #132] @ encoding: [0xdf,0xf8,0x84,0x80]
1066 @ CHECK: ldr.w pc, [pc, #256] @ encoding: [0xdf,0xf8,0x00,0xf1]
1067 @ CHECK: ldr.w pc, [pc, #-400] @ encoding: [0x5f,0xf8,0x90,0xf1]
1068 @ CHECK: ldr.w sp, [pc, #4] @ encoding: [0xdf,0xf8,0x04,0xd0]
1070 ldrb r9, [pc, #-0]
1071 ldrsb r11, [pc, #-0]
1072 ldrh r10, [pc, #-0]
1073 ldrsh r1, [pc, #-0]
1074 ldr r5, [pc, #-0]
1076 @ CHECK: ldrb.w r9, [pc, #-0] @ encoding: [0x1f,0xf8,0x00,0x90]
1077 @ CHECK: ldrsb.w r11, [pc, #-0] @ encoding: [0x1f,0xf9,0x00,0xb0]
1078 @ CHECK: ldrh.w r10, [pc, #-0] @ encoding: [0x3f,0xf8,0x00,0xa0]
1079 @ CHECK: ldrsh.w r1, [pc, #-0] @ encoding: [0x3f,0xf9,0x00,0x10]
1080 @ CHECK: ldr.w r5, [pc, #-0] @ encoding: [0x5f,0xf8,0x00,0x50]
1082 @------------------------------------------------------------------------------
1083 @ LDR(register)
1084 @------------------------------------------------------------------------------
1085 ldr r1, [r8, r1]
1086 ldr.w r4, [r5, r2]
1087 ldr r6, [r0, r2, lsl #3]
1088 ldr r8, [r8, r2, lsl #2]
1089 ldr r7, [sp, r2, lsl #1]
1090 ldr r7, [sp, r2, lsl #0]
1092 @ CHECK: ldr.w r1, [r8, r1] @ encoding: [0x58,0xf8,0x01,0x10]
1093 @ CHECK: ldr.w r4, [r5, r2] @ encoding: [0x55,0xf8,0x02,0x40]
1094 @ CHECK: ldr.w r6, [r0, r2, lsl #3] @ encoding: [0x50,0xf8,0x32,0x60]
1095 @ CHECK: ldr.w r8, [r8, r2, lsl #2] @ encoding: [0x58,0xf8,0x22,0x80]
1096 @ CHECK: ldr.w r7, [sp, r2, lsl #1] @ encoding: [0x5d,0xf8,0x12,0x70]
1097 @ CHECK: ldr.w r7, [sp, r2] @ encoding: [0x5d,0xf8,0x02,0x70]
1100 @------------------------------------------------------------------------------
1101 @ LDRB(immediate)
1102 @------------------------------------------------------------------------------
1103 ldrb r5, [r5, #-4]
1104 ldrb r5, [r6, #32]
1105 ldrb r5, [r6, #33]
1106 ldrb r5, [r6, #257]
1107 ldrb.w lr, [r7, #257]
1108 ldrb r5, [r8, #255]!
1109 ldrb r2, [r5, #4]!
1110 ldrb r1, [r4, #-4]!
1111 ldrb lr, [r3], #255
1112 ldrb r9, [r2], #4
1113 ldrb r3, [sp], #-4
1115 @ CHECK: ldrb r5, [r5, #-4] @ encoding: [0x15,0xf8,0x04,0x5c]
1116 @ CHECK: ldrb.w r5, [r6, #32] @ encoding: [0x96,0xf8,0x20,0x50]
1117 @ CHECK: ldrb.w r5, [r6, #33] @ encoding: [0x96,0xf8,0x21,0x50]
1118 @ CHECK: ldrb.w r5, [r6, #257] @ encoding: [0x96,0xf8,0x01,0x51]
1119 @ CHECK: ldrb.w lr, [r7, #257] @ encoding: [0x97,0xf8,0x01,0xe1]
1120 @ CHECK: ldrb r5, [r8, #255]! @ encoding: [0x18,0xf8,0xff,0x5f]
1121 @ CHECK: ldrb r2, [r5, #4]! @ encoding: [0x15,0xf8,0x04,0x2f]
1122 @ CHECK: ldrb r1, [r4, #-4]! @ encoding: [0x14,0xf8,0x04,0x1d]
1123 @ CHECK: ldrb lr, [r3], #255 @ encoding: [0x13,0xf8,0xff,0xeb]
1124 @ CHECK: ldrb r9, [r2], #4 @ encoding: [0x12,0xf8,0x04,0x9b]
1125 @ CHECK: ldrb r3, [sp], #-4 @ encoding: [0x1d,0xf8,0x04,0x39]
1128 @------------------------------------------------------------------------------
1129 @ LDRB(register)
1130 @------------------------------------------------------------------------------
1131 ldrb r1, [r8, r1]
1132 ldrb.w r4, [r5, r2]
1133 ldrb r6, [r0, r2, lsl #3]
1134 ldrb r8, [r8, r2, lsl #2]
1135 ldrb r7, [sp, r2, lsl #1]
1136 ldrb r7, [sp, r2, lsl #0]
1138 @ CHECK: ldrb.w r1, [r8, r1] @ encoding: [0x18,0xf8,0x01,0x10]
1139 @ CHECK: ldrb.w r4, [r5, r2] @ encoding: [0x15,0xf8,0x02,0x40]
1140 @ CHECK: ldrb.w r6, [r0, r2, lsl #3] @ encoding: [0x10,0xf8,0x32,0x60]
1141 @ CHECK: ldrb.w r8, [r8, r2, lsl #2] @ encoding: [0x18,0xf8,0x22,0x80]
1142 @ CHECK: ldrb.w r7, [sp, r2, lsl #1] @ encoding: [0x1d,0xf8,0x12,0x70]
1143 @ CHECK: ldrb.w r7, [sp, r2] @ encoding: [0x1d,0xf8,0x02,0x70]
1146 @------------------------------------------------------------------------------
1147 @ LDRBT
1148 @------------------------------------------------------------------------------
1149 ldrbt r1, [r2]
1150 ldrbt r1, [r8, #0]
1151 ldrbt r1, [r8, #3]
1152 ldrbt r1, [r8, #255]
1154 @ CHECK: ldrbt r1, [r2] @ encoding: [0x12,0xf8,0x00,0x1e]
1155 @ CHECK: ldrbt r1, [r8] @ encoding: [0x18,0xf8,0x00,0x1e]
1156 @ CHECK: ldrbt r1, [r8, #3] @ encoding: [0x18,0xf8,0x03,0x1e]
1157 @ CHECK: ldrbt r1, [r8, #255] @ encoding: [0x18,0xf8,0xff,0x1e]
1160 @------------------------------------------------------------------------------
1161 @ LDRD
1162 @------------------------------------------------------------------------------
1163 ldrd r3, r5, [r6, #24]
1164 ldrd r3, r5, [r6, #24]!
1165 ldrd r3, r5, [r6], #4
1166 ldrd r3, r5, [r6], #-8
1167 ldrd r3, r5, [r6]
1168 ldrd r8, r1, [r3, #0]
1169 ldrd r0, r1, [r2, #-0]
1170 ldrd r0, r1, [r2, #-0]!
1171 ldrd r0, r1, [r2], #-0
1173 @ CHECK: ldrd r3, r5, [r6, #24] @ encoding: [0xd6,0xe9,0x06,0x35]
1174 @ CHECK: ldrd r3, r5, [r6, #24]! @ encoding: [0xf6,0xe9,0x06,0x35]
1175 @ CHECK: ldrd r3, r5, [r6], #4 @ encoding: [0xf6,0xe8,0x01,0x35]
1176 @ CHECK: ldrd r3, r5, [r6], #-8 @ encoding: [0x76,0xe8,0x02,0x35]
1177 @ CHECK: ldrd r3, r5, [r6] @ encoding: [0xd6,0xe9,0x00,0x35]
1178 @ CHECK: ldrd r8, r1, [r3] @ encoding: [0xd3,0xe9,0x00,0x81]
1179 @ CHECK: ldrd r0, r1, [r2, #-0] @ encoding: [0x52,0xe9,0x00,0x01]
1180 @ CHECK: ldrd r0, r1, [r2, #-0]! @ encoding: [0x72,0xe9,0x00,0x01]
1181 @ CHECK: ldrd r0, r1, [r2], #-0 @ encoding: [0x72,0xe8,0x00,0x01]
1184 @------------------------------------------------------------------------------
1185 @ FIXME: LDRD(literal)
1186 @------------------------------------------------------------------------------
1189 @------------------------------------------------------------------------------
1190 @ LDREX/LDREXB/LDREXH/LDREXD
1191 @------------------------------------------------------------------------------
1192 ldrex r1, [r4]
1193 ldrex r8, [r4, #0]
1194 ldrex r2, [sp, #128]
1195 ldrexb r5, [r7]
1196 ldrexh r9, [r12]
1197 ldrexd r9, r3, [r4]
1199 @ CHECK: ldrex r1, [r4] @ encoding: [0x54,0xe8,0x00,0x1f]
1200 @ CHECK: ldrex r8, [r4] @ encoding: [0x54,0xe8,0x00,0x8f]
1201 @ CHECK: ldrex r2, [sp, #128] @ encoding: [0x5d,0xe8,0x20,0x2f]
1202 @ CHECK: ldrexb r5, [r7] @ encoding: [0xd7,0xe8,0x4f,0x5f]
1203 @ CHECK: ldrexh r9, [r12] @ encoding: [0xdc,0xe8,0x5f,0x9f]
1204 @ CHECK: ldrexd r9, r3, [r4] @ encoding: [0xd4,0xe8,0x7f,0x93]
1207 @------------------------------------------------------------------------------
1208 @ LDRH(immediate)
1209 @------------------------------------------------------------------------------
1210 ldrh r5, [r5, #-4]
1211 ldrh r5, [r6, #32]
1212 ldrh r5, [r6, #33]
1213 ldrh r5, [r6, #257]
1214 ldrh.w lr, [r7, #257]
1215 ldrh r5, [r8, #255]!
1216 ldrh r2, [r5, #4]!
1217 ldrh r1, [r4, #-4]!
1218 ldrh lr, [r3], #255
1219 ldrh r9, [r2], #4
1220 ldrh r3, [sp], #-4
1222 @ CHECK: ldrh r5, [r5, #-4] @ encoding: [0x35,0xf8,0x04,0x5c]
1223 @ CHECK: ldrh r5, [r6, #32] @ encoding: [0x35,0x8c]
1224 @ CHECK: ldrh.w r5, [r6, #33] @ encoding: [0xb6,0xf8,0x21,0x50]
1225 @ CHECK: ldrh.w r5, [r6, #257] @ encoding: [0xb6,0xf8,0x01,0x51]
1226 @ CHECK: ldrh.w lr, [r7, #257] @ encoding: [0xb7,0xf8,0x01,0xe1]
1227 @ CHECK: ldrh r5, [r8, #255]! @ encoding: [0x38,0xf8,0xff,0x5f]
1228 @ CHECK: ldrh r2, [r5, #4]! @ encoding: [0x35,0xf8,0x04,0x2f]
1229 @ CHECK: ldrh r1, [r4, #-4]! @ encoding: [0x34,0xf8,0x04,0x1d]
1230 @ CHECK: ldrh lr, [r3], #255 @ encoding: [0x33,0xf8,0xff,0xeb]
1231 @ CHECK: ldrh r9, [r2], #4 @ encoding: [0x32,0xf8,0x04,0x9b]
1232 @ CHECK: ldrh r3, [sp], #-4 @ encoding: [0x3d,0xf8,0x04,0x39]
1235 @------------------------------------------------------------------------------
1236 @ LDRH(register)
1237 @------------------------------------------------------------------------------
1238 ldrh r1, [r8, r1]
1239 ldrh.w r4, [r5, r2]
1240 ldrh r6, [r0, r2, lsl #3]
1241 ldrh r8, [r8, r2, lsl #2]
1242 ldrh r7, [sp, r2, lsl #1]
1243 ldrh r7, [sp, r2, lsl #0]
1245 @ CHECK: ldrh.w r1, [r8, r1] @ encoding: [0x38,0xf8,0x01,0x10]
1246 @ CHECK: ldrh.w r4, [r5, r2] @ encoding: [0x35,0xf8,0x02,0x40]
1247 @ CHECK: ldrh.w r6, [r0, r2, lsl #3] @ encoding: [0x30,0xf8,0x32,0x60]
1248 @ CHECK: ldrh.w r8, [r8, r2, lsl #2] @ encoding: [0x38,0xf8,0x22,0x80]
1249 @ CHECK: ldrh.w r7, [sp, r2, lsl #1] @ encoding: [0x3d,0xf8,0x12,0x70]
1250 @ CHECK: ldrh.w r7, [sp, r2] @ encoding: [0x3d,0xf8,0x02,0x70]
1253 @------------------------------------------------------------------------------
1254 @ LDRH(literal)
1255 @------------------------------------------------------------------------------
1256 ldrh r5, _bar
1258 @ CHECK: ldrh.w r5, _bar @ encoding: [0x3f'A',0xf8'A',A,0x50'A']
1259 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1260 @ CHECK-BE: ldrh.w r5, _bar @ encoding: [0xf8'A',0x3f'A',0x50'A',A]
1261 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1264 @------------------------------------------------------------------------------
1265 @ LDRHT
1266 @------------------------------------------------------------------------------
1267 ldrht r1, [r2]
1268 ldrht r1, [r8, #0]
1269 ldrht r1, [r8, #3]
1270 ldrht r1, [r8, #255]
1272 @ CHECK: ldrht r1, [r2] @ encoding: [0x32,0xf8,0x00,0x1e]
1273 @ CHECK: ldrht r1, [r8] @ encoding: [0x38,0xf8,0x00,0x1e]
1274 @ CHECK: ldrht r1, [r8, #3] @ encoding: [0x38,0xf8,0x03,0x1e]
1275 @ CHECK: ldrht r1, [r8, #255] @ encoding: [0x38,0xf8,0xff,0x1e]
1278 @------------------------------------------------------------------------------
1279 @ LDRSB(immediate)
1280 @------------------------------------------------------------------------------
1281 ldrsb r5, [r5, #-4]
1282 ldrsb r5, [r6, #32]
1283 ldrsb r5, [r6, #33]
1284 ldrsb r5, [r6, #257]
1285 ldrsb.w lr, [r7, #257]
1287 @ CHECK: ldrsb r5, [r5, #-4] @ encoding: [0x15,0xf9,0x04,0x5c]
1288 @ CHECK: ldrsb.w r5, [r6, #32] @ encoding: [0x96,0xf9,0x20,0x50]
1289 @ CHECK: ldrsb.w r5, [r6, #33] @ encoding: [0x96,0xf9,0x21,0x50]
1290 @ CHECK: ldrsb.w r5, [r6, #257] @ encoding: [0x96,0xf9,0x01,0x51]
1291 @ CHECK: ldrsb.w lr, [r7, #257] @ encoding: [0x97,0xf9,0x01,0xe1]
1294 @------------------------------------------------------------------------------
1295 @ LDRSB(register)
1296 @------------------------------------------------------------------------------
1297 ldrsb r1, [r8, r1]
1298 ldrsb.w r4, [r5, r2]
1299 ldrsb r6, [r0, r2, lsl #3]
1300 ldrsb r8, [r8, r2, lsl #2]
1301 ldrsb r7, [sp, r2, lsl #1]
1302 ldrsb r7, [sp, r2, lsl #0]
1303 ldrsb r5, [r8, #255]!
1304 ldrsb r2, [r5, #4]!
1305 ldrsb r1, [r4, #-4]!
1306 ldrsb lr, [r3], #255
1307 ldrsb r9, [r2], #4
1308 ldrsb r3, [sp], #-4
1310 @ CHECK: ldrsb.w r1, [r8, r1] @ encoding: [0x18,0xf9,0x01,0x10]
1311 @ CHECK: ldrsb.w r4, [r5, r2] @ encoding: [0x15,0xf9,0x02,0x40]
1312 @ CHECK: ldrsb.w r6, [r0, r2, lsl #3] @ encoding: [0x10,0xf9,0x32,0x60]
1313 @ CHECK: ldrsb.w r8, [r8, r2, lsl #2] @ encoding: [0x18,0xf9,0x22,0x80]
1314 @ CHECK: ldrsb.w r7, [sp, r2, lsl #1] @ encoding: [0x1d,0xf9,0x12,0x70]
1315 @ CHECK: ldrsb.w r7, [sp, r2] @ encoding: [0x1d,0xf9,0x02,0x70]
1316 @ CHECK: ldrsb r5, [r8, #255]! @ encoding: [0x18,0xf9,0xff,0x5f]
1317 @ CHECK: ldrsb r2, [r5, #4]! @ encoding: [0x15,0xf9,0x04,0x2f]
1318 @ CHECK: ldrsb r1, [r4, #-4]! @ encoding: [0x14,0xf9,0x04,0x1d]
1319 @ CHECK: ldrsb lr, [r3], #255 @ encoding: [0x13,0xf9,0xff,0xeb]
1320 @ CHECK: ldrsb r9, [r2], #4 @ encoding: [0x12,0xf9,0x04,0x9b]
1321 @ CHECK: ldrsb r3, [sp], #-4 @ encoding: [0x1d,0xf9,0x04,0x39]
1324 @------------------------------------------------------------------------------
1325 @ LDRSB(literal)
1326 @------------------------------------------------------------------------------
1327 ldrsb r5, _bar
1329 @ CHECK: ldrsb.w r5, _bar @ encoding: [0x1f'A',0xf9'A',A,0x50'A']
1330 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1331 @ CHECK-BE: ldrsb.w r5, _bar @ encoding: [0xf9'A',0x1f'A',0x50'A',A]
1332 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1335 @------------------------------------------------------------------------------
1336 @ LDRSBT
1337 @------------------------------------------------------------------------------
1338 ldrsbt r1, [r2]
1339 ldrsbt r1, [r8, #0]
1340 ldrsbt r1, [r8, #3]
1341 ldrsbt r1, [r8, #255]
1343 @ CHECK: ldrsbt r1, [r2] @ encoding: [0x12,0xf9,0x00,0x1e]
1344 @ CHECK: ldrsbt r1, [r8] @ encoding: [0x18,0xf9,0x00,0x1e]
1345 @ CHECK: ldrsbt r1, [r8, #3] @ encoding: [0x18,0xf9,0x03,0x1e]
1346 @ CHECK: ldrsbt r1, [r8, #255] @ encoding: [0x18,0xf9,0xff,0x1e]
1349 @------------------------------------------------------------------------------
1350 @ LDRSH(immediate)
1351 @------------------------------------------------------------------------------
1352 ldrsh r5, [r5, #-4]
1353 ldrsh r5, [r6, #32]
1354 ldrsh r5, [r6, #33]
1355 ldrsh r5, [r6, #257]
1356 ldrsh.w lr, [r7, #257]
1358 @ CHECK: ldrsh r5, [r5, #-4] @ encoding: [0x35,0xf9,0x04,0x5c]
1359 @ CHECK: ldrsh.w r5, [r6, #32] @ encoding: [0xb6,0xf9,0x20,0x50]
1360 @ CHECK: ldrsh.w r5, [r6, #33] @ encoding: [0xb6,0xf9,0x21,0x50]
1361 @ CHECK: ldrsh.w r5, [r6, #257] @ encoding: [0xb6,0xf9,0x01,0x51]
1362 @ CHECK: ldrsh.w lr, [r7, #257] @ encoding: [0xb7,0xf9,0x01,0xe1]
1365 @------------------------------------------------------------------------------
1366 @ LDRSH(register)
1367 @------------------------------------------------------------------------------
1368 ldrsh r1, [r8, r1]
1369 ldrsh.w r4, [r5, r2]
1370 ldrsh r6, [r0, r2, lsl #3]
1371 ldrsh r8, [r8, r2, lsl #2]
1372 ldrsh r7, [sp, r2, lsl #1]
1373 ldrsh r7, [sp, r2, lsl #0]
1374 ldrsh r5, [r8, #255]!
1375 ldrsh r2, [r5, #4]!
1376 ldrsh r1, [r4, #-4]!
1377 ldrsh lr, [r3], #255
1378 ldrsh r9, [r2], #4
1379 ldrsh r3, [sp], #-4
1381 @ CHECK: ldrsh.w r1, [r8, r1] @ encoding: [0x38,0xf9,0x01,0x10]
1382 @ CHECK: ldrsh.w r4, [r5, r2] @ encoding: [0x35,0xf9,0x02,0x40]
1383 @ CHECK: ldrsh.w r6, [r0, r2, lsl #3] @ encoding: [0x30,0xf9,0x32,0x60]
1384 @ CHECK: ldrsh.w r8, [r8, r2, lsl #2] @ encoding: [0x38,0xf9,0x22,0x80]
1385 @ CHECK: ldrsh.w r7, [sp, r2, lsl #1] @ encoding: [0x3d,0xf9,0x12,0x70]
1386 @ CHECK: ldrsh.w r7, [sp, r2] @ encoding: [0x3d,0xf9,0x02,0x70]
1387 @ CHECK: ldrsh r5, [r8, #255]! @ encoding: [0x38,0xf9,0xff,0x5f]
1388 @ CHECK: ldrsh r2, [r5, #4]! @ encoding: [0x35,0xf9,0x04,0x2f]
1389 @ CHECK: ldrsh r1, [r4, #-4]! @ encoding: [0x34,0xf9,0x04,0x1d]
1390 @ CHECK: ldrsh lr, [r3], #255 @ encoding: [0x33,0xf9,0xff,0xeb]
1391 @ CHECK: ldrsh r9, [r2], #4 @ encoding: [0x32,0xf9,0x04,0x9b]
1392 @ CHECK: ldrsh r3, [sp], #-4 @ encoding: [0x3d,0xf9,0x04,0x39]
1395 @------------------------------------------------------------------------------
1396 @ LDRSH(literal)
1397 @------------------------------------------------------------------------------
1398 ldrsh r5, _bar
1400 @ CHECK: ldrsh.w r5, _bar @ encoding: [0x3f'A',0xf9'A',A,0x50'A']
1401 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1402 @ CHECK-BE: ldrsh.w r5, _bar @ encoding: [0xf9'A',0x3f'A',0x50'A',A]
1403 @ CHECK-BE: @ fixup A - offset: 0, value: _bar, kind: fixup_t2_ldst_pcrel_12
1405 @ TEMPORARILY DISABLED:
1406 @ ldrsh.w r4, [pc, #1435]
1407 @ : ldrsh.w r4, [pc, #1435] @ encoding: [0x3f,0xf9,0x9b,0x45]
1409 @------------------------------------------------------------------------------
1410 @ LDRSHT
1411 @------------------------------------------------------------------------------
1412 ldrsht r1, [r2]
1413 ldrsht r1, [r8, #0]
1414 ldrsht r1, [r8, #3]
1415 ldrsht r1, [r8, #255]
1417 @ CHECK: ldrsht r1, [r2] @ encoding: [0x32,0xf9,0x00,0x1e]
1418 @ CHECK: ldrsht r1, [r8] @ encoding: [0x38,0xf9,0x00,0x1e]
1419 @ CHECK: ldrsht r1, [r8, #3] @ encoding: [0x38,0xf9,0x03,0x1e]
1420 @ CHECK: ldrsht r1, [r8, #255] @ encoding: [0x38,0xf9,0xff,0x1e]
1423 @------------------------------------------------------------------------------
1424 @ LDRT
1425 @------------------------------------------------------------------------------
1426 ldrt r1, [r2]
1427 ldrt r2, [r6, #0]
1428 ldrt r3, [r7, #3]
1429 ldrt r4, [r9, #255]
1431 @ CHECK: ldrt r1, [r2] @ encoding: [0x52,0xf8,0x00,0x1e]
1432 @ CHECK: ldrt r2, [r6] @ encoding: [0x56,0xf8,0x00,0x2e]
1433 @ CHECK: ldrt r3, [r7, #3] @ encoding: [0x57,0xf8,0x03,0x3e]
1434 @ CHECK: ldrt r4, [r9, #255] @ encoding: [0x59,0xf8,0xff,0x4e]
1437 @------------------------------------------------------------------------------
1438 @ LSL (immediate)
1439 @------------------------------------------------------------------------------
1440 lsl r2, r3, #12
1441 lsls r8, r3, #31
1442 lsls.w r2, r3, #1
1443 lsl r2, r3, #4
1444 lsls r2, r12, #15
1446 lsl r3, #19
1447 lsls r8, #2
1448 lsls.w r7, #5
1449 lsl.w r12, #21
1451 lsls r1, r2, #1
1452 itt eq
1453 lslseq r1, r2, #1
1454 lsleq r1, r2, #1
1456 @ CHECK: lsl.w r2, r3, #12 @ encoding: [0x4f,0xea,0x03,0x32]
1457 @ CHECK: lsls.w r8, r3, #31 @ encoding: [0x5f,0xea,0xc3,0x78]
1458 @ CHECK: lsls.w r2, r3, #1 @ encoding: [0x5f,0xea,0x43,0x02]
1459 @ CHECK: lsl.w r2, r3, #4 @ encoding: [0x4f,0xea,0x03,0x12]
1460 @ CHECK: lsls.w r2, r12, #15 @ encoding: [0x5f,0xea,0xcc,0x32]
1462 @ CHECK: lsl.w r3, r3, #19 @ encoding: [0x4f,0xea,0xc3,0x43]
1463 @ CHECK: lsls.w r8, r8, #2 @ encoding: [0x5f,0xea,0x88,0x08]
1464 @ CHECK: lsls.w r7, r7, #5 @ encoding: [0x5f,0xea,0x47,0x17]
1465 @ CHECK: lsl.w r12, r12, #21 @ encoding: [0x4f,0xea,0x4c,0x5c]
1467 @ CHECK: lsls r1, r2, #1 @ encoding: [0x51,0x00]
1468 @ CHECK: itt eq @ encoding: [0x04,0xbf]
1469 @ CHECK: lslseq.w r1, r2, #1 @ encoding: [0x5f,0xea,0x42,0x01]
1470 @ CHECK: lsleq r1, r2, #1 @ encoding: [0x51,0x00]
1472 @------------------------------------------------------------------------------
1473 @ LSL (register)
1474 @------------------------------------------------------------------------------
1475 lsl r3, r4, r2
1476 lsl.w r1, r2
1477 lsls r3, r4, r8
1479 @ CHECK: lsl.w r3, r4, r2 @ encoding: [0x04,0xfa,0x02,0xf3]
1480 @ CHECK: lsl.w r1, r1, r2 @ encoding: [0x01,0xfa,0x02,0xf1]
1481 @ CHECK: lsls.w r3, r4, r8 @ encoding: [0x14,0xfa,0x08,0xf3]
1484 @------------------------------------------------------------------------------
1485 @ LSR (immediate)
1486 @------------------------------------------------------------------------------
1487 lsr r2, r3, #12
1488 lsrs r8, r3, #32
1489 lsrs.w r2, r3, #1
1490 lsr r2, r3, #4
1491 lsrs r2, r12, #15
1493 lsr r3, #19
1494 lsrs r8, #2
1495 lsrs.w r7, #5
1496 lsr.w r12, #21
1498 lsrs r1, r2, #1
1499 itt eq
1500 lsrseq r1, r2, #1
1501 lsreq r1, r2, #1
1503 @ CHECK: lsr.w r2, r3, #12 @ encoding: [0x4f,0xea,0x13,0x32]
1504 @ CHECK: lsrs.w r8, r3, #32 @ encoding: [0x5f,0xea,0x13,0x08]
1505 @ CHECK: lsrs.w r2, r3, #1 @ encoding: [0x5f,0xea,0x53,0x02]
1506 @ CHECK: lsr.w r2, r3, #4 @ encoding: [0x4f,0xea,0x13,0x12]
1507 @ CHECK: lsrs.w r2, r12, #15 @ encoding: [0x5f,0xea,0xdc,0x32]
1509 @ CHECK: lsr.w r3, r3, #19 @ encoding: [0x4f,0xea,0xd3,0x43]
1510 @ CHECK: lsrs.w r8, r8, #2 @ encoding: [0x5f,0xea,0x98,0x08]
1511 @ CHECK: lsrs.w r7, r7, #5 @ encoding: [0x5f,0xea,0x57,0x17]
1512 @ CHECK: lsr.w r12, r12, #21 @ encoding: [0x4f,0xea,0x5c,0x5c]
1514 @ CHECK: lsrs r1, r2, #1 @ encoding: [0x51,0x08]
1515 @ CHECK: itt eq @ encoding: [0x04,0xbf]
1516 @ CHECK: lsrseq.w r1, r2, #1 @ encoding: [0x5f,0xea,0x52,0x01]
1517 @ CHECK: lsreq r1, r2, #1 @ encoding: [0x51,0x08]
1519 @------------------------------------------------------------------------------
1520 @ LSR (register)
1521 @------------------------------------------------------------------------------
1522 lsr r3, r4, r2
1523 lsr.w r1, r2
1524 lsrs r3, r4, r8
1526 @ CHECK: lsr.w r3, r4, r2 @ encoding: [0x24,0xfa,0x02,0xf3]
1527 @ CHECK: lsr.w r1, r1, r2 @ encoding: [0x21,0xfa,0x02,0xf1]
1528 @ CHECK: lsrs.w r3, r4, r8 @ encoding: [0x34,0xfa,0x08,0xf3]
1530 @------------------------------------------------------------------------------
1531 @ MCR/MCR2
1532 @------------------------------------------------------------------------------
1533 mcr p7, #1, r5, c1, c1, #4
1534 mcr2 p7, #1, r5, c1, c1, #4
1535 mcr p14, #0, r4, c0, c5
1536 mcr2 p4, #2, r2, c1, c3
1537 MCR P7, #1, R5, C1, C1, #4
1538 MCR2 P7, #1, R5, C1, C1, #4
1539 MCR P14, #0, R4, C0, C5
1540 MCR2 P4, #2, R2, C1, C3
1542 @ CHECK: mcr p7, #1, r5, c1, c1, #4 @ encoding: [0x21,0xee,0x91,0x57]
1543 @ CHECK: mcr2 p7, #1, r5, c1, c1, #4 @ encoding: [0x21,0xfe,0x91,0x57]
1544 @ CHECK: mcr p14, #0, r4, c0, c5, #0 @ encoding: [0x00,0xee,0x15,0x4e]
1545 @ CHECK: mcr2 p4, #2, r2, c1, c3, #0 @ encoding: [0x41,0xfe,0x13,0x24]
1546 @ CHECK: mcr p7, #1, r5, c1, c1, #4 @ encoding: [0x21,0xee,0x91,0x57]
1547 @ CHECK: mcr2 p7, #1, r5, c1, c1, #4 @ encoding: [0x21,0xfe,0x91,0x57]
1548 @ CHECK: mcr p14, #0, r4, c0, c5, #0 @ encoding: [0x00,0xee,0x15,0x4e]
1549 @ CHECK: mcr2 p4, #2, r2, c1, c3, #0 @ encoding: [0x41,0xfe,0x13,0x24]
1552 @------------------------------------------------------------------------------
1553 @ MCRR/MCRR2
1554 @------------------------------------------------------------------------------
1555 mcrr p7, #15, r5, r4, c1
1556 mcrr2 p7, #15, r5, r4, c1
1557 MCRR P7, #15, R5, R4, C1
1558 MCRR2 P7, #15, R5, R4, C1
1560 @ CHECK: mcrr p7, #15, r5, r4, c1 @ encoding: [0x44,0xec,0xf1,0x57]
1561 @ CHECK: mcrr2 p7, #15, r5, r4, c1 @ encoding: [0x44,0xfc,0xf1,0x57]
1562 @ CHECK: mcrr p7, #15, r5, r4, c1 @ encoding: [0x44,0xec,0xf1,0x57]
1563 @ CHECK: mcrr2 p7, #15, r5, r4, c1 @ encoding: [0x44,0xfc,0xf1,0x57]
1566 @------------------------------------------------------------------------------
1567 @ MLA/MLS
1568 @------------------------------------------------------------------------------
1569 mla r1,r2,r3,r4
1570 mls r1,r2,r3,r4
1572 @ CHECK: mla r1, r2, r3, r4 @ encoding: [0x02,0xfb,0x03,0x41]
1573 @ CHECK: mls r1, r2, r3, r4 @ encoding: [0x02,0xfb,0x13,0x41]
1576 @------------------------------------------------------------------------------
1577 @ MOV(immediate)
1578 @------------------------------------------------------------------------------
1579 movs r1, #21
1580 movs.w r1, #21
1581 movs r8, #21
1582 movw r0, #65535
1583 movw r1, #43777
1584 movw r1, #43792
1585 mov.w r0, #0x3fc0000
1586 mov r0, #0x3fc0000
1587 movs.w r0, #0x3fc0000
1588 itte eq
1589 movseq r1, #12
1590 moveq r1, #12
1591 movne.w r1, #12
1592 mov.w r6, #450
1593 it lo
1594 movlo r1, #-1
1596 @ alias for mvn
1597 mov r3, #-3
1598 mov r11, #0xabcd
1599 movs r0, #1
1600 it ne
1601 movne r3, #15
1603 itt eq
1604 moveq r0, #255
1605 moveq r1, #256
1607 @ CHECK: movs r1, #21 @ encoding: [0x15,0x21]
1608 @ CHECK: movs.w r1, #21 @ encoding: [0x5f,0xf0,0x15,0x01]
1609 @ CHECK: movs.w r8, #21 @ encoding: [0x5f,0xf0,0x15,0x08]
1610 @ CHECK: movw r0, #65535 @ encoding: [0x4f,0xf6,0xff,0x70]
1611 @ CHECK: movw r1, #43777 @ encoding: [0x4a,0xf6,0x01,0x31]
1612 @ CHECK: movw r1, #43792 @ encoding: [0x4a,0xf6,0x10,0x31]
1613 @ CHECK: mov.w r0, #66846720 @ encoding: [0x4f,0xf0,0x7f,0x70]
1614 @ CHECK: mov.w r0, #66846720 @ encoding: [0x4f,0xf0,0x7f,0x70]
1615 @ CHECK: movs.w r0, #66846720 @ encoding: [0x5f,0xf0,0x7f,0x70]
1616 @ CHECK: itte eq @ encoding: [0x06,0xbf]
1617 @ CHECK: movseq.w r1, #12 @ encoding: [0x5f,0xf0,0x0c,0x01]
1618 @ CHECK: moveq r1, #12 @ encoding: [0x0c,0x21]
1619 @ CHECK: movne.w r1, #12 @ encoding: [0x4f,0xf0,0x0c,0x01]
1620 @ CHECK: mov.w r6, #450 @ encoding: [0x4f,0xf4,0xe1,0x76]
1621 @ CHECK: it lo @ encoding: [0x38,0xbf]
1622 @ CHECK: movlo.w r1, #-1 @ encoding: [0x4f,0xf0,0xff,0x31]
1623 @ CHECK: mvn r3, #2 @ encoding: [0x6f,0xf0,0x02,0x03]
1624 @ CHECK: movw r11, #43981 @ encoding: [0x4a,0xf6,0xcd,0x3b]
1625 @ CHECK: movs r0, #1 @ encoding: [0x01,0x20]
1626 @ CHECK: it ne @ encoding: [0x18,0xbf]
1627 @ CHECK: movne r3, #15 @ encoding: [0x0f,0x23]
1629 @ CHECK: itt eq @ encoding: [0x04,0xbf]
1630 @ CHECK: moveq r0, #255 @ encoding: [0xff,0x20]
1631 @ CHECK: movweq r1, #256 @ encoding: [0x40,0xf2,0x00,0x11]
1633 @------------------------------------------------------------------------------
1634 @ MOV(shifted register)
1635 @------------------------------------------------------------------------------
1636 mov r6, r2, lsl #16
1637 mov.w r6, r2, lsl #16
1638 mov r6, r2, lsr #16
1639 mov.w r6, r2, lsr #16
1640 movs r6, r2, asr #32
1641 movs.w r6, r2, asr #32
1642 movs r6, r2, ror #5
1643 movs.w r6, r2, ror #5
1644 movs r4, r4, lsl r5
1645 movs.w r4, r4, lsl r5
1646 movs r4, r4, lsr r5
1647 movs.w r4, r4, lsr r5
1648 movs r4, r4, asr r5
1649 movs.w r4, r4, asr r5
1650 movs r4, r4, ror r5
1651 movs.w r4, r4, ror r5
1652 mov r4, r4, lsl r5
1653 movs r4, r4, ror r8
1654 movs r4, r5, lsr r6
1655 itttt eq
1656 moveq r4, r4, lsl r5
1657 moveq r4, r4, lsr r5
1658 moveq r4, r4, asr r5
1659 moveq r4, r4, ror r5
1660 mov r4, r4, rrx
1662 @ CHECK: lsl.w r6, r2, #16 @ encoding: [0x4f,0xea,0x02,0x46]
1663 @ CHECK: lsl.w r6, r2, #16 @ encoding: [0x4f,0xea,0x02,0x46]
1664 @ CHECK: lsr.w r6, r2, #16 @ encoding: [0x4f,0xea,0x12,0x46]
1665 @ CHECK: lsr.w r6, r2, #16 @ encoding: [0x4f,0xea,0x12,0x46]
1666 @ CHECK: asrs r6, r2, #32 @ encoding: [0x16,0x10]
1667 @ CHECK: asrs.w r6, r2, #32 @ encoding: [0x5f,0xea,0x22,0x06]
1668 @ CHECK: rors.w r6, r2, #5 @ encoding: [0x5f,0xea,0x72,0x16]
1669 @ CHECK: rors.w r6, r2, #5 @ encoding: [0x5f,0xea,0x72,0x16]
1670 @ CHECK: lsls r4, r5 @ encoding: [0xac,0x40]
1671 @ CHECK: lsls.w r4, r4, r5 @ encoding: [0x14,0xfa,0x05,0xf4]
1672 @ CHECK: lsrs r4, r5 @ encoding: [0xec,0x40]
1673 @ CHECK: lsrs.w r4, r4, r5 @ encoding: [0x34,0xfa,0x05,0xf4]
1674 @ CHECK: asrs r4, r5 @ encoding: [0x2c,0x41]
1675 @ CHECK: asrs.w r4, r4, r5 @ encoding: [0x54,0xfa,0x05,0xf4]
1676 @ CHECK: rors r4, r5 @ encoding: [0xec,0x41]
1677 @ CHECK: rors.w r4, r4, r5 @ encoding: [0x74,0xfa,0x05,0xf4]
1678 @ CHECK: lsl.w r4, r4, r5 @ encoding: [0x04,0xfa,0x05,0xf4]
1679 @ CHECK: rors.w r4, r4, r8 @ encoding: [0x74,0xfa,0x08,0xf4]
1680 @ CHECK: lsrs.w r4, r5, r6 @ encoding: [0x35,0xfa,0x06,0xf4]
1681 @ CHECK: itttt eq @ encoding: [0x01,0xbf]
1682 @ CHECK: lsleq r4, r5 @ encoding: [0xac,0x40]
1683 @ CHECK: lsreq r4, r5 @ encoding: [0xec,0x40]
1684 @ CHECK: asreq r4, r5 @ encoding: [0x2c,0x41]
1685 @ CHECK: roreq r4, r5 @ encoding: [0xec,0x41]
1686 @ CHECK: rrx r4, r4 @ encoding: [0x4f,0xea,0x34,0x04]
1689 @------------------------------------------------------------------------------
1690 @ MOVT
1691 @------------------------------------------------------------------------------
1692 movt r3, #7
1693 movt r6, #0xffff
1694 it eq
1695 movteq r4, #0xff0
1697 @ CHECK: movt r3, #7 @ encoding: [0xc0,0xf2,0x07,0x03]
1698 @ CHECK: movt r6, #65535 @ encoding: [0xcf,0xf6,0xff,0x76]
1699 @ CHECK: it eq @ encoding: [0x08,0xbf]
1700 @ CHECK: movteq r4, #4080 @ encoding: [0xc0,0xf6,0xf0,0x74]
1702 @------------------------------------------------------------------------------
1703 @ MRC/MRC2
1704 @------------------------------------------------------------------------------
1705 mrc p14, #0, r1, c1, c2, #4
1706 mrc p15, #7, apsr_nzcv, c15, c6, #6
1707 mrc p9, #1, r1, c2, c2
1708 mrc2 p12, #3, r3, c3, c4
1709 mrc2 p14, #0, r1, c1, c2, #4
1710 mrc2 p8, #7, apsr_nzcv, c15, c0, #1
1711 MRC P14, #0, R1, C1, C2, #4
1712 MRC P15, #7, APSR_NZCV, C15, C6, #6
1713 MRC P9, #1, R1, C2, C2
1714 MRC2 P12, #3, R3, C3, C4
1715 MRC2 P14, #0, R1, C1, C2, #4
1716 MRC2 P8, #7, APSR_NZCV, C15, C0, #1
1718 @ CHECK: mrc p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xee,0x92,0x1e]
1719 @ CHECK: mrc p15, #7, apsr_nzcv, c15, c6, #6 @ encoding: [0xff,0xee,0xd6,0xff]
1720 @ CHECK: mrc p9, #1, r1, c2, c2, #0 @ encoding: [0x32,0xee,0x12,0x19]
1721 @ CHECK: mrc2 p12, #3, r3, c3, c4, #0 @ encoding: [0x73,0xfe,0x14,0x3c]
1722 @ CHECK: mrc2 p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xfe,0x92,0x1e]
1723 @ CHECK: mrc2 p8, #7, apsr_nzcv, c15, c0, #1 @ encoding: [0xff,0xfe,0x30,0xf8]
1724 @ CHECK: mrc p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xee,0x92,0x1e]
1725 @ CHECK: mrc p15, #7, apsr_nzcv, c15, c6, #6 @ encoding: [0xff,0xee,0xd6,0xff]
1726 @ CHECK: mrc p9, #1, r1, c2, c2, #0 @ encoding: [0x32,0xee,0x12,0x19]
1727 @ CHECK: mrc2 p12, #3, r3, c3, c4, #0 @ encoding: [0x73,0xfe,0x14,0x3c]
1728 @ CHECK: mrc2 p14, #0, r1, c1, c2, #4 @ encoding: [0x11,0xfe,0x92,0x1e]
1729 @ CHECK: mrc2 p8, #7, apsr_nzcv, c15, c0, #1 @ encoding: [0xff,0xfe,0x30,0xf8]
1731 @------------------------------------------------------------------------------
1732 @ MRRC/MRRC2
1733 @------------------------------------------------------------------------------
1734 mrrc p7, #1, r5, r4, c1
1735 mrrc2 p7, #1, r5, r4, c1
1736 MRRC P7, #1, R5, R4, C1
1737 MRRC2 P7, #1, R5, R4, C1
1739 @ CHECK: mrrc p7, #1, r5, r4, c1 @ encoding: [0x54,0xec,0x11,0x57]
1740 @ CHECK: mrrc2 p7, #1, r5, r4, c1 @ encoding: [0x54,0xfc,0x11,0x57]
1741 @ CHECK: mrrc p7, #1, r5, r4, c1 @ encoding: [0x54,0xec,0x11,0x57]
1742 @ CHECK: mrrc2 p7, #1, r5, r4, c1 @ encoding: [0x54,0xfc,0x11,0x57]
1745 @------------------------------------------------------------------------------
1746 @ MRS
1747 @------------------------------------------------------------------------------
1748 mrs r8, apsr
1749 mrs r8, cpsr
1750 mrs r8, spsr
1752 @ CHECK: mrs r8, apsr @ encoding: [0xef,0xf3,0x00,0x88]
1753 @ CHECK: mrs r8, apsr @ encoding: [0xef,0xf3,0x00,0x88]
1754 @ CHECK: mrs r8, spsr @ encoding: [0xff,0xf3,0x00,0x88]
1757 @------------------------------------------------------------------------------
1758 @ MSR
1759 @------------------------------------------------------------------------------
1760 msr apsr, r1
1761 msr apsr_g, r2
1762 msr apsr_nzcvq, r3
1763 msr APSR_nzcvq, r4
1764 msr apsr_nzcvqg, r5
1765 msr cpsr_fc, r6
1766 msr cpsr_c, r7
1767 msr cpsr_x, r8
1768 msr cpsr_fc, r9
1769 msr cpsr_all, r11
1770 msr cpsr_fsx, r12
1771 msr spsr_fc, r0
1772 msr SPSR_fsxc, r5
1773 msr cpsr_fsxc, r8
1774 msr cpsr, r3
1776 @ CHECK: msr APSR_nzcvq, r1 @ encoding: [0x81,0xf3,0x00,0x88]
1777 @ CHECK: msr APSR_g, r2 @ encoding: [0x82,0xf3,0x00,0x84]
1778 @ CHECK: msr APSR_nzcvq, r3 @ encoding: [0x83,0xf3,0x00,0x88]
1779 @ CHECK: msr APSR_nzcvq, r4 @ encoding: [0x84,0xf3,0x00,0x88]
1780 @ CHECK: msr APSR_nzcvqg, r5 @ encoding: [0x85,0xf3,0x00,0x8c]
1781 @ CHECK: msr CPSR_fc, r6 @ encoding: [0x86,0xf3,0x00,0x89]
1782 @ CHECK: msr CPSR_c, r7 @ encoding: [0x87,0xf3,0x00,0x81]
1783 @ CHECK: msr CPSR_x, r8 @ encoding: [0x88,0xf3,0x00,0x82]
1784 @ CHECK: msr CPSR_fc, r9 @ encoding: [0x89,0xf3,0x00,0x89]
1785 @ CHECK: msr CPSR_fc, r11 @ encoding: [0x8b,0xf3,0x00,0x89]
1786 @ CHECK: msr CPSR_fsx, r12 @ encoding: [0x8c,0xf3,0x00,0x8e]
1787 @ CHECK: msr SPSR_fc, r0 @ encoding: [0x90,0xf3,0x00,0x89]
1788 @ CHECK: msr SPSR_fsxc, r5 @ encoding: [0x95,0xf3,0x00,0x8f]
1789 @ CHECK: msr CPSR_fsxc, r8 @ encoding: [0x88,0xf3,0x00,0x8f]
1790 @ CHECK: msr CPSR_fc, r3 @ encoding: [0x83,0xf3,0x00,0x89]
1793 @------------------------------------------------------------------------------
1794 @ MUL
1795 @------------------------------------------------------------------------------
1796 muls r3, r4, r3
1797 mul r3, r4, r3
1798 mul r3, r4, r6
1799 it eq
1800 muleq r3, r4, r5
1801 it le
1802 mulle r4, r4, r8
1803 mul r5, r6
1805 @ CHECK: muls r3, r4, r3 @ encoding: [0x63,0x43]
1806 @ CHECK: mul r3, r4, r3 @ encoding: [0x04,0xfb,0x03,0xf3]
1807 @ CHECK: mul r3, r4, r6 @ encoding: [0x04,0xfb,0x06,0xf3]
1808 @ CHECK: it eq @ encoding: [0x08,0xbf]
1809 @ CHECK: muleq r3, r4, r5 @ encoding: [0x04,0xfb,0x05,0xf3]
1810 @ CHECK: it le @ encoding: [0xd8,0xbf]
1811 @ CHECK: mulle r4, r4, r8 @ encoding: [0x04,0xfb,0x08,0xf4]
1812 @ CHECK: mul r5, r6, r5 @ encoding: [0x06,0xfb,0x05,0xf5]
1815 @------------------------------------------------------------------------------
1816 @ MVN(immediate)
1817 @------------------------------------------------------------------------------
1818 mvns r8, #21
1819 mvn r0, #0x3fc0000
1820 mvns r0, #0x3fc0000
1821 itte eq
1822 mvnseq r1, #12
1823 mvneq.w r1, #12
1824 mvnne r1, #12
1826 @ CHECK: mvns r8, #21 @ encoding: [0x7f,0xf0,0x15,0x08]
1827 @ CHECK: mvn r0, #66846720 @ encoding: [0x6f,0xf0,0x7f,0x70]
1828 @ CHECK: mvns r0, #66846720 @ encoding: [0x7f,0xf0,0x7f,0x70]
1829 @ CHECK: itte eq @ encoding: [0x06,0xbf]
1830 @ CHECK: mvnseq r1, #12 @ encoding: [0x7f,0xf0,0x0c,0x01]
1831 @ CHECK: mvneq r1, #12 @ encoding: [0x6f,0xf0,0x0c,0x01]
1832 @ CHECK: mvnne r1, #12 @ encoding: [0x6f,0xf0,0x0c,0x01]
1835 @------------------------------------------------------------------------------
1836 @ MVN(register)
1837 @------------------------------------------------------------------------------
1838 mvn r2, r3
1839 mvns r2, r3
1840 mvn r5, r6, lsl #19
1841 mvn r5, r6, lsr #9
1842 mvn.w r5, r6, asr #4
1843 mvn r5, r6, ror #6
1844 mvn r5, r6, rrx
1845 it eq
1846 mvneq r2, r3
1848 @ CHECK: mvn.w r2, r3 @ encoding: [0x6f,0xea,0x03,0x02]
1849 @ CHECK: mvns r2, r3 @ encoding: [0xda,0x43]
1850 @ CHECK: mvn.w r5, r6, lsl #19 @ encoding: [0x6f,0xea,0xc6,0x45]
1851 @ CHECK: mvn.w r5, r6, lsr #9 @ encoding: [0x6f,0xea,0x56,0x25]
1852 @ CHECK: mvn.w r5, r6, asr #4 @ encoding: [0x6f,0xea,0x26,0x15]
1853 @ CHECK: mvn.w r5, r6, ror #6 @ encoding: [0x6f,0xea,0xb6,0x15]
1854 @ CHECK: mvn.w r5, r6, rrx @ encoding: [0x6f,0xea,0x36,0x05]
1855 @ CHECK: it eq @ encoding: [0x08,0xbf]
1856 @ CHECK: mvneq r2, r3 @ encoding: [0xda,0x43]
1858 @------------------------------------------------------------------------------
1859 @ NEG
1860 @------------------------------------------------------------------------------
1861 neg r5, r2
1862 neg r5, r8
1864 @ CHECK: rsb.w r5, r2, #0 @ encoding: [0xc2,0xf1,0x00,0x05]
1865 @ CHECK: rsb.w r5, r8, #0 @ encoding: [0xc8,0xf1,0x00,0x05]
1868 @------------------------------------------------------------------------------
1869 @ NOP
1870 @------------------------------------------------------------------------------
1871 nop.w
1873 @ CHECK: nop.w @ encoding: [0xaf,0xf3,0x00,0x80]
1876 @------------------------------------------------------------------------------
1877 @ ORN
1878 @------------------------------------------------------------------------------
1879 orn r4, r5, #0xf000
1880 orn.w r4, r5, #0xf000
1881 orn r4, r5, r6
1882 orn.w r4, r5, r6
1883 orns r4, r5, r6
1884 orns.w r4, r5, r6
1885 orn r4, r5, r6, lsl #5
1886 orn.w r4, r5, r6, lsl #5
1887 orns r4, r5, r6, lsr #5
1888 orn r4, r5, r6, lsr #5
1889 orns r4, r5, r6, asr #5
1890 orn r4, r5, r6, ror #5
1892 @ CHECK: orn r4, r5, #61440 @ encoding: [0x65,0xf4,0x70,0x44]
1893 @ CHECK: orn r4, r5, #61440 @ encoding: [0x65,0xf4,0x70,0x44]
1894 @ CHECK: orn r4, r5, r6 @ encoding: [0x65,0xea,0x06,0x04]
1895 @ CHECK: orn r4, r5, r6 @ encoding: [0x65,0xea,0x06,0x04]
1896 @ CHECK: orns r4, r5, r6 @ encoding: [0x75,0xea,0x06,0x04]
1897 @ CHECK: orns r4, r5, r6 @ encoding: [0x75,0xea,0x06,0x04]
1898 @ CHECK: orn r4, r5, r6, lsl #5 @ encoding: [0x65,0xea,0x46,0x14]
1899 @ CHECK: orn r4, r5, r6, lsl #5 @ encoding: [0x65,0xea,0x46,0x14]
1900 @ CHECK: orns r4, r5, r6, lsr #5 @ encoding: [0x75,0xea,0x56,0x14]
1901 @ CHECK: orn r4, r5, r6, lsr #5 @ encoding: [0x65,0xea,0x56,0x14]
1902 @ CHECK: orns r4, r5, r6, asr #5 @ encoding: [0x75,0xea,0x66,0x14]
1903 @ CHECK: orn r4, r5, r6, ror #5 @ encoding: [0x65,0xea,0x76,0x14]
1906 @------------------------------------------------------------------------------
1907 @ ORR
1908 @------------------------------------------------------------------------------
1909 orr r4, r5, #0xf000
1910 orr r4, r5, r6
1911 orr r4, r5, r6, lsl #5
1912 orrs r4, r5, r6, lsr #5
1913 orr r4, r5, r6, lsr #5
1914 orrs r4, r5, r6, asr #5
1915 orr r4, r5, r6, ror #5
1917 @ CHECK: orr r4, r5, #61440 @ encoding: [0x45,0xf4,0x70,0x44]
1918 @ CHECK: orr.w r4, r5, r6 @ encoding: [0x45,0xea,0x06,0x04]
1919 @ CHECK: orr.w r4, r5, r6, lsl #5 @ encoding: [0x45,0xea,0x46,0x14]
1920 @ CHECK: orrs.w r4, r5, r6, lsr #5 @ encoding: [0x55,0xea,0x56,0x14]
1921 @ CHECK: orr.w r4, r5, r6, lsr #5 @ encoding: [0x45,0xea,0x56,0x14]
1922 @ CHECK: orrs.w r4, r5, r6, asr #5 @ encoding: [0x55,0xea,0x66,0x14]
1923 @ CHECK: orr.w r4, r5, r6, ror #5 @ encoding: [0x45,0xea,0x76,0x14]
1926 @------------------------------------------------------------------------------
1927 @ PKH
1928 @------------------------------------------------------------------------------
1929 pkhbt r2, r2, r3
1930 pkhbt r2, r2, r3, lsl #31
1931 pkhbt r2, r2, r3, lsl #0
1932 pkhbt r2, r2, r3, lsl #15
1934 pkhtb r2, r2, r3
1935 pkhtb r2, r2, r3, asr #31
1936 pkhtb r2, r2, r3, asr #15
1938 @ CHECK: pkhbt r2, r2, r3 @ encoding: [0xc2,0xea,0x03,0x02]
1939 @ CHECK: pkhbt r2, r2, r3, lsl #31 @ encoding: [0xc2,0xea,0xc3,0x72]
1940 @ CHECK: pkhbt r2, r2, r3 @ encoding: [0xc2,0xea,0x03,0x02]
1941 @ CHECK: pkhbt r2, r2, r3, lsl #15 @ encoding: [0xc2,0xea,0xc3,0x32]
1943 @ CHECK: pkhbt r2, r3, r2 @ encoding: [0xc3,0xea,0x02,0x02]
1944 @ CHECK: pkhtb r2, r2, r3, asr #31 @ encoding: [0xc2,0xea,0xe3,0x72]
1945 @ CHECK: pkhtb r2, r2, r3, asr #15 @ encoding: [0xc2,0xea,0xe3,0x32]
1948 @------------------------------------------------------------------------------
1949 @ PLD(immediate)
1950 @------------------------------------------------------------------------------
1951 pld [r5, #-4]
1952 pld [r6, #32]
1953 pld [r6, #33]
1954 pld [r6, #257]
1955 pld [r7, #257]
1956 pld [r1, #0]
1957 pld [r1, #-0]
1958 pld.w [r1, #-0]
1960 @ CHECK: pld [r5, #-4] @ encoding: [0x15,0xf8,0x04,0xfc]
1961 @ CHECK: pld [r6, #32] @ encoding: [0x96,0xf8,0x20,0xf0]
1962 @ CHECK: pld [r6, #33] @ encoding: [0x96,0xf8,0x21,0xf0]
1963 @ CHECK: pld [r6, #257] @ encoding: [0x96,0xf8,0x01,0xf1]
1964 @ CHECK: pld [r7, #257] @ encoding: [0x97,0xf8,0x01,0xf1]
1965 @ CHECK: pld [r1] @ encoding: [0x91,0xf8,0x00,0xf0]
1966 @ CHECK: pld [r1, #-0] @ encoding: [0x11,0xf8,0x00,0xfc]
1967 @ CHECK: pld [r1, #-0] @ encoding: [0x11,0xf8,0x00,0xfc]
1970 @------------------------------------------------------------------------------
1971 @ PLD(literal)
1972 @------------------------------------------------------------------------------
1973 @ pld _foo
1975 @ FIXME: pld _foo @ encoding: [0x9f'A',0xf8'A',A,0xf0'A']
1976 @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
1978 pld [pc,#-4095]
1979 pld.w [pc,#-4095]
1980 @ CHECK: pld [pc, #-4095] @ encoding: [0x1f,0xf8,0xff,0xff]
1981 @ CHECK: pld [pc, #-4095] @ encoding: [0x1f,0xf8,0xff,0xff]
1984 @------------------------------------------------------------------------------
1985 @ PLD(register)
1986 @------------------------------------------------------------------------------
1987 pld [r8, r1]
1988 pld [r5, r2]
1989 pld.w [r5, r2]
1990 pld [r0, r2, lsl #3]
1991 pld [r8, r2, lsl #2]
1992 pld [sp, r2, lsl #1]
1993 pld [sp, r2, lsl #0]
1994 pld.w [sp, r2, lsl #1]
1996 @ CHECK: pld [r8, r1] @ encoding: [0x18,0xf8,0x01,0xf0]
1997 @ CHECK: pld [r5, r2] @ encoding: [0x15,0xf8,0x02,0xf0]
1998 @ CHECK: pld [r5, r2] @ encoding: [0x15,0xf8,0x02,0xf0]
1999 @ CHECK: pld [r0, r2, lsl #3] @ encoding: [0x10,0xf8,0x32,0xf0]
2000 @ CHECK: pld [r8, r2, lsl #2] @ encoding: [0x18,0xf8,0x22,0xf0]
2001 @ CHECK: pld [sp, r2, lsl #1] @ encoding: [0x1d,0xf8,0x12,0xf0]
2002 @ CHECK: pld [sp, r2] @ encoding: [0x1d,0xf8,0x02,0xf0]
2003 @ CHECK: pld [sp, r2, lsl #1] @ encoding: [0x1d,0xf8,0x12,0xf0]
2005 @------------------------------------------------------------------------------
2006 @ PLI(immediate)
2007 @------------------------------------------------------------------------------
2008 pli [r5, #-4]
2009 pli [r6, #32]
2010 pli [r6, #33]
2011 pli [r6, #257]
2012 pli [r7, #257]
2013 pli [pc, #+4095]
2014 pli [pc, #-4095]
2015 pli.w [pc, #-4095]
2017 @ CHECK: pli [r5, #-4] @ encoding: [0x15,0xf9,0x04,0xfc]
2018 @ CHECK: pli [r6, #32] @ encoding: [0x96,0xf9,0x20,0xf0]
2019 @ CHECK: pli [r6, #33] @ encoding: [0x96,0xf9,0x21,0xf0]
2020 @ CHECK: pli [r6, #257] @ encoding: [0x96,0xf9,0x01,0xf1]
2021 @ CHECK: pli [r7, #257] @ encoding: [0x97,0xf9,0x01,0xf1]
2022 @ CHECK: pli [pc, #4095] @ encoding: [0x9f,0xf9,0xff,0xff]
2023 @ CHECK: pli [pc, #-4095] @ encoding: [0x1f,0xf9,0xff,0xff]
2024 @ CHECK: pli [pc, #-4095] @ encoding: [0x1f,0xf9,0xff,0xff]
2027 @------------------------------------------------------------------------------
2028 @ PLI(literal)
2029 @------------------------------------------------------------------------------
2030 @ pli _foo
2033 @ FIXME: pli _foo @ encoding: [0x9f'A',0xf9'A',A,0xf0'A']
2034 @ fixup A - offset: 0, value: _foo, kind: fixup_t2_ldst_pcrel_12
2037 @------------------------------------------------------------------------------
2038 @ PLI(register)
2039 @------------------------------------------------------------------------------
2040 pli [r8, r1]
2041 pli [r5, r2]
2042 pli.w [r5, r2]
2043 pli [r0, r2, lsl #3]
2044 pli [r8, r2, lsl #2]
2045 pli [sp, r2, lsl #1]
2046 pli [sp, r2, lsl #0]
2047 pli.w [sp, r2, lsl #1]
2049 @ CHECK: pli [r8, r1] @ encoding: [0x18,0xf9,0x01,0xf0]
2050 @ CHECK: pli [r5, r2] @ encoding: [0x15,0xf9,0x02,0xf0]
2051 @ CHECK: pli [r5, r2] @ encoding: [0x15,0xf9,0x02,0xf0]
2052 @ CHECK: pli [r0, r2, lsl #3] @ encoding: [0x10,0xf9,0x32,0xf0]
2053 @ CHECK: pli [r8, r2, lsl #2] @ encoding: [0x18,0xf9,0x22,0xf0]
2054 @ CHECK: pli [sp, r2, lsl #1] @ encoding: [0x1d,0xf9,0x12,0xf0]
2055 @ CHECK: pli [sp, r2] @ encoding: [0x1d,0xf9,0x02,0xf0]
2056 @ CHECK: pli [sp, r2, lsl #1] @ encoding: [0x1d,0xf9,0x12,0xf0]
2058 @------------------------------------------------------------------------------
2059 @ POP (alias)
2060 @------------------------------------------------------------------------------
2061 pop {r2, r9}
2063 @ CHECK: pop.w {r2, r9} @ encoding: [0xbd,0xe8,0x04,0x02]
2066 @------------------------------------------------------------------------------
2067 @ PUSH (alias)
2068 @------------------------------------------------------------------------------
2069 push {r2, r9}
2071 @ CHECK: push.w {r2, r9} @ encoding: [0x2d,0xe9,0x04,0x02]
2074 @------------------------------------------------------------------------------
2075 @ QADD/QADD16/QADD8
2076 @------------------------------------------------------------------------------
2077 qadd r1, r2, r3
2078 qadd16 r1, r2, r3
2079 qadd8 r1, r2, r3
2080 itte gt
2081 qaddgt r1, r2, r3
2082 qadd16gt r1, r2, r3
2083 qadd8le r1, r2, r3
2085 @ CHECK: qadd r1, r2, r3 @ encoding: [0x83,0xfa,0x82,0xf1]
2086 @ CHECK: qadd16 r1, r2, r3 @ encoding: [0x92,0xfa,0x13,0xf1]
2087 @ CHECK: qadd8 r1, r2, r3 @ encoding: [0x82,0xfa,0x13,0xf1]
2088 @ CHECK: itte gt @ encoding: [0xc6,0xbf]
2089 @ CHECK: qaddgt r1, r2, r3 @ encoding: [0x83,0xfa,0x82,0xf1]
2090 @ CHECK: qadd16gt r1, r2, r3 @ encoding: [0x92,0xfa,0x13,0xf1]
2091 @ CHECK: qadd8le r1, r2, r3 @ encoding: [0x82,0xfa,0x13,0xf1]
2094 @------------------------------------------------------------------------------
2095 @ QDADD/QDSUB
2096 @------------------------------------------------------------------------------
2097 qdadd r6, r7, r8
2098 qdsub r6, r7, r8
2099 itt hi
2100 qdaddhi r6, r7, r8
2101 qdsubhi r6, r7, r8
2103 @ CHECK: qdadd r6, r7, r8 @ encoding: [0x88,0xfa,0x97,0xf6]
2104 @ CHECK: qdsub r6, r7, r8 @ encoding: [0x88,0xfa,0xb7,0xf6]
2105 @ CHECK: itt hi @ encoding: [0x84,0xbf]
2106 @ CHECK: qdaddhi r6, r7, r8 @ encoding: [0x88,0xfa,0x97,0xf6]
2107 @ CHECK: qdsubhi r6, r7, r8 @ encoding: [0x88,0xfa,0xb7,0xf6]
2110 @------------------------------------------------------------------------------
2111 @ QSAX
2112 @------------------------------------------------------------------------------
2113 qsax r9, r12, r0
2114 it eq
2115 qsaxeq r9, r12, r0
2117 @ CHECK: qsax r9, r12, r0 @ encoding: [0xec,0xfa,0x10,0xf9]
2118 @ CHECK: it eq @ encoding: [0x08,0xbf]
2119 @ CHECK: qsaxeq r9, r12, r0 @ encoding: [0xec,0xfa,0x10,0xf9]
2122 @------------------------------------------------------------------------------
2123 @ QSUB/QSUB16/QSUB8
2124 @------------------------------------------------------------------------------
2125 qsub r1, r2, r3
2126 qsub16 r1, r2, r3
2127 qsub8 r1, r2, r3
2128 itet le
2129 qsuble r1, r2, r3
2130 qsub16gt r1, r2, r3
2131 qsub8le r1, r2, r3
2133 @ CHECK: qsub r1, r2, r3 @ encoding: [0x83,0xfa,0xa2,0xf1]
2134 @ CHECK: qsub16 r1, r2, r3 @ encoding: [0xd2,0xfa,0x13,0xf1]
2135 @ CHECK: qsub8 r1, r2, r3 @ encoding: [0xc2,0xfa,0x13,0xf1]
2136 @ CHECK: itet le @ encoding: [0xd6,0xbf]
2137 @ CHECK: qsuble r1, r2, r3 @ encoding: [0x83,0xfa,0xa2,0xf1]
2138 @ CHECK: qsub16gt r1, r2, r3 @ encoding: [0xd2,0xfa,0x13,0xf1]
2139 @ CHECK: qsub8le r1, r2, r3 @ encoding: [0xc2,0xfa,0x13,0xf1]
2142 @------------------------------------------------------------------------------
2143 @ RBIT
2144 @------------------------------------------------------------------------------
2145 rbit r1, r2
2146 it ne
2147 rbitne r1, r2
2149 @ CHECK: rbit r1, r2 @ encoding: [0x92,0xfa,0xa2,0xf1]
2150 @ CHECK: it ne @ encoding: [0x18,0xbf]
2151 @ CHECK: rbitne r1, r2 @ encoding: [0x92,0xfa,0xa2,0xf1]
2154 @------------------------------------------------------------------------------
2155 @ REV
2156 @------------------------------------------------------------------------------
2157 rev.w r1, r2
2158 rev r2, r8
2159 itt ne
2160 revne r1, r2
2161 revne r1, r8
2163 @ CHECK: rev.w r1, r2 @ encoding: [0x92,0xfa,0x82,0xf1]
2164 @ CHECK: rev.w r2, r8 @ encoding: [0x98,0xfa,0x88,0xf2]
2165 @ CHECK: itt ne @ encoding: [0x1c,0xbf]
2166 @ CHECK: revne r1, r2 @ encoding: [0x11,0xba]
2167 @ CHECK: revne.w r1, r8 @ encoding: [0x98,0xfa,0x88,0xf1]
2170 @------------------------------------------------------------------------------
2171 @ REV16
2172 @------------------------------------------------------------------------------
2173 rev16.w r1, r2
2174 rev16 r2, r8
2175 itt ne
2176 rev16ne r1, r2
2177 rev16ne r1, r8
2179 @ CHECK: rev16.w r1, r2 @ encoding: [0x92,0xfa,0x92,0xf1]
2180 @ CHECK: rev16.w r2, r8 @ encoding: [0x98,0xfa,0x98,0xf2]
2181 @ CHECK: itt ne @ encoding: [0x1c,0xbf]
2182 @ CHECK: rev16ne r1, r2 @ encoding: [0x51,0xba]
2183 @ CHECK: rev16ne.w r1, r8 @ encoding: [0x98,0xfa,0x98,0xf1]
2186 @------------------------------------------------------------------------------
2187 @ REVSH
2188 @------------------------------------------------------------------------------
2189 revsh.w r1, r2
2190 revsh r2, r8
2191 itt ne
2192 revshne r1, r2
2193 revshne r1, r8
2195 @ CHECK: revsh.w r1, r2 @ encoding: [0x92,0xfa,0xb2,0xf1]
2196 @ CHECK: revsh.w r2, r8 @ encoding: [0x98,0xfa,0xb8,0xf2]
2197 @ CHECK: itt ne @ encoding: [0x1c,0xbf]
2198 @ CHECK: revshne r1, r2 @ encoding: [0xd1,0xba]
2199 @ CHECK: revshne.w r1, r8 @ encoding: [0x98,0xfa,0xb8,0xf1]
2202 @------------------------------------------------------------------------------
2203 @ ROR (immediate)
2204 @------------------------------------------------------------------------------
2205 ror r2, r3, #12
2206 rors r8, r3, #31
2207 rors.w r2, r3, #1
2208 ror r2, r3, #4
2209 rors r2, r12, #15
2211 ror r3, #19
2212 rors r8, #2
2213 rors.w r7, #5
2214 ror.w r12, #21
2216 @ CHECK: ror.w r2, r3, #12 @ encoding: [0x4f,0xea,0x33,0x32]
2217 @ CHECK: rors.w r8, r3, #31 @ encoding: [0x5f,0xea,0xf3,0x78]
2218 @ CHECK: rors.w r2, r3, #1 @ encoding: [0x5f,0xea,0x73,0x02]
2219 @ CHECK: ror.w r2, r3, #4 @ encoding: [0x4f,0xea,0x33,0x12]
2220 @ CHECK: rors.w r2, r12, #15 @ encoding: [0x5f,0xea,0xfc,0x32]
2222 @ CHECK: ror.w r3, r3, #19 @ encoding: [0x4f,0xea,0xf3,0x43]
2223 @ CHECK: rors.w r8, r8, #2 @ encoding: [0x5f,0xea,0xb8,0x08]
2224 @ CHECK: rors.w r7, r7, #5 @ encoding: [0x5f,0xea,0x77,0x17]
2225 @ CHECK: ror.w r12, r12, #21 @ encoding: [0x4f,0xea,0x7c,0x5c]
2228 @------------------------------------------------------------------------------
2229 @ ROR (register)
2230 @------------------------------------------------------------------------------
2231 ror r3, r4, r2
2232 ror.w r1, r2
2233 rors r3, r4, r8
2235 @ CHECK: ror.w r3, r4, r2 @ encoding: [0x64,0xfa,0x02,0xf3]
2236 @ CHECK: ror.w r1, r1, r2 @ encoding: [0x61,0xfa,0x02,0xf1]
2237 @ CHECK: rors.w r3, r4, r8 @ encoding: [0x74,0xfa,0x08,0xf3]
2240 @------------------------------------------------------------------------------
2241 @ RRX
2242 @------------------------------------------------------------------------------
2243 rrx r1, r2
2244 rrxs r1, r2
2245 ite lt
2246 rrxlt r9, r12
2247 rrxsge r8, r3
2249 @ CHECK: rrx r1, r2 @ encoding: [0x4f,0xea,0x32,0x01]
2250 @ CHECK: rrxs r1, r2 @ encoding: [0x5f,0xea,0x32,0x01]
2251 @ CHECK: ite lt @ encoding: [0xb4,0xbf]
2252 @ CHECK: rrxlt r9, r12 @ encoding: [0x4f,0xea,0x3c,0x09]
2253 @ CHECK: rrxsge r8, r3 @ encoding: [0x5f,0xea,0x33,0x08]
2255 @------------------------------------------------------------------------------
2256 @ RSB (immediate)
2257 @------------------------------------------------------------------------------
2258 rsb r2, r5, #0xff000
2259 rsbs r3, r12, #0xf
2260 rsb r1, #0xff
2261 rsb r1, r1, #0xff
2262 rsb r11, r11, #0
2263 rsb r9, #0
2264 rsbs r3, r1, #0
2265 rsb r3, r1, #0
2267 @ CHECK: rsb.w r2, r5, #1044480 @ encoding: [0xc5,0xf5,0x7f,0x22]
2268 @ CHECK: rsbs.w r3, r12, #15 @ encoding: [0xdc,0xf1,0x0f,0x03]
2269 @ CHECK: rsb.w r1, r1, #255 @ encoding: [0xc1,0xf1,0xff,0x01]
2270 @ CHECK: rsb.w r1, r1, #255 @ encoding: [0xc1,0xf1,0xff,0x01]
2271 @ CHECK: rsb.w r11, r11, #0 @ encoding: [0xcb,0xf1,0x00,0x0b]
2272 @ CHECK: rsb.w r9, r9, #0 @ encoding: [0xc9,0xf1,0x00,0x09]
2273 @ CHECK: rsbs r3, r1, #0 @ encoding: [0x4b,0x42]
2274 @ CHECK: rsb.w r3, r1, #0 @ encoding: [0xc1,0xf1,0x00,0x03]
2277 @------------------------------------------------------------------------------
2278 @ RSB (register)
2279 @------------------------------------------------------------------------------
2280 rsb r4, r8
2281 rsb.w r4, r8
2282 rsb r4, r9, r8
2283 rsb.w r4, r9, r8
2284 rsb r1, r4, r8, asr #3
2285 rsb.w r1, r4, r8, asr #3
2286 rsbs r2, r1, r7, lsl #1
2287 rsbs.w r2, r1, r7, lsl #1
2288 rsbs r0, r1, r2
2289 rsbs.w r0, r1, r2
2291 @ CHECK: rsb r4, r4, r8 @ encoding: [0xc4,0xeb,0x08,0x04]
2292 @ CHECK: rsb r4, r4, r8 @ encoding: [0xc4,0xeb,0x08,0x04]
2293 @ CHECK: rsb r4, r9, r8 @ encoding: [0xc9,0xeb,0x08,0x04]
2294 @ CHECK: rsb r4, r9, r8 @ encoding: [0xc9,0xeb,0x08,0x04]
2295 @ CHECK: rsb r1, r4, r8, asr #3 @ encoding: [0xc4,0xeb,0xe8,0x01]
2296 @ CHECK: rsb r1, r4, r8, asr #3 @ encoding: [0xc4,0xeb,0xe8,0x01]
2297 @ CHECK: rsbs r2, r1, r7, lsl #1 @ encoding: [0xd1,0xeb,0x47,0x02]
2298 @ CHECK: rsbs r2, r1, r7, lsl #1 @ encoding: [0xd1,0xeb,0x47,0x02]
2299 @ CHECK: rsbs r0, r1, r2 @ encoding: [0xd1,0xeb,0x02,0x00]
2300 @ CHECK: rsbs r0, r1, r2 @ encoding: [0xd1,0xeb,0x02,0x00]
2303 @------------------------------------------------------------------------------
2304 @ SADD16
2305 @------------------------------------------------------------------------------
2306 sadd16 r3, r4, r8
2307 it ne
2308 sadd16ne r3, r4, r8
2310 @ CHECK: sadd16 r3, r4, r8 @ encoding: [0x94,0xfa,0x08,0xf3]
2311 @ CHECK: it ne @ encoding: [0x18,0xbf]
2312 @ CHECK: sadd16ne r3, r4, r8 @ encoding: [0x94,0xfa,0x08,0xf3]
2315 @------------------------------------------------------------------------------
2316 @ SADD8
2317 @------------------------------------------------------------------------------
2318 sadd8 r3, r4, r8
2319 it ne
2320 sadd8ne r3, r4, r8
2322 @ CHECK: sadd8 r3, r4, r8 @ encoding: [0x84,0xfa,0x08,0xf3]
2323 @ CHECK: it ne @ encoding: [0x18,0xbf]
2324 @ CHECK: sadd8ne r3, r4, r8 @ encoding: [0x84,0xfa,0x08,0xf3]
2327 @------------------------------------------------------------------------------
2328 @ SASX
2329 @------------------------------------------------------------------------------
2330 saddsubx r9, r2, r7
2331 it ne
2332 saddsubxne r2, r5, r6
2333 sasx r9, r2, r7
2334 it ne
2335 sasxne r2, r5, r6
2337 @ CHECK: sasx r9, r2, r7 @ encoding: [0xa2,0xfa,0x07,0xf9]
2338 @ CHECK: it ne @ encoding: [0x18,0xbf]
2339 @ CHECK: sasxne r2, r5, r6 @ encoding: [0xa5,0xfa,0x06,0xf2]
2340 @ CHECK: sasx r9, r2, r7 @ encoding: [0xa2,0xfa,0x07,0xf9]
2341 @ CHECK: it ne @ encoding: [0x18,0xbf]
2342 @ CHECK: sasxne r2, r5, r6 @ encoding: [0xa5,0xfa,0x06,0xf2]
2345 @------------------------------------------------------------------------------
2346 @ SBC (immediate)
2347 @------------------------------------------------------------------------------
2348 sbc r0, r1, #4
2349 sbcs r0, r1, #0
2350 sbc r1, r2, #255
2351 sbc r3, r7, #0x00550055
2352 sbc r8, r12, #0xaa00aa00
2353 sbc r9, r7, #0xa5a5a5a5
2354 sbc r5, r3, #0x87000000
2355 sbc r4, r2, #0x7f800000
2356 sbc r4, r2, #0x00000680
2358 @ CHECK: sbc r0, r1, #4 @ encoding: [0x61,0xf1,0x04,0x00]
2359 @ CHECK: sbcs r0, r1, #0 @ encoding: [0x71,0xf1,0x00,0x00]
2360 @ CHECK: sbc r1, r2, #255 @ encoding: [0x62,0xf1,0xff,0x01]
2361 @ CHECK: sbc r3, r7, #5570645 @ encoding: [0x67,0xf1,0x55,0x13]
2362 @ CHECK: sbc r8, r12, #2852170240 @ encoding: [0x6c,0xf1,0xaa,0x28]
2363 @ CHECK: sbc r9, r7, #2779096485 @ encoding: [0x67,0xf1,0xa5,0x39]
2364 @ CHECK: sbc r5, r3, #2264924160 @ encoding: [0x63,0xf1,0x07,0x45]
2365 @ CHECK: sbc r4, r2, #2139095040 @ encoding: [0x62,0xf1,0xff,0x44]
2366 @ CHECK: sbc r4, r2, #1664 @ encoding: [0x62,0xf5,0xd0,0x64]
2369 @------------------------------------------------------------------------------
2370 @ SBC (register)
2371 @------------------------------------------------------------------------------
2372 sbc r4, r5, r6
2373 sbcs r4, r5, r6
2374 sbc.w r9, r1, r3
2375 sbcs.w r9, r1, r3
2376 sbc r0, r1, r3, ror #4
2377 sbcs r0, r1, r3, lsl #7
2378 sbc.w r0, r1, r3, lsr #31
2379 sbcs.w r0, r1, r3, asr #32
2381 @ CHECK: sbc.w r4, r5, r6 @ encoding: [0x65,0xeb,0x06,0x04]
2382 @ CHECK: sbcs.w r4, r5, r6 @ encoding: [0x75,0xeb,0x06,0x04]
2383 @ CHECK: sbc.w r9, r1, r3 @ encoding: [0x61,0xeb,0x03,0x09]
2384 @ CHECK: sbcs.w r9, r1, r3 @ encoding: [0x71,0xeb,0x03,0x09]
2385 @ CHECK: sbc.w r0, r1, r3, ror #4 @ encoding: [0x61,0xeb,0x33,0x10]
2386 @ CHECK: sbcs.w r0, r1, r3, lsl #7 @ encoding: [0x71,0xeb,0xc3,0x10]
2387 @ CHECK: sbc.w r0, r1, r3, lsr #31 @ encoding: [0x61,0xeb,0xd3,0x70]
2388 @ CHECK: sbcs.w r0, r1, r3, asr #32 @ encoding: [0x71,0xeb,0x23,0x00]
2391 @------------------------------------------------------------------------------
2392 @ SBFX
2393 @------------------------------------------------------------------------------
2394 sbfx r4, r5, #16, #1
2395 it gt
2396 sbfxgt r4, r5, #16, #16
2398 @ CHECK: sbfx r4, r5, #16, #1 @ encoding: [0x45,0xf3,0x00,0x44]
2399 @ CHECK: it gt @ encoding: [0xc8,0xbf]
2400 @ CHECK: sbfxgt r4, r5, #16, #16 @ encoding: [0x45,0xf3,0x0f,0x44]
2403 @------------------------------------------------------------------------------
2404 @ SEL
2405 @------------------------------------------------------------------------------
2406 sel r5, r9, r2
2407 it le
2408 selle r5, r9, r2
2410 @ CHECK: sel r5, r9, r2 @ encoding: [0xa9,0xfa,0x82,0xf5]
2411 @ CHECK: it le @ encoding: [0xd8,0xbf]
2412 @ CHECK: selle r5, r9, r2 @ encoding: [0xa9,0xfa,0x82,0xf5]
2415 @------------------------------------------------------------------------------
2416 @ SEV
2417 @------------------------------------------------------------------------------
2418 sev.w
2419 it eq
2420 seveq.w
2422 @ CHECK: sev.w @ encoding: [0xaf,0xf3,0x04,0x80]
2423 @ CHECK: it eq @ encoding: [0x08,0xbf]
2424 @ CHECK: seveq.w @ encoding: [0xaf,0xf3,0x04,0x80]
2427 @------------------------------------------------------------------------------
2428 @ SADD16/SADD8
2429 @------------------------------------------------------------------------------
2430 sadd16 r1, r2, r3
2431 sadd8 r1, r2, r3
2432 ite gt
2433 sadd16gt r1, r2, r3
2434 sadd8le r1, r2, r3
2436 @ CHECK: sadd16 r1, r2, r3 @ encoding: [0x92,0xfa,0x03,0xf1]
2437 @ CHECK: sadd8 r1, r2, r3 @ encoding: [0x82,0xfa,0x03,0xf1]
2438 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
2439 @ CHECK: sadd16gt r1, r2, r3 @ encoding: [0x92,0xfa,0x03,0xf1]
2440 @ CHECK: sadd8le r1, r2, r3 @ encoding: [0x82,0xfa,0x03,0xf1]
2443 @------------------------------------------------------------------------------
2444 @ SHASX
2445 @------------------------------------------------------------------------------
2446 shasx r4, r8, r2
2447 it gt
2448 shasxgt r4, r8, r2
2449 shaddsubx r4, r8, r2
2450 it gt
2451 shaddsubxgt r4, r8, r2
2453 @ CHECK: shasx r4, r8, r2 @ encoding: [0xa8,0xfa,0x22,0xf4]
2454 @ CHECK: it gt @ encoding: [0xc8,0xbf]
2455 @ CHECK: shasxgt r4, r8, r2 @ encoding: [0xa8,0xfa,0x22,0xf4]
2456 @ CHECK: shasx r4, r8, r2 @ encoding: [0xa8,0xfa,0x22,0xf4]
2457 @ CHECK: it gt @ encoding: [0xc8,0xbf]
2458 @ CHECK: shasxgt r4, r8, r2 @ encoding: [0xa8,0xfa,0x22,0xf4]
2461 @------------------------------------------------------------------------------
2462 @ SHASX
2463 @------------------------------------------------------------------------------
2464 shsax r4, r8, r2
2465 it gt
2466 shsaxgt r4, r8, r2
2467 shsubaddx r4, r8, r2
2468 it gt
2469 shsubaddxgt r4, r8, r2
2471 @ CHECK: shsax r4, r8, r2 @ encoding: [0xe8,0xfa,0x22,0xf4]
2472 @ CHECK: it gt @ encoding: [0xc8,0xbf]
2473 @ CHECK: shsaxgt r4, r8, r2 @ encoding: [0xe8,0xfa,0x22,0xf4]
2474 @ CHECK: shsax r4, r8, r2 @ encoding: [0xe8,0xfa,0x22,0xf4]
2475 @ CHECK: it gt @ encoding: [0xc8,0xbf]
2476 @ CHECK: shsaxgt r4, r8, r2 @ encoding: [0xe8,0xfa,0x22,0xf4]
2479 @------------------------------------------------------------------------------
2480 @ SHSUB16/SHSUB8
2481 @------------------------------------------------------------------------------
2482 shsub16 r4, r8, r2
2483 shsub8 r4, r8, r2
2484 itt gt
2485 shsub16gt r4, r8, r2
2486 shsub8gt r4, r8, r2
2488 @ CHECK: shsub16 r4, r8, r2 @ encoding: [0xd8,0xfa,0x22,0xf4]
2489 @ CHECK: shsub8 r4, r8, r2 @ encoding: [0xc8,0xfa,0x22,0xf4]
2490 @ CHECK: itt gt @ encoding: [0xc4,0xbf]
2491 @ CHECK: shsub16gt r4, r8, r2 @ encoding: [0xd8,0xfa,0x22,0xf4]
2492 @ CHECK: shsub8gt r4, r8, r2 @ encoding: [0xc8,0xfa,0x22,0xf4]
2495 @------------------------------------------------------------------------------
2496 @ SMLABB/SMLABT/SMLATB/SMLATT
2497 @------------------------------------------------------------------------------
2498 smlabb r3, r1, r9, r0
2499 smlabt r5, r6, r4, r1
2500 smlatb r4, r2, r3, r2
2501 smlatt r8, r3, r8, r4
2502 itete gt
2503 smlabbgt r3, r1, r9, r0
2504 smlabtle r5, r6, r4, r1
2505 smlatbgt r4, r2, r3, r2
2506 smlattle r8, r3, r8, r4
2508 @ CHECK: smlabb r3, r1, r9, r0 @ encoding: [0x11,0xfb,0x09,0x03]
2509 @ CHECK: smlabt r5, r6, r4, r1 @ encoding: [0x16,0xfb,0x14,0x15]
2510 @ CHECK: smlatb r4, r2, r3, r2 @ encoding: [0x12,0xfb,0x23,0x24]
2511 @ CHECK: smlatt r8, r3, r8, r4 @ encoding: [0x13,0xfb,0x38,0x48]
2512 @ CHECK: itete gt @ encoding: [0xcb,0xbf]
2513 @ CHECK: smlabbgt r3, r1, r9, r0 @ encoding: [0x11,0xfb,0x09,0x03]
2514 @ CHECK: smlabtle r5, r6, r4, r1 @ encoding: [0x16,0xfb,0x14,0x15]
2515 @ CHECK: smlatbgt r4, r2, r3, r2 @ encoding: [0x12,0xfb,0x23,0x24]
2516 @ CHECK: smlattle r8, r3, r8, r4 @ encoding: [0x13,0xfb,0x38,0x48]
2519 @------------------------------------------------------------------------------
2520 @ SMLAD/SMLADX
2521 @------------------------------------------------------------------------------
2522 smlad r2, r3, r5, r8
2523 smladx r2, r3, r5, r8
2524 itt hi
2525 smladhi r2, r3, r5, r8
2526 smladxhi r2, r3, r5, r8
2528 @ CHECK: smlad r2, r3, r5, r8 @ encoding: [0x23,0xfb,0x05,0x82]
2529 @ CHECK: smladx r2, r3, r5, r8 @ encoding: [0x23,0xfb,0x15,0x82]
2530 @ CHECK: itt hi @ encoding: [0x84,0xbf]
2531 @ CHECK: smladhi r2, r3, r5, r8 @ encoding: [0x23,0xfb,0x05,0x82]
2532 @ CHECK: smladxhi r2, r3, r5, r8 @ encoding: [0x23,0xfb,0x15,0x82]
2535 @------------------------------------------------------------------------------
2536 @ SMLAL
2537 @------------------------------------------------------------------------------
2538 smlal r2, r3, r5, r8
2539 it eq
2540 smlaleq r2, r3, r5, r8
2542 @ CHECK: smlal r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0x08,0x23]
2543 @ CHECK: it eq @ encoding: [0x08,0xbf]
2544 @ CHECK: smlaleq r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0x08,0x23]
2547 @------------------------------------------------------------------------------
2548 @ SMLALBB/SMLALBT/SMLALTB/SMLALTT
2549 @------------------------------------------------------------------------------
2550 smlalbb r3, r1, r9, r0
2551 smlalbt r5, r6, r4, r1
2552 smlaltb r4, r2, r3, r2
2553 smlaltt r8, r3, r8, r4
2554 iteet ge
2555 smlalbbge r3, r1, r9, r0
2556 smlalbtlt r5, r6, r4, r1
2557 smlaltblt r4, r2, r3, r2
2558 smlalttge r8, r3, r8, r4
2560 @ CHECK: smlalbb r3, r1, r9, r0 @ encoding: [0xc9,0xfb,0x80,0x31]
2561 @ CHECK: smlalbt r5, r6, r4, r1 @ encoding: [0xc4,0xfb,0x91,0x56]
2562 @ CHECK: smlaltb r4, r2, r3, r2 @ encoding: [0xc3,0xfb,0xa2,0x42]
2563 @ CHECK: smlaltt r8, r3, r8, r4 @ encoding: [0xc8,0xfb,0xb4,0x83]
2564 @ CHECK: iteet ge @ encoding: [0xad,0xbf]
2565 @ CHECK: smlalbbge r3, r1, r9, r0 @ encoding: [0xc9,0xfb,0x80,0x31]
2566 @ CHECK: smlalbtlt r5, r6, r4, r1 @ encoding: [0xc4,0xfb,0x91,0x56]
2567 @ CHECK: smlaltblt r4, r2, r3, r2 @ encoding: [0xc3,0xfb,0xa2,0x42]
2568 @ CHECK: smlalttge r8, r3, r8, r4 @ encoding: [0xc8,0xfb,0xb4,0x83]
2571 @------------------------------------------------------------------------------
2572 @ SMLALD/SMLALDX
2573 @------------------------------------------------------------------------------
2574 smlald r2, r3, r5, r8
2575 smlaldx r2, r3, r5, r8
2576 ite eq
2577 smlaldeq r2, r3, r5, r8
2578 smlaldxne r2, r3, r5, r8
2580 @ CHECK: smlald r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0xc8,0x23]
2581 @ CHECK: smlaldx r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0xd8,0x23]
2582 @ CHECK: ite eq @ encoding: [0x0c,0xbf]
2583 @ CHECK: smlaldeq r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0xc8,0x23]
2584 @ CHECK: smlaldxne r2, r3, r5, r8 @ encoding: [0xc5,0xfb,0xd8,0x23]
2587 @------------------------------------------------------------------------------
2588 @ SMLAWB/SMLAWT
2589 @------------------------------------------------------------------------------
2590 smlawb r2, r3, r10, r8
2591 smlawt r8, r3, r5, r9
2592 ite eq
2593 smlawbeq r2, r7, r5, r8
2594 smlawtne r1, r3, r0, r8
2596 @ CHECK: smlawb r2, r3, r10, r8 @ encoding: [0x33,0xfb,0x0a,0x82]
2597 @ CHECK: smlawt r8, r3, r5, r9 @ encoding: [0x33,0xfb,0x15,0x98]
2598 @ CHECK: ite eq @ encoding: [0x0c,0xbf]
2599 @ CHECK: smlawbeq r2, r7, r5, r8 @ encoding: [0x37,0xfb,0x05,0x82]
2600 @ CHECK: smlawtne r1, r3, r0, r8 @ encoding: [0x33,0xfb,0x10,0x81]
2603 @------------------------------------------------------------------------------
2604 @ SMLSD/SMLSDX
2605 @------------------------------------------------------------------------------
2606 smlsd r2, r3, r5, r8
2607 smlsdx r2, r3, r5, r8
2608 ite le
2609 smlsdle r2, r3, r5, r8
2610 smlsdxgt r2, r3, r5, r8
2612 @ CHECK: smlsd r2, r3, r5, r8 @ encoding: [0x43,0xfb,0x05,0x82]
2613 @ CHECK: smlsdx r2, r3, r5, r8 @ encoding: [0x43,0xfb,0x15,0x82]
2614 @ CHECK: ite le @ encoding: [0xd4,0xbf]
2615 @ CHECK: smlsdle r2, r3, r5, r8 @ encoding: [0x43,0xfb,0x05,0x82]
2616 @ CHECK: smlsdxgt r2, r3, r5, r8 @ encoding: [0x43,0xfb,0x15,0x82]
2619 @------------------------------------------------------------------------------
2620 @ SMLSLD/SMLSLDX
2621 @------------------------------------------------------------------------------
2622 smlsld r2, r9, r5, r1
2623 smlsldx r4, r11, r2, r8
2624 ite ge
2625 smlsldge r8, r2, r5, r6
2626 smlsldxlt r1, r0, r3, r8
2628 @ CHECK: smlsld r2, r9, r5, r1 @ encoding: [0xd5,0xfb,0xc1,0x29]
2629 @ CHECK: smlsldx r4, r11, r2, r8 @ encoding: [0xd2,0xfb,0xd8,0x4b]
2630 @ CHECK: ite ge @ encoding: [0xac,0xbf]
2631 @ CHECK: smlsldge r8, r2, r5, r6 @ encoding: [0xd5,0xfb,0xc6,0x82]
2632 @ CHECK: smlsldxlt r1, r0, r3, r8 @ encoding: [0xd3,0xfb,0xd8,0x10]
2635 @------------------------------------------------------------------------------
2636 @ SMMLA/SMMLAR
2637 @------------------------------------------------------------------------------
2638 smmla r1, r2, r3, r4
2639 smmlar r4, r3, r2, r1
2640 ite lo
2641 smmlalo r1, r2, r3, r4
2642 smmlarcs r4, r3, r2, r1
2644 @ CHECK: smmla r1, r2, r3, r4 @ encoding: [0x52,0xfb,0x03,0x41]
2645 @ CHECK: smmlar r4, r3, r2, r1 @ encoding: [0x53,0xfb,0x12,0x14]
2646 @ CHECK: ite lo @ encoding: [0x34,0xbf]
2647 @ CHECK: smmlalo r1, r2, r3, r4 @ encoding: [0x52,0xfb,0x03,0x41]
2648 @ CHECK: smmlarhs r4, r3, r2, r1 @ encoding: [0x53,0xfb,0x12,0x14]
2651 @------------------------------------------------------------------------------
2652 @ SMMLS/SMMLSR
2653 @------------------------------------------------------------------------------
2654 smmls r1, r2, r3, r4
2655 smmlsr r4, r3, r2, r1
2656 ite lo
2657 smmlslo r1, r2, r3, r4
2658 smmlsrcs r4, r3, r2, r1
2660 @ CHECK: smmls r1, r2, r3, r4 @ encoding: [0x62,0xfb,0x03,0x41]
2661 @ CHECK: smmlsr r4, r3, r2, r1 @ encoding: [0x63,0xfb,0x12,0x14]
2662 @ CHECK: ite lo @ encoding: [0x34,0xbf]
2663 @ CHECK: smmlslo r1, r2, r3, r4 @ encoding: [0x62,0xfb,0x03,0x41]
2664 @ CHECK: smmlsrhs r4, r3, r2, r1 @ encoding: [0x63,0xfb,0x12,0x14]
2667 @------------------------------------------------------------------------------
2668 @ SMMUL/SMMULR
2669 @------------------------------------------------------------------------------
2670 smmul r2, r3, r4
2671 smmulr r3, r2, r1
2672 ite cc
2673 smmulcc r2, r3, r4
2674 smmulrhs r3, r2, r1
2676 @ CHECK: smmul r2, r3, r4 @ encoding: [0x53,0xfb,0x04,0xf2]
2677 @ CHECK: smmulr r3, r2, r1 @ encoding: [0x52,0xfb,0x11,0xf3]
2678 @ CHECK: ite lo @ encoding: [0x34,0xbf]
2679 @ CHECK: smmullo r2, r3, r4 @ encoding: [0x53,0xfb,0x04,0xf2]
2680 @ CHECK: smmulrhs r3, r2, r1 @ encoding: [0x52,0xfb,0x11,0xf3]
2683 @------------------------------------------------------------------------------
2684 @ SMUAD/SMUADX
2685 @------------------------------------------------------------------------------
2686 smuad r2, r3, r4
2687 smuadx r3, r2, r1
2688 ite lt
2689 smuadlt r2, r3, r4
2690 smuadxge r3, r2, r1
2692 @ CHECK: smuad r2, r3, r4 @ encoding: [0x23,0xfb,0x04,0xf2]
2693 @ CHECK: smuadx r3, r2, r1 @ encoding: [0x22,0xfb,0x11,0xf3]
2694 @ CHECK: ite lt @ encoding: [0xb4,0xbf]
2695 @ CHECK: smuadlt r2, r3, r4 @ encoding: [0x23,0xfb,0x04,0xf2]
2696 @ CHECK: smuadxge r3, r2, r1 @ encoding: [0x22,0xfb,0x11,0xf3]
2699 @------------------------------------------------------------------------------
2700 @ SMULBB/SMULBT/SMULTB/SMULTT
2701 @------------------------------------------------------------------------------
2702 smulbb r3, r9, r0
2703 smulbt r5, r4, r1
2704 smultb r4, r2, r2
2705 smultt r8, r3, r4
2706 itete ge
2707 smulbbge r1, r9, r0
2708 smulbtlt r5, r6, r4
2709 smultbge r2, r3, r2
2710 smulttlt r8, r3, r4
2712 @ CHECK: smulbb r3, r9, r0 @ encoding: [0x19,0xfb,0x00,0xf3]
2713 @ CHECK: smulbt r5, r4, r1 @ encoding: [0x14,0xfb,0x11,0xf5]
2714 @ CHECK: smultb r4, r2, r2 @ encoding: [0x12,0xfb,0x22,0xf4]
2715 @ CHECK: smultt r8, r3, r4 @ encoding: [0x13,0xfb,0x34,0xf8]
2716 @ CHECK: itete ge @ encoding: [0xab,0xbf]
2717 @ CHECK: smulbbge r1, r9, r0 @ encoding: [0x19,0xfb,0x00,0xf1]
2718 @ CHECK: smulbtlt r5, r6, r4 @ encoding: [0x16,0xfb,0x14,0xf5]
2719 @ CHECK: smultbge r2, r3, r2 @ encoding: [0x13,0xfb,0x22,0xf2]
2720 @ CHECK: smulttlt r8, r3, r4 @ encoding: [0x13,0xfb,0x34,0xf8]
2723 @------------------------------------------------------------------------------
2724 @ SMULL
2725 @------------------------------------------------------------------------------
2726 smull r3, r9, r0, r1
2727 it eq
2728 smulleq r8, r3, r4, r5
2730 @ CHECK: smull r3, r9, r0, r1 @ encoding: [0x80,0xfb,0x01,0x39]
2731 @ CHECK: it eq @ encoding: [0x08,0xbf]
2732 @ CHECK: smulleq r8, r3, r4, r5 @ encoding: [0x84,0xfb,0x05,0x83]
2735 @------------------------------------------------------------------------------
2736 @ SMULWB/SMULWT
2737 @------------------------------------------------------------------------------
2738 smulwb r3, r9, r0
2739 smulwt r3, r9, r2
2740 ite gt
2741 smulwbgt r3, r9, r0
2742 smulwtle r3, r9, r2
2744 @ CHECK: smulwb r3, r9, r0 @ encoding: [0x39,0xfb,0x00,0xf3]
2745 @ CHECK: smulwt r3, r9, r2 @ encoding: [0x39,0xfb,0x12,0xf3]
2746 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
2747 @ CHECK: smulwbgt r3, r9, r0 @ encoding: [0x39,0xfb,0x00,0xf3]
2748 @ CHECK: smulwtle r3, r9, r2 @ encoding: [0x39,0xfb,0x12,0xf3]
2751 @------------------------------------------------------------------------------
2752 @ SMUSD/SMUSDX
2753 @------------------------------------------------------------------------------
2754 smusd r3, r0, r1
2755 smusdx r3, r9, r2
2756 ite eq
2757 smusdeq r8, r3, r2
2758 smusdxne r7, r4, r3
2760 @ CHECK: smusd r3, r0, r1 @ encoding: [0x40,0xfb,0x01,0xf3]
2761 @ CHECK: smusdx r3, r9, r2 @ encoding: [0x49,0xfb,0x12,0xf3]
2762 @ CHECK: ite eq @ encoding: [0x0c,0xbf]
2763 @ CHECK: smusdeq r8, r3, r2 @ encoding: [0x43,0xfb,0x02,0xf8]
2764 @ CHECK: smusdxne r7, r4, r3 @ encoding: [0x44,0xfb,0x13,0xf7]
2767 @------------------------------------------------------------------------------
2768 @ SRS
2769 @------------------------------------------------------------------------------
2770 srsdb sp, #1
2771 srsia sp, #0
2773 srsdb sp!, #19
2774 srsia sp!, #2
2776 srsea sp, #10
2777 srsfd sp, #9
2779 srsea sp!, #5
2780 srsfd sp!, #5
2782 srs sp, #5
2783 srs sp!, #5
2785 @ CHECK: srsdb sp, #1 @ encoding: [0x0d,0xe8,0x01,0xc0]
2786 @ CHECK: srsia sp, #0 @ encoding: [0x8d,0xe9,0x00,0xc0]
2787 @ CHECK: srsdb sp!, #19 @ encoding: [0x2d,0xe8,0x13,0xc0]
2788 @ CHECK: srsia sp!, #2 @ encoding: [0xad,0xe9,0x02,0xc0]
2789 @ CHECK: srsia sp, #10 @ encoding: [0x8d,0xe9,0x0a,0xc0]
2790 @ CHECK: srsdb sp, #9 @ encoding: [0x0d,0xe8,0x09,0xc0]
2791 @ CHECK: srsia sp!, #5 @ encoding: [0xad,0xe9,0x05,0xc0]
2792 @ CHECK: srsdb sp!, #5 @ encoding: [0x2d,0xe8,0x05,0xc0]
2793 @ CHECK: srsia sp, #5 @ encoding: [0x8d,0xe9,0x05,0xc0]
2794 @ CHECK: srsia sp!, #5 @ encoding: [0xad,0xe9,0x05,0xc0]
2796 srsdb #1
2797 srsia #0
2799 srsdb #19!
2800 srsia #2!
2802 srsea #10
2803 srsfd #9
2805 srsea #5!
2806 srsfd #5!
2808 srs #5
2809 srs #5!
2811 @ CHECK: srsdb sp, #1 @ encoding: [0x0d,0xe8,0x01,0xc0]
2812 @ CHECK: srsia sp, #0 @ encoding: [0x8d,0xe9,0x00,0xc0]
2813 @ CHECK: srsdb sp!, #19 @ encoding: [0x2d,0xe8,0x13,0xc0]
2814 @ CHECK: srsia sp!, #2 @ encoding: [0xad,0xe9,0x02,0xc0]
2815 @ CHECK: srsia sp, #10 @ encoding: [0x8d,0xe9,0x0a,0xc0]
2816 @ CHECK: srsdb sp, #9 @ encoding: [0x0d,0xe8,0x09,0xc0]
2817 @ CHECK: srsia sp!, #5 @ encoding: [0xad,0xe9,0x05,0xc0]
2818 @ CHECK: srsdb sp!, #5 @ encoding: [0x2d,0xe8,0x05,0xc0]
2819 @ CHECK: srsia sp, #5 @ encoding: [0x8d,0xe9,0x05,0xc0]
2820 @ CHECK: srsia sp!, #5 @ encoding: [0xad,0xe9,0x05,0xc0]
2823 @------------------------------------------------------------------------------
2824 @ SSAT
2825 @------------------------------------------------------------------------------
2826 ssat r8, #1, r10
2827 ssat r8, #1, r10, lsl #0
2828 ssat r8, #1, r10, lsl #31
2829 ssat r8, #1, r10, asr #1
2831 @ CHECK: ssat r8, #1, r10 @ encoding: [0x0a,0xf3,0x00,0x08]
2832 @ CHECK: ssat r8, #1, r10 @ encoding: [0x0a,0xf3,0x00,0x08]
2833 @ CHECK: ssat r8, #1, r10, lsl #31 @ encoding: [0x0a,0xf3,0xc0,0x78]
2834 @ CHECK: ssat r8, #1, r10, asr #1 @ encoding: [0x2a,0xf3,0x40,0x08]
2837 @------------------------------------------------------------------------------
2838 @ SSAT16
2839 @------------------------------------------------------------------------------
2840 ssat16 r2, #1, r7
2841 ssat16 r3, #16, r5
2843 @ CHECK: ssat16 r2, #1, r7 @ encoding: [0x27,0xf3,0x00,0x02]
2844 @ CHECK: ssat16 r3, #16, r5 @ encoding: [0x25,0xf3,0x0f,0x03]
2847 @------------------------------------------------------------------------------
2848 @ SSAX
2849 @------------------------------------------------------------------------------
2850 ssubaddx r2, r3, r4
2851 it lt
2852 ssubaddxlt r2, r3, r4
2853 ssax r2, r3, r4
2854 it lt
2855 ssaxlt r2, r3, r4
2857 @ CHECK: ssax r2, r3, r4 @ encoding: [0xe3,0xfa,0x04,0xf2]
2858 @ CHECK: it lt @ encoding: [0xb8,0xbf]
2859 @ CHECK: ssaxlt r2, r3, r4 @ encoding: [0xe3,0xfa,0x04,0xf2]
2860 @ CHECK: ssax r2, r3, r4 @ encoding: [0xe3,0xfa,0x04,0xf2]
2861 @ CHECK: it lt @ encoding: [0xb8,0xbf]
2862 @ CHECK: ssaxlt r2, r3, r4 @ encoding: [0xe3,0xfa,0x04,0xf2]
2865 @------------------------------------------------------------------------------
2866 @ SSUB16/SSUB8
2867 @------------------------------------------------------------------------------
2868 ssub16 r1, r0, r6
2869 ssub8 r9, r2, r4
2870 ite ne
2871 ssub16ne r5, r3, r2
2872 ssub8eq r5, r1, r2
2874 @ CHECK: ssub16 r1, r0, r6 @ encoding: [0xd0,0xfa,0x06,0xf1]
2875 @ CHECK: ssub8 r9, r2, r4 @ encoding: [0xc2,0xfa,0x04,0xf9]
2876 @ CHECK: ite ne @ encoding: [0x14,0xbf]
2877 @ CHECK: ssub16ne r5, r3, r2 @ encoding: [0xd3,0xfa,0x02,0xf5]
2878 @ CHECK: ssub8eq r5, r1, r2 @ encoding: [0xc1,0xfa,0x02,0xf5]
2881 @------------------------------------------------------------------------------
2882 @ STC{L}/STC2{L}
2883 @------------------------------------------------------------------------------
2884 stc2 p0, c8, [r1, #4]
2885 stc2 p1, c7, [r2]
2886 stc2 p2, c6, [r3, #-224]
2887 stc2 p3, c5, [r4, #-120]!
2888 stc2 p4, c4, [r5], #16
2889 stc2 p5, c3, [r6], #-72
2890 stc2l p6, c2, [r7, #4]
2891 stc2l p7, c1, [r8]
2892 stc2l p8, c0, [r9, #-224]
2893 stc2l p9, c1, [r10, #-120]!
2894 stc2l p0, c2, [r11], #16
2895 stc2l p1, c3, [r12], #-72
2897 stc p12, c4, [r0, #4]
2898 stc p13, c5, [r1]
2899 stc p14, c6, [r2, #-224]
2900 stc p15, c7, [r3, #-120]!
2901 stc p5, c8, [r4], #16
2902 stc p4, c9, [r5], #-72
2903 stcl p3, c10, [r6, #4]
2904 stcl p2, c11, [r7]
2905 stcl p1, c12, [r8, #-224]
2906 stcl p0, c13, [r9, #-120]!
2907 stcl p6, c14, [r10], #16
2908 stcl p7, c15, [r11], #-72
2910 stc2 p2, c8, [r1], { 25 }
2912 @ CHECK: stc2 p0, c8, [r1, #4] @ encoding: [0x81,0xfd,0x01,0x80]
2913 @ CHECK: stc2 p1, c7, [r2] @ encoding: [0x82,0xfd,0x00,0x71]
2914 @ CHECK: stc2 p2, c6, [r3, #-224] @ encoding: [0x03,0xfd,0x38,0x62]
2915 @ CHECK: stc2 p3, c5, [r4, #-120]! @ encoding: [0x24,0xfd,0x1e,0x53]
2916 @ CHECK: stc2 p4, c4, [r5], #16 @ encoding: [0xa5,0xfc,0x04,0x44]
2917 @ CHECK: stc2 p5, c3, [r6], #-72 @ encoding: [0x26,0xfc,0x12,0x35]
2918 @ CHECK: stc2l p6, c2, [r7, #4] @ encoding: [0xc7,0xfd,0x01,0x26]
2919 @ CHECK: stc2l p7, c1, [r8] @ encoding: [0xc8,0xfd,0x00,0x17]
2920 @ CHECK: stc2l p8, c0, [r9, #-224] @ encoding: [0x49,0xfd,0x38,0x08]
2921 @ CHECK: stc2l p9, c1, [r10, #-120]! @ encoding: [0x6a,0xfd,0x1e,0x19]
2922 @ CHECK: stc2l p0, c2, [r11], #16 @ encoding: [0xeb,0xfc,0x04,0x20]
2923 @ CHECK: stc2l p1, c3, [r12], #-72 @ encoding: [0x6c,0xfc,0x12,0x31]
2925 @ CHECK: stc p12, c4, [r0, #4] @ encoding: [0x80,0xed,0x01,0x4c]
2926 @ CHECK: stc p13, c5, [r1] @ encoding: [0x81,0xed,0x00,0x5d]
2927 @ CHECK: stc p14, c6, [r2, #-224] @ encoding: [0x02,0xed,0x38,0x6e]
2928 @ CHECK: stc p15, c7, [r3, #-120]! @ encoding: [0x23,0xed,0x1e,0x7f]
2929 @ CHECK: stc p5, c8, [r4], #16 @ encoding: [0xa4,0xec,0x04,0x85]
2930 @ CHECK: stc p4, c9, [r5], #-72 @ encoding: [0x25,0xec,0x12,0x94]
2931 @ CHECK: stcl p3, c10, [r6, #4] @ encoding: [0xc6,0xed,0x01,0xa3]
2932 @ CHECK: stcl p2, c11, [r7] @ encoding: [0xc7,0xed,0x00,0xb2]
2933 @ CHECK: stcl p1, c12, [r8, #-224] @ encoding: [0x48,0xed,0x38,0xc1]
2934 @ CHECK: stcl p0, c13, [r9, #-120]! @ encoding: [0x69,0xed,0x1e,0xd0]
2935 @ CHECK: stcl p6, c14, [r10], #16 @ encoding: [0xea,0xec,0x04,0xe6]
2936 @ CHECK: stcl p7, c15, [r11], #-72 @ encoding: [0x6b,0xec,0x12,0xf7]
2938 @ CHECK: stc2 p2, c8, [r1], {25} @ encoding: [0x81,0xfc,0x19,0x82]
2941 @------------------------------------------------------------------------------
2942 @ STMIA
2943 @------------------------------------------------------------------------------
2944 stmia.w r4, {r4, r5, r8, r9}
2945 stmia.w r4, {r5, r6}
2946 stmia.w r5!, {r3, r8}
2947 stm.w r4, {r4, r5, r8, r9}
2948 stm.w r4, {r5, r6}
2949 stm.w r5!, {r3, r8}
2950 stm.w r5!, {r1, r2}
2951 stm.w r2, {r1, r2}
2953 stmia r4, {r4, r5, r8, r9}
2954 stmia r4, {r5, r6}
2955 stmia r5!, {r3, r8}
2956 stm r4, {r4, r5, r8, r9}
2957 stm r4, {r5, r6}
2958 stm r5!, {r3, r8}
2959 stmea r5!, {r3, r8}
2961 @ CHECK: stm.w r4, {r4, r5, r8, r9} @ encoding: [0x84,0xe8,0x30,0x03]
2962 @ CHECK: stm.w r4, {r5, r6} @ encoding: [0x84,0xe8,0x60,0x00]
2963 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2964 @ CHECK: stm.w r4, {r4, r5, r8, r9} @ encoding: [0x84,0xe8,0x30,0x03]
2965 @ CHECK: stm.w r4, {r5, r6} @ encoding: [0x84,0xe8,0x60,0x00]
2966 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2967 @ CHECK: stm.w r5!, {r1, r2} @ encoding: [0xa5,0xe8,0x06,0x00]
2968 @ CHECK: stm.w r2, {r1, r2} @ encoding: [0x82,0xe8,0x06,0x00]
2970 @ CHECK: stm.w r4, {r4, r5, r8, r9} @ encoding: [0x84,0xe8,0x30,0x03]
2971 @ CHECK: stm.w r4, {r5, r6} @ encoding: [0x84,0xe8,0x60,0x00]
2972 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2973 @ CHECK: stm.w r4, {r4, r5, r8, r9} @ encoding: [0x84,0xe8,0x30,0x03]
2974 @ CHECK: stm.w r4, {r5, r6} @ encoding: [0x84,0xe8,0x60,0x00]
2975 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2976 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2979 @------------------------------------------------------------------------------
2980 @ STMDB
2981 @------------------------------------------------------------------------------
2982 stmdb r4, {r4, r5, r8, r9}
2983 stmdb r4, {r5, r6}
2984 stmdb r5!, {r3, r8}
2985 stmea r5!, {r3, r8}
2986 stmdb.w r5, {r0, r1}
2988 @ CHECK: stmdb r4, {r4, r5, r8, r9} @ encoding: [0x04,0xe9,0x30,0x03]
2989 @ CHECK: stmdb r4, {r5, r6} @ encoding: [0x04,0xe9,0x60,0x00]
2990 @ CHECK: stmdb r5!, {r3, r8} @ encoding: [0x25,0xe9,0x08,0x01]
2991 @ CHECK: stm.w r5!, {r3, r8} @ encoding: [0xa5,0xe8,0x08,0x01]
2992 @ CHECK: stmdb r5, {r0, r1} @ encoding: [0x05,0xe9,0x03,0x00]
2995 @------------------------------------------------------------------------------
2996 @ STR(immediate)
2997 @------------------------------------------------------------------------------
2998 str r5, [r5, #-4]
2999 str r5, [r6, #32]
3000 str r5, [r6, #33]
3001 str r5, [r6, #257]
3002 str.w pc, [r7, #257]
3003 str r2, [r4, #255]!
3004 str r8, [sp, #4]!
3005 str lr, [sp, #-4]!
3006 str r2, [r4], #255
3007 str r8, [sp], #4
3008 str lr, [sp], #-4
3010 @ CHECK: str r5, [r5, #-4] @ encoding: [0x45,0xf8,0x04,0x5c]
3011 @ CHECK: str r5, [r6, #32] @ encoding: [0x35,0x62]
3012 @ CHECK: str.w r5, [r6, #33] @ encoding: [0xc6,0xf8,0x21,0x50]
3013 @ CHECK: str.w r5, [r6, #257] @ encoding: [0xc6,0xf8,0x01,0x51]
3014 @ CHECK: str.w pc, [r7, #257] @ encoding: [0xc7,0xf8,0x01,0xf1]
3015 @ CHECK: str r2, [r4, #255]! @ encoding: [0x44,0xf8,0xff,0x2f]
3016 @ CHECK: str r8, [sp, #4]! @ encoding: [0x4d,0xf8,0x04,0x8f]
3017 @ CHECK: str lr, [sp, #-4]! @ encoding: [0x4d,0xf8,0x04,0xed]
3018 @ CHECK: str r2, [r4], #255 @ encoding: [0x44,0xf8,0xff,0x2b]
3019 @ CHECK: str r8, [sp], #4 @ encoding: [0x4d,0xf8,0x04,0x8b]
3020 @ CHECK: str lr, [sp], #-4 @ encoding: [0x4d,0xf8,0x04,0xe9]
3023 @------------------------------------------------------------------------------
3024 @ STR(register)
3025 @------------------------------------------------------------------------------
3026 str r1, [r8, r1]
3027 str.w r4, [r5, r2]
3028 str r6, [r0, r2, lsl #3]
3029 str r8, [r8, r2, lsl #2]
3030 str r7, [sp, r2, lsl #1]
3031 str r7, [sp, r2, lsl #0]
3033 @ CHECK: str.w r1, [r8, r1] @ encoding: [0x48,0xf8,0x01,0x10]
3034 @ CHECK: str.w r4, [r5, r2] @ encoding: [0x45,0xf8,0x02,0x40]
3035 @ CHECK: str.w r6, [r0, r2, lsl #3] @ encoding: [0x40,0xf8,0x32,0x60]
3036 @ CHECK: str.w r8, [r8, r2, lsl #2] @ encoding: [0x48,0xf8,0x22,0x80]
3037 @ CHECK: str.w r7, [sp, r2, lsl #1] @ encoding: [0x4d,0xf8,0x12,0x70]
3038 @ CHECK: str.w r7, [sp, r2] @ encoding: [0x4d,0xf8,0x02,0x70]
3041 @------------------------------------------------------------------------------
3042 @ STRB(immediate)
3043 @------------------------------------------------------------------------------
3044 strb r5, [r5, #-4]
3045 strb r5, [r6, #32]
3046 strb r5, [r6, #33]
3047 strb r5, [r6, #257]
3048 strb.w lr, [r7, #257]
3049 strb r5, [r8, #255]!
3050 strb r2, [r5, #4]!
3051 strb r1, [r4, #-4]!
3052 strb lr, [r3], #255
3053 strb r9, [r2], #4
3054 strb r3, [sp], #-4
3055 strb r4, [r8, #-0]!
3056 strb r1, [r0], #-0
3058 @ CHECK: strb r5, [r5, #-4] @ encoding: [0x05,0xf8,0x04,0x5c]
3059 @ CHECK: strb.w r5, [r6, #32] @ encoding: [0x86,0xf8,0x20,0x50]
3060 @ CHECK: strb.w r5, [r6, #33] @ encoding: [0x86,0xf8,0x21,0x50]
3061 @ CHECK: strb.w r5, [r6, #257] @ encoding: [0x86,0xf8,0x01,0x51]
3062 @ CHECK: strb.w lr, [r7, #257] @ encoding: [0x87,0xf8,0x01,0xe1]
3063 @ CHECK: strb r5, [r8, #255]! @ encoding: [0x08,0xf8,0xff,0x5f]
3064 @ CHECK: strb r2, [r5, #4]! @ encoding: [0x05,0xf8,0x04,0x2f]
3065 @ CHECK: strb r1, [r4, #-4]! @ encoding: [0x04,0xf8,0x04,0x1d]
3066 @ CHECK: strb lr, [r3], #255 @ encoding: [0x03,0xf8,0xff,0xeb]
3067 @ CHECK: strb r9, [r2], #4 @ encoding: [0x02,0xf8,0x04,0x9b]
3068 @ CHECK: strb r3, [sp], #-4 @ encoding: [0x0d,0xf8,0x04,0x39]
3069 @ CHECK: strb r4, [r8, #-0]! @ encoding: [0x08,0xf8,0x00,0x4d]
3070 @ CHECK: strb r1, [r0], #-0 @ encoding: [0x00,0xf8,0x00,0x19]
3073 @------------------------------------------------------------------------------
3074 @ STRB(register)
3075 @------------------------------------------------------------------------------
3076 strb r1, [r8, r1]
3077 strb.w r4, [r5, r2]
3078 strb r6, [r0, r2, lsl #3]
3079 strb r8, [r8, r2, lsl #2]
3080 strb r7, [sp, r2, lsl #1]
3081 strb r7, [sp, r2, lsl #0]
3083 @ CHECK: strb.w r1, [r8, r1] @ encoding: [0x08,0xf8,0x01,0x10]
3084 @ CHECK: strb.w r4, [r5, r2] @ encoding: [0x05,0xf8,0x02,0x40]
3085 @ CHECK: strb.w r6, [r0, r2, lsl #3] @ encoding: [0x00,0xf8,0x32,0x60]
3086 @ CHECK: strb.w r8, [r8, r2, lsl #2] @ encoding: [0x08,0xf8,0x22,0x80]
3087 @ CHECK: strb.w r7, [sp, r2, lsl #1] @ encoding: [0x0d,0xf8,0x12,0x70]
3088 @ CHECK: strb.w r7, [sp, r2] @ encoding: [0x0d,0xf8,0x02,0x70]
3091 @------------------------------------------------------------------------------
3092 @ STRBT
3093 @------------------------------------------------------------------------------
3094 strbt r1, [r2]
3095 strbt r1, [r8, #0]
3096 strbt r1, [r8, #3]
3097 strbt r1, [r8, #255]
3099 @ CHECK: strbt r1, [r2] @ encoding: [0x02,0xf8,0x00,0x1e]
3100 @ CHECK: strbt r1, [r8] @ encoding: [0x08,0xf8,0x00,0x1e]
3101 @ CHECK: strbt r1, [r8, #3] @ encoding: [0x08,0xf8,0x03,0x1e]
3102 @ CHECK: strbt r1, [r8, #255] @ encoding: [0x08,0xf8,0xff,0x1e]
3105 @------------------------------------------------------------------------------
3106 @ STRD
3107 @------------------------------------------------------------------------------
3108 strd r3, r5, [r6, #24]
3109 strd r3, r5, [r6, #24]!
3110 strd r3, r5, [r6], #4
3111 strd r3, r5, [r6], #-8
3112 strd r3, r5, [r6]
3113 strd r8, r1, [r3, #0]
3114 strd r0, r1, [r2, #-0]
3115 strd r0, r1, [r2, #-0]!
3116 strd r0, r1, [r2], #-0
3117 strd r0, r1, [r2, #256]
3118 strd r0, r1, [r2, #256]!
3119 strd r0, r1, [r2], #256
3121 @ CHECK: strd r3, r5, [r6, #24] @ encoding: [0xc6,0xe9,0x06,0x35]
3122 @ CHECK: strd r3, r5, [r6, #24]! @ encoding: [0xe6,0xe9,0x06,0x35]
3123 @ CHECK: strd r3, r5, [r6], #4 @ encoding: [0xe6,0xe8,0x01,0x35]
3124 @ CHECK: strd r3, r5, [r6], #-8 @ encoding: [0x66,0xe8,0x02,0x35]
3125 @ CHECK: strd r3, r5, [r6] @ encoding: [0xc6,0xe9,0x00,0x35]
3126 @ CHECK: strd r8, r1, [r3] @ encoding: [0xc3,0xe9,0x00,0x81]
3127 @ CHECK: strd r0, r1, [r2, #-0] @ encoding: [0x42,0xe9,0x00,0x01]
3128 @ CHECK: strd r0, r1, [r2, #-0]! @ encoding: [0x62,0xe9,0x00,0x01]
3129 @ CHECK: strd r0, r1, [r2], #-0 @ encoding: [0x62,0xe8,0x00,0x01]
3130 @ CHECK: strd r0, r1, [r2, #256] @ encoding: [0xc2,0xe9,0x40,0x01]
3131 @ CHECK: strd r0, r1, [r2, #256]! @ encoding: [0xe2,0xe9,0x40,0x01]
3132 @ CHECK: strd r0, r1, [r2], #256 @ encoding: [0xe2,0xe8,0x40,0x01]
3135 @------------------------------------------------------------------------------
3136 @ STREX/STREXB/STREXH/STREXD
3137 @------------------------------------------------------------------------------
3138 strex r1, r8, [r4]
3139 strex r8, r2, [r4, #0]
3140 strex r2, r12, [sp, #128]
3141 strexb r5, r1, [r7]
3142 strexh r9, r7, [r12]
3143 strexd r9, r3, r6, [r4]
3145 @ CHECK: strex r1, r8, [r4] @ encoding: [0x44,0xe8,0x00,0x81]
3146 @ CHECK: strex r8, r2, [r4] @ encoding: [0x44,0xe8,0x00,0x28]
3147 @ CHECK: strex r2, r12, [sp, #128] @ encoding: [0x4d,0xe8,0x20,0xc2]
3148 @ CHECK: strexb r5, r1, [r7] @ encoding: [0xc7,0xe8,0x45,0x1f]
3149 @ CHECK: strexh r9, r7, [r12] @ encoding: [0xcc,0xe8,0x59,0x7f]
3150 @ CHECK: strexd r9, r3, r6, [r4] @ encoding: [0xc4,0xe8,0x79,0x36]
3153 @------------------------------------------------------------------------------
3154 @ STRH(immediate)
3155 @------------------------------------------------------------------------------
3156 strh r5, [r5, #-4]
3157 strh r5, [r6, #32]
3158 strh r5, [r6, #33]
3159 strh r5, [r6, #257]
3160 strh.w lr, [r7, #257]
3161 strh r5, [r8, #255]!
3162 strh r2, [r5, #4]!
3163 strh r1, [r4, #-4]!
3164 strh lr, [r3], #255
3165 strh r9, [r2], #4
3166 strh r3, [sp], #-4
3168 @ CHECK: strh r5, [r5, #-4] @ encoding: [0x25,0xf8,0x04,0x5c]
3169 @ CHECK: strh r5, [r6, #32] @ encoding: [0x35,0x84]
3170 @ CHECK: strh.w r5, [r6, #33] @ encoding: [0xa6,0xf8,0x21,0x50]
3171 @ CHECK: strh.w r5, [r6, #257] @ encoding: [0xa6,0xf8,0x01,0x51]
3172 @ CHECK: strh.w lr, [r7, #257] @ encoding: [0xa7,0xf8,0x01,0xe1]
3173 @ CHECK: strh r5, [r8, #255]! @ encoding: [0x28,0xf8,0xff,0x5f]
3174 @ CHECK: strh r2, [r5, #4]! @ encoding: [0x25,0xf8,0x04,0x2f]
3175 @ CHECK: strh r1, [r4, #-4]! @ encoding: [0x24,0xf8,0x04,0x1d]
3176 @ CHECK: strh lr, [r3], #255 @ encoding: [0x23,0xf8,0xff,0xeb]
3177 @ CHECK: strh r9, [r2], #4 @ encoding: [0x22,0xf8,0x04,0x9b]
3178 @ CHECK: strh r3, [sp], #-4 @ encoding: [0x2d,0xf8,0x04,0x39]
3181 @------------------------------------------------------------------------------
3182 @ STRH(register)
3183 @------------------------------------------------------------------------------
3184 strh r1, [r8, r1]
3185 strh.w r4, [r5, r2]
3186 strh r6, [r0, r2, lsl #3]
3187 strh r8, [r8, r2, lsl #2]
3188 strh r7, [sp, r2, lsl #1]
3189 strh r7, [sp, r2, lsl #0]
3191 @ CHECK: strh.w r1, [r8, r1] @ encoding: [0x28,0xf8,0x01,0x10]
3192 @ CHECK: strh.w r4, [r5, r2] @ encoding: [0x25,0xf8,0x02,0x40]
3193 @ CHECK: strh.w r6, [r0, r2, lsl #3] @ encoding: [0x20,0xf8,0x32,0x60]
3194 @ CHECK: strh.w r8, [r8, r2, lsl #2] @ encoding: [0x28,0xf8,0x22,0x80]
3195 @ CHECK: strh.w r7, [sp, r2, lsl #1] @ encoding: [0x2d,0xf8,0x12,0x70]
3196 @ CHECK: strh.w r7, [sp, r2] @ encoding: [0x2d,0xf8,0x02,0x70]
3199 @------------------------------------------------------------------------------
3200 @ STRHT
3201 @------------------------------------------------------------------------------
3202 strht r1, [r2]
3203 strht r1, [r8, #0]
3204 strht r1, [r8, #3]
3205 strht r1, [r8, #255]
3207 @ CHECK: strht r1, [r2] @ encoding: [0x22,0xf8,0x00,0x1e]
3208 @ CHECK: strht r1, [r8] @ encoding: [0x28,0xf8,0x00,0x1e]
3209 @ CHECK: strht r1, [r8, #3] @ encoding: [0x28,0xf8,0x03,0x1e]
3210 @ CHECK: strht r1, [r8, #255] @ encoding: [0x28,0xf8,0xff,0x1e]
3213 @------------------------------------------------------------------------------
3214 @ STRT
3215 @------------------------------------------------------------------------------
3216 strt r1, [r2]
3217 strt r1, [r8, #0]
3218 strt r1, [r8, #3]
3219 strt r1, [r8, #255]
3221 @ CHECK: strt r1, [r2] @ encoding: [0x42,0xf8,0x00,0x1e]
3222 @ CHECK: strt r1, [r8] @ encoding: [0x48,0xf8,0x00,0x1e]
3223 @ CHECK: strt r1, [r8, #3] @ encoding: [0x48,0xf8,0x03,0x1e]
3224 @ CHECK: strt r1, [r8, #255] @ encoding: [0x48,0xf8,0xff,0x1e]
3227 @------------------------------------------------------------------------------
3228 @ SUB (immediate)
3229 @------------------------------------------------------------------------------
3230 itet eq
3231 subeq r1, r2, #4
3232 subwne r5, r3, #1023
3233 subeq r4, r5, #293
3234 sub r2, sp, #1024
3235 sub r2, r8, #0xff00
3236 sub r2, r3, #257
3237 subw r2, r3, #257
3238 sub r12, r6, #0x100
3239 subw r12, r6, #0x100
3240 subs r1, r2, #0x1f0
3241 sub r2, #1
3242 sub r0, r0, #32
3243 subs r2, r2, #56
3244 subs r2, #56
3245 subw r0, r0, #4095
3246 subw r0, #4095
3247 sub r0, r0, #4095
3248 sub r0, #4095
3249 @ CHECK: itet eq @ encoding: [0x0a,0xbf]
3250 @ CHECK: subeq r1, r2, #4 @ encoding: [0x11,0x1f]
3251 @ CHECK: subwne r5, r3, #1023 @ encoding: [0xa3,0xf2,0xff,0x35]
3252 @ CHECK: subweq r4, r5, #293 @ encoding: [0xa5,0xf2,0x25,0x14]
3253 @ CHECK: sub.w r2, sp, #1024 @ encoding: [0xad,0xf5,0x80,0x62]
3254 @ CHECK: sub.w r2, r8, #65280 @ encoding: [0xa8,0xf5,0x7f,0x42]
3255 @ CHECK: subw r2, r3, #257 @ encoding: [0xa3,0xf2,0x01,0x12]
3256 @ CHECK: subw r2, r3, #257 @ encoding: [0xa3,0xf2,0x01,0x12]
3257 @ CHECK: sub.w r12, r6, #256 @ encoding: [0xa6,0xf5,0x80,0x7c]
3258 @ CHECK: subw r12, r6, #256 @ encoding: [0xa6,0xf2,0x00,0x1c]
3259 @ CHECK: subs.w r1, r2, #496 @ encoding: [0xb2,0xf5,0xf8,0x71]
3260 @ CHECK: sub.w r2, r2, #1 @ encoding: [0xa2,0xf1,0x01,0x02]
3261 @ CHECK: sub.w r0, r0, #32 @ encoding: [0xa0,0xf1,0x20,0x00]
3262 @ CHECK: subs r2, #56 @ encoding: [0x38,0x3a]
3263 @ CHECK: subs r2, #56 @ encoding: [0x38,0x3a]
3264 @ CHECK-NEXT: subw r0, r0, #4095 @ encoding: [0xa0,0xf6,0xff,0x70]
3265 @ CHECK-NEXT: subw r0, r0, #4095 @ encoding: [0xa0,0xf6,0xff,0x70]
3266 @ CHECK-NEXT: subw r0, r0, #4095 @ encoding: [0xa0,0xf6,0xff,0x70]
3267 @ CHECK-NEXT: subw r0, r0, #4095 @ encoding: [0xa0,0xf6,0xff,0x70]
3268 @------------------------------------------------------------------------------
3269 @ SUB (immediate, writting to SP)
3270 @------------------------------------------------------------------------------
3271 sub.w sp, sp, #0x1fe0000 //T2
3272 sub sp, sp, #0x1fe0000
3273 sub.w sp, #0x1fe0000
3274 sub sp, #0x1fe0000
3275 @ CHECK-NEXT: sub.w sp, sp, #33423360 @ encoding: [0xad,0xf1,0xff,0x7d]
3276 @ CHECK-NEXT: sub.w sp, sp, #33423360 @ encoding: [0xad,0xf1,0xff,0x7d]
3277 @ CHECK-NEXT: sub.w sp, sp, #33423360 @ encoding: [0xad,0xf1,0xff,0x7d]
3278 @ CHECK-NEXT: sub.w sp, sp, #33423360 @ encoding: [0xad,0xf1,0xff,0x7d]
3279 subs.w sp, sp, #0x1fe0000 //T2
3280 subs sp, sp, #0x1fe0000
3281 subs.w sp, #0x1fe0000
3282 subs sp, #0x1fe0000
3283 @ CHECK-NEXT: subs.w sp, sp, #33423360 @ encoding: [0xbd,0xf1,0xff,0x7d]
3284 @ CHECK-NEXT: subs.w sp, sp, #33423360 @ encoding: [0xbd,0xf1,0xff,0x7d]
3285 @ CHECK-NEXT: subs.w sp, sp, #33423360 @ encoding: [0xbd,0xf1,0xff,0x7d]
3286 @ CHECK-NEXT: subs.w sp, sp, #33423360 @ encoding: [0xbd,0xf1,0xff,0x7d]
3287 subw sp, sp, #4095 //T3
3288 sub sp, sp, #4095
3289 subw sp, #4095
3290 sub sp, #4095
3291 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
3292 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
3293 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
3294 @ CHECK-NEXT: subw sp, sp, #4095 @ encoding: [0xad,0xf6,0xff,0x7d]
3295 sub sp, #128 //T1
3296 @ CHECK-NEXT: sub sp, #128 @ encoding: [0xa0,0xb0]
3297 subs.w sp, #128 //T2
3298 subs sp, #128 //T2
3299 @ CHECK-NEXT: subs.w sp, sp, #128 @ encoding: [0xbd,0xf1,0x80,0x0d]
3300 @ CHECK-NEXT: subs.w sp, sp, #128 @ encoding: [0xbd,0xf1,0x80,0x0d]
3301 sub.w sp, #128 //T2
3302 @ CHECK-NEXT: sub.w sp, sp, #128 @ encoding: [0xad,0xf1,0x80,0x0d]
3303 subw sp, #128 //T4
3304 @ CHECK-NEXT: subw sp, sp, #128 @ encoding: [0xad,0xf2,0x80,0x0d]
3305 @------------------------------------------------------------------------------
3306 @ SUB (register)
3307 @------------------------------------------------------------------------------
3308 sub r4, r5, r6
3309 sub r4, r5, r6, lsl #5
3310 sub r4, r5, r6, lsr #5
3311 sub.w r4, r5, r6, lsr #5
3312 sub r4, r5, r6, asr #5
3313 sub r4, r5, r6, ror #5
3314 sub.w r5, r2, r12, rrx
3315 sub r2, sp, ip
3316 sub sp, sp, ip
3317 sub sp, ip
3318 sub.w r2, sp, ip
3319 sub.w sp, sp, ip
3320 sub.w sp, ip
3322 @ CHECK: sub.w r4, r5, r6 @ encoding: [0xa5,0xeb,0x06,0x04]
3323 @ CHECK: sub.w r4, r5, r6, lsl #5 @ encoding: [0xa5,0xeb,0x46,0x14]
3324 @ CHECK: sub.w r4, r5, r6, lsr #5 @ encoding: [0xa5,0xeb,0x56,0x14]
3325 @ CHECK: sub.w r4, r5, r6, lsr #5 @ encoding: [0xa5,0xeb,0x56,0x14]
3326 @ CHECK: sub.w r4, r5, r6, asr #5 @ encoding: [0xa5,0xeb,0x66,0x14]
3327 @ CHECK: sub.w r4, r5, r6, ror #5 @ encoding: [0xa5,0xeb,0x76,0x14]
3328 @ CHECK: sub.w r5, r2, r12, rrx @ encoding: [0xa2,0xeb,0x3c,0x05]
3329 @ CHECK: sub.w r2, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x02]
3330 @ CHECK: sub.w sp, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x0d]
3331 @ CHECK: sub.w sp, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x0d]
3332 @ CHECK: sub.w r2, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x02]
3333 @ CHECK: sub.w sp, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x0d]
3334 @ CHECK: sub.w sp, sp, r12 @ encoding: [0xad,0xeb,0x0c,0x0d]
3337 @------------------------------------------------------------------------------
3338 @ SVC
3339 @------------------------------------------------------------------------------
3340 svc #0
3341 it eq
3342 svceq #255
3343 it ne
3344 swine #33
3345 itt eq
3346 svceq #0
3347 svceq #1
3349 @ CHECK: svc #0 @ encoding: [0x00,0xdf]
3350 @ CHECK: it eq @ encoding: [0x08,0xbf]
3351 @ CHECK: svceq #255 @ encoding: [0xff,0xdf]
3352 @ CHECK: it ne @ encoding: [0x18,0xbf]
3353 @ CHECK: svcne #33 @ encoding: [0x21,0xdf]
3354 @ CHECK: itt eq @ encoding: [0x04,0xbf]
3355 @ CHECK: svceq #0 @ encoding: [0x00,0xdf]
3356 @ CHECK: svceq #1 @ encoding: [0x01,0xdf]
3359 @------------------------------------------------------------------------------
3360 @ SXTAB
3361 @------------------------------------------------------------------------------
3362 sxtab r2, r3, r4
3363 sxtab r4, r5, r6, ror #0
3364 it lt
3365 sxtablt r6, r2, r9, ror #8
3366 sxtab r5, r1, r4, ror #16
3367 sxtab r7, r8, r3, ror #24
3369 @ CHECK: sxtab r2, r3, r4 @ encoding: [0x43,0xfa,0x84,0xf2]
3370 @ CHECK: sxtab r4, r5, r6 @ encoding: [0x45,0xfa,0x86,0xf4]
3371 @ CHECK: it lt @ encoding: [0xb8,0xbf]
3372 @ CHECK: sxtablt r6, r2, r9, ror #8 @ encoding: [0x42,0xfa,0x99,0xf6]
3373 @ CHECK: sxtab r5, r1, r4, ror #16 @ encoding: [0x41,0xfa,0xa4,0xf5]
3374 @ CHECK: sxtab r7, r8, r3, ror #24 @ encoding: [0x48,0xfa,0xb3,0xf7]
3377 @------------------------------------------------------------------------------
3378 @ SXTAB16
3379 @------------------------------------------------------------------------------
3380 sxtab16 r6, r2, r7, ror #0
3381 sxtab16 r3, r5, r8, ror #8
3382 sxtab16 r3, r2, r1, ror #16
3383 ite ne
3384 sxtab16ne r0, r1, r4
3385 sxtab16eq r1, r2, r3, ror #24
3387 @ CHECK: sxtab16 r6, r2, r7 @ encoding: [0x22,0xfa,0x87,0xf6]
3388 @ CHECK: sxtab16 r3, r5, r8, ror #8 @ encoding: [0x25,0xfa,0x98,0xf3]
3389 @ CHECK: sxtab16 r3, r2, r1, ror #16 @ encoding: [0x22,0xfa,0xa1,0xf3]
3390 @ CHECK: ite ne @ encoding: [0x14,0xbf]
3391 @ CHECK: sxtab16ne r0, r1, r4 @ encoding: [0x21,0xfa,0x84,0xf0]
3392 @ CHECK: sxtab16eq r1, r2, r3, ror #24 @ encoding: [0x22,0xfa,0xb3,0xf1]
3395 @------------------------------------------------------------------------------
3396 @ SXTAH
3397 @------------------------------------------------------------------------------
3398 sxtah r1, r3, r9
3399 sxtah r3, r8, r3, ror #8
3400 sxtah r9, r3, r3, ror #24
3401 ite hi
3402 sxtahhi r6, r1, r6, ror #0
3403 sxtahls r2, r2, r4, ror #16
3405 @ CHECK: sxtah r1, r3, r9 @ encoding: [0x03,0xfa,0x89,0xf1]
3406 @ CHECK: sxtah r3, r8, r3, ror #8 @ encoding: [0x08,0xfa,0x93,0xf3]
3407 @ CHECK: sxtah r9, r3, r3, ror #24 @ encoding: [0x03,0xfa,0xb3,0xf9]
3408 @ CHECK: ite hi @ encoding: [0x8c,0xbf]
3409 @ CHECK: sxtahhi r6, r1, r6 @ encoding: [0x01,0xfa,0x86,0xf6]
3410 @ CHECK: sxtahls r2, r2, r4, ror #16 @ encoding: [0x02,0xfa,0xa4,0xf2]
3413 @------------------------------------------------------------------------------
3414 @ SXTB
3415 @------------------------------------------------------------------------------
3416 sxtb r5, r6, ror #0
3417 sxtb r6, r9, ror #8
3418 sxtb r8, r3, ror #24
3419 ite ge
3420 sxtbge r2, r4
3421 sxtblt r5, r1, ror #16
3422 sxtb.w r7, r8
3424 @ CHECK: sxtb r5, r6 @ encoding: [0x75,0xb2]
3425 @ CHECK: sxtb.w r6, r9, ror #8 @ encoding: [0x4f,0xfa,0x99,0xf6]
3426 @ CHECK: sxtb.w r8, r3, ror #24 @ encoding: [0x4f,0xfa,0xb3,0xf8]
3427 @ CHECK: ite ge @ encoding: [0xac,0xbf]
3428 @ CHECK: sxtbge r2, r4 @ encoding: [0x62,0xb2]
3429 @ CHECK: sxtblt.w r5, r1, ror #16 @ encoding: [0x4f,0xfa,0xa1,0xf5]
3430 @ CHECK: sxtb.w r7, r8 @ encoding: [0x4f,0xfa,0x88,0xf7]
3433 @------------------------------------------------------------------------------
3434 @ SXTB16
3435 @------------------------------------------------------------------------------
3436 sxtb16 r1, r4
3437 sxtb16 r6, r7, ror #0
3438 sxtb16 r3, r1, ror #16
3439 ite cs
3440 sxtb16cs r3, r5, ror #8
3441 sxtb16lo r2, r3, ror #24
3443 @ CHECK: sxtb16 r1, r4 @ encoding: [0x2f,0xfa,0x84,0xf1]
3444 @ CHECK: sxtb16 r6, r7 @ encoding: [0x2f,0xfa,0x87,0xf6]
3445 @ CHECK: sxtb16 r3, r1, ror #16 @ encoding: [0x2f,0xfa,0xa1,0xf3]
3446 @ CHECK: ite hs @ encoding: [0x2c,0xbf]
3447 @ CHECK: sxtb16hs r3, r5, ror #8 @ encoding: [0x2f,0xfa,0x95,0xf3]
3448 @ CHECK: sxtb16lo r2, r3, ror #24 @ encoding: [0x2f,0xfa,0xb3,0xf2]
3451 @------------------------------------------------------------------------------
3452 @ SXTH
3453 @------------------------------------------------------------------------------
3454 sxth r1, r6, ror #0
3455 sxth r3, r8, ror #8
3456 sxth r9, r3, ror #24
3457 itt ne
3458 sxthne r3, r9
3459 sxthne r2, r2, ror #16
3460 sxth.w r7, r8
3462 @ CHECK: sxth r1, r6 @ encoding: [0x31,0xb2]
3463 @ CHECK: sxth.w r3, r8, ror #8 @ encoding: [0x0f,0xfa,0x98,0xf3]
3464 @ CHECK: sxth.w r9, r3, ror #24 @ encoding: [0x0f,0xfa,0xb3,0xf9]
3465 @ CHECK: itt ne @ encoding: [0x1c,0xbf]
3466 @ CHECK: sxthne.w r3, r9 @ encoding: [0x0f,0xfa,0x89,0xf3]
3467 @ CHECK: sxthne.w r2, r2, ror #16 @ encoding: [0x0f,0xfa,0xa2,0xf2]
3468 @ CHECK: sxth.w r7, r8 @ encoding: [0x0f,0xfa,0x88,0xf7]
3471 @------------------------------------------------------------------------------
3472 @ SXTB
3473 @------------------------------------------------------------------------------
3474 sxtb r5, r6, ror #0
3475 sxtb.w r6, r9, ror #8
3476 sxtb r8, r3, ror #24
3477 ite ge
3478 sxtbge r2, r4
3479 sxtblt r5, r1, ror #16
3481 @ CHECK: sxtb r5, r6 @ encoding: [0x75,0xb2]
3482 @ CHECK: sxtb.w r6, r9, ror #8 @ encoding: [0x4f,0xfa,0x99,0xf6]
3483 @ CHECK: sxtb.w r8, r3, ror #24 @ encoding: [0x4f,0xfa,0xb3,0xf8]
3484 @ CHECK: ite ge @ encoding: [0xac,0xbf]
3485 @ CHECK: sxtbge r2, r4 @ encoding: [0x62,0xb2]
3486 @ CHECK: sxtblt.w r5, r1, ror #16 @ encoding: [0x4f,0xfa,0xa1,0xf5]
3489 @------------------------------------------------------------------------------
3490 @ SXTB16
3491 @------------------------------------------------------------------------------
3492 sxtb16 r1, r4
3493 sxtb16 r6, r7, ror #0
3494 sxtb16 r3, r1, ror #16
3495 ite cs
3496 sxtb16cs r3, r5, ror #8
3497 sxtb16lo r2, r3, ror #24
3499 @ CHECK: sxtb16 r1, r4 @ encoding: [0x2f,0xfa,0x84,0xf1]
3500 @ CHECK: sxtb16 r6, r7 @ encoding: [0x2f,0xfa,0x87,0xf6]
3501 @ CHECK: sxtb16 r3, r1, ror #16 @ encoding: [0x2f,0xfa,0xa1,0xf3]
3502 @ CHECK: ite hs @ encoding: [0x2c,0xbf]
3503 @ CHECK: sxtb16hs r3, r5, ror #8 @ encoding: [0x2f,0xfa,0x95,0xf3]
3504 @ CHECK: sxtb16lo r2, r3, ror #24 @ encoding: [0x2f,0xfa,0xb3,0xf2]
3507 @------------------------------------------------------------------------------
3508 @ SXTH
3509 @------------------------------------------------------------------------------
3510 sxth r1, r6, ror #0
3511 sxth.w r3, r8, ror #8
3512 sxth r9, r3, ror #24
3513 itt ne
3514 sxthne r3, r9
3515 sxthne r2, r2, ror #16
3517 @ CHECK: sxth r1, r6 @ encoding: [0x31,0xb2]
3518 @ CHECK: sxth.w r3, r8, ror #8 @ encoding: [0x0f,0xfa,0x98,0xf3]
3519 @ CHECK: sxth.w r9, r3, ror #24 @ encoding: [0x0f,0xfa,0xb3,0xf9]
3520 @ CHECK: itt ne @ encoding: [0x1c,0xbf]
3521 @ CHECK: sxthne.w r3, r9 @ encoding: [0x0f,0xfa,0x89,0xf3]
3522 @ CHECK: sxthne.w r2, r2, ror #16 @ encoding: [0x0f,0xfa,0xa2,0xf2]
3525 @------------------------------------------------------------------------------
3526 @ TBB/TBH
3527 @------------------------------------------------------------------------------
3528 tbb [r3, r8]
3529 tbh [r3, r8, lsl #1]
3530 it eq
3531 tbbeq [r3, r8]
3532 it cs
3533 tbhcs [r3, r8, lsl #1]
3535 @ CHECK: tbb [r3, r8] @ encoding: [0xd3,0xe8,0x08,0xf0]
3536 @ CHECK: tbh [r3, r8, lsl #1] @ encoding: [0xd3,0xe8,0x18,0xf0]
3537 @ CHECK: it eq @ encoding: [0x08,0xbf]
3538 @ CHECK: tbbeq [r3, r8] @ encoding: [0xd3,0xe8,0x08,0xf0]
3539 @ CHECK: it hs @ encoding: [0x28,0xbf]
3540 @ CHECK: tbhhs [r3, r8, lsl #1] @ encoding: [0xd3,0xe8,0x18,0xf0]
3543 @------------------------------------------------------------------------------
3544 @ TEQ
3545 @------------------------------------------------------------------------------
3546 teq r5, #0xf000
3547 teq r4, r5
3548 teq r4, r5, lsl #5
3549 teq r4, r5, lsr #5
3550 teq r4, r5, lsr #5
3551 teq r4, r5, asr #5
3552 teq r4, r5, ror #5
3554 @ CHECK: teq.w r5, #61440 @ encoding: [0x95,0xf4,0x70,0x4f]
3555 @ CHECK: teq.w r4, r5 @ encoding: [0x94,0xea,0x05,0x0f]
3556 @ CHECK: teq.w r4, r5, lsl #5 @ encoding: [0x94,0xea,0x45,0x1f]
3557 @ CHECK: teq.w r4, r5, lsr #5 @ encoding: [0x94,0xea,0x55,0x1f]
3558 @ CHECK: teq.w r4, r5, lsr #5 @ encoding: [0x94,0xea,0x55,0x1f]
3559 @ CHECK: teq.w r4, r5, asr #5 @ encoding: [0x94,0xea,0x65,0x1f]
3560 @ CHECK: teq.w r4, r5, ror #5 @ encoding: [0x94,0xea,0x75,0x1f]
3563 @------------------------------------------------------------------------------
3564 @ TST
3565 @------------------------------------------------------------------------------
3566 tst r5, #0xf000
3567 tst r2, r5
3568 tst r3, r12, lsl #5
3569 tst r4, r11, lsr #4
3570 tst r5, r10, lsr #12
3571 tst r6, r9, asr #30
3572 tst r7, r8, ror #2
3574 @ CHECK: tst.w r5, #61440 @ encoding: [0x15,0xf4,0x70,0x4f]
3575 @ CHECK: tst r2, r5 @ encoding: [0x2a,0x42]
3576 @ CHECK: tst.w r3, r12, lsl #5 @ encoding: [0x13,0xea,0x4c,0x1f]
3577 @ CHECK: tst.w r4, r11, lsr #4 @ encoding: [0x14,0xea,0x1b,0x1f]
3578 @ CHECK: tst.w r5, r10, lsr #12 @ encoding: [0x15,0xea,0x1a,0x3f]
3579 @ CHECK: tst.w r6, r9, asr #30 @ encoding: [0x16,0xea,0xa9,0x7f]
3580 @ CHECK: tst.w r7, r8, ror #2 @ encoding: [0x17,0xea,0xb8,0x0f]
3583 @------------------------------------------------------------------------------
3584 @ UADD16/UADD8
3585 @------------------------------------------------------------------------------
3586 uadd16 r1, r2, r3
3587 uadd8 r1, r2, r3
3588 ite gt
3589 uadd16gt r1, r2, r3
3590 uadd8le r1, r2, r3
3592 @ CHECK: uadd16 r1, r2, r3 @ encoding: [0x92,0xfa,0x43,0xf1]
3593 @ CHECK: uadd8 r1, r2, r3 @ encoding: [0x82,0xfa,0x43,0xf1]
3594 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3595 @ CHECK: uadd16gt r1, r2, r3 @ encoding: [0x92,0xfa,0x43,0xf1]
3596 @ CHECK: uadd8le r1, r2, r3 @ encoding: [0x82,0xfa,0x43,0xf1]
3599 @------------------------------------------------------------------------------
3600 @ UASX
3601 @------------------------------------------------------------------------------
3602 uasx r9, r12, r0
3603 it eq
3604 uasxeq r9, r12, r0
3605 uaddsubx r9, r12, r0
3606 it eq
3607 uaddsubxeq r9, r12, r0
3609 @ CHECK: uasx r9, r12, r0 @ encoding: [0xac,0xfa,0x40,0xf9]
3610 @ CHECK: it eq @ encoding: [0x08,0xbf]
3611 @ CHECK: uasxeq r9, r12, r0 @ encoding: [0xac,0xfa,0x40,0xf9]
3612 @ CHECK: uasx r9, r12, r0 @ encoding: [0xac,0xfa,0x40,0xf9]
3613 @ CHECK: it eq @ encoding: [0x08,0xbf]
3614 @ CHECK: uasxeq r9, r12, r0 @ encoding: [0xac,0xfa,0x40,0xf9]
3617 @------------------------------------------------------------------------------
3618 @ UBFX
3619 @------------------------------------------------------------------------------
3620 ubfx r4, r5, #16, #1
3621 it gt
3622 ubfxgt r4, r5, #16, #16
3624 @ CHECK: ubfx r4, r5, #16, #1 @ encoding: [0xc5,0xf3,0x00,0x44]
3625 @ CHECK: it gt @ encoding: [0xc8,0xbf]
3626 @ CHECK: ubfxgt r4, r5, #16, #16 @ encoding: [0xc5,0xf3,0x0f,0x44]
3629 @------------------------------------------------------------------------------
3630 @ UHADD16/UHADD8
3631 @------------------------------------------------------------------------------
3632 uhadd16 r4, r8, r2
3633 uhadd8 r4, r8, r2
3634 itt gt
3635 uhadd16gt r4, r8, r2
3636 uhadd8gt r4, r8, r2
3638 @ CHECK: uhadd16 r4, r8, r2 @ encoding: [0x98,0xfa,0x62,0xf4]
3639 @ CHECK: uhadd8 r4, r8, r2 @ encoding: [0x88,0xfa,0x62,0xf4]
3640 @ CHECK: itt gt @ encoding: [0xc4,0xbf]
3641 @ CHECK: uhadd16gt r4, r8, r2 @ encoding: [0x98,0xfa,0x62,0xf4]
3642 @ CHECK: uhadd8gt r4, r8, r2 @ encoding: [0x88,0xfa,0x62,0xf4]
3645 @------------------------------------------------------------------------------
3646 @ UHASX/UHSAX
3647 @------------------------------------------------------------------------------
3648 uhasx r4, r1, r5
3649 uhsax r5, r6, r6
3650 itt gt
3651 uhasxgt r6, r9, r8
3652 uhsaxgt r7, r8, r12
3653 uhaddsubx r4, r1, r5
3654 uhsubaddx r5, r6, r6
3655 itt gt
3656 uhaddsubxgt r6, r9, r8
3657 uhsubaddxgt r7, r8, r12
3659 @ CHECK: uhasx r4, r1, r5 @ encoding: [0xa1,0xfa,0x65,0xf4]
3660 @ CHECK: uhsax r5, r6, r6 @ encoding: [0xe6,0xfa,0x66,0xf5]
3661 @ CHECK: itt gt @ encoding: [0xc4,0xbf]
3662 @ CHECK: uhasxgt r6, r9, r8 @ encoding: [0xa9,0xfa,0x68,0xf6]
3663 @ CHECK: uhsaxgt r7, r8, r12 @ encoding: [0xe8,0xfa,0x6c,0xf7]
3664 @ CHECK: uhasx r4, r1, r5 @ encoding: [0xa1,0xfa,0x65,0xf4]
3665 @ CHECK: uhsax r5, r6, r6 @ encoding: [0xe6,0xfa,0x66,0xf5]
3666 @ CHECK: itt gt @ encoding: [0xc4,0xbf]
3667 @ CHECK: uhasxgt r6, r9, r8 @ encoding: [0xa9,0xfa,0x68,0xf6]
3668 @ CHECK: uhsaxgt r7, r8, r12 @ encoding: [0xe8,0xfa,0x6c,0xf7]
3671 @------------------------------------------------------------------------------
3672 @ UHSUB16/UHSUB8
3673 @------------------------------------------------------------------------------
3674 uhsub16 r5, r8, r3
3675 uhsub8 r1, r7, r6
3676 itt lt
3677 uhsub16lt r4, r9, r12
3678 uhsub8lt r3, r1, r5
3680 @ CHECK: uhsub16 r5, r8, r3 @ encoding: [0xd8,0xfa,0x63,0xf5]
3681 @ CHECK: uhsub8 r1, r7, r6 @ encoding: [0xc7,0xfa,0x66,0xf1]
3682 @ CHECK: itt lt @ encoding: [0xbc,0xbf]
3683 @ CHECK: uhsub16lt r4, r9, r12 @ encoding: [0xd9,0xfa,0x6c,0xf4]
3684 @ CHECK: uhsub8lt r3, r1, r5 @ encoding: [0xc1,0xfa,0x65,0xf3]
3687 @------------------------------------------------------------------------------
3688 @ UMAAL
3689 @------------------------------------------------------------------------------
3690 umaal r3, r4, r5, r6
3691 it lt
3692 umaallt r3, r4, r5, r6
3694 @ CHECK: umaal r3, r4, r5, r6 @ encoding: [0xe5,0xfb,0x66,0x34]
3695 @ CHECK: it lt @ encoding: [0xb8,0xbf]
3696 @ CHECK: umaallt r3, r4, r5, r6 @ encoding: [0xe5,0xfb,0x66,0x34]
3699 @------------------------------------------------------------------------------
3700 @ UMLAL
3701 @------------------------------------------------------------------------------
3702 umlal r2, r4, r6, r8
3703 it gt
3704 umlalgt r6, r1, r2, r6
3706 @ CHECK: umlal r2, r4, r6, r8 @ encoding: [0xe6,0xfb,0x08,0x24]
3707 @ CHECK: it gt @ encoding: [0xc8,0xbf]
3708 @ CHECK: umlalgt r6, r1, r2, r6 @ encoding: [0xe2,0xfb,0x06,0x61]
3711 @------------------------------------------------------------------------------
3712 @ UMULL
3713 @------------------------------------------------------------------------------
3714 umull r2, r4, r6, r8
3715 it gt
3716 umullgt r6, r1, r2, r6
3718 @ CHECK: umull r2, r4, r6, r8 @ encoding: [0xa6,0xfb,0x08,0x24]
3719 @ CHECK: it gt @ encoding: [0xc8,0xbf]
3720 @ CHECK: umullgt r6, r1, r2, r6 @ encoding: [0xa2,0xfb,0x06,0x61]
3723 @------------------------------------------------------------------------------
3724 @ UQADD16/UQADD8
3725 @------------------------------------------------------------------------------
3726 uqadd16 r1, r2, r3
3727 uqadd8 r3, r4, r8
3728 ite gt
3729 uqadd16gt r4, r7, r9
3730 uqadd8le r8, r1, r2
3732 @ CHECK: uqadd16 r1, r2, r3 @ encoding: [0x92,0xfa,0x53,0xf1]
3733 @ CHECK: uqadd8 r3, r4, r8 @ encoding: [0x84,0xfa,0x58,0xf3]
3734 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3735 @ CHECK: uqadd16gt r4, r7, r9 @ encoding: [0x97,0xfa,0x59,0xf4]
3736 @ CHECK: uqadd8le r8, r1, r2 @ encoding: [0x81,0xfa,0x52,0xf8]
3739 @------------------------------------------------------------------------------
3740 @ UQASX/UQSAX
3741 @------------------------------------------------------------------------------
3742 uqasx r1, r2, r3
3743 uqsax r3, r4, r8
3744 ite gt
3745 uqasxgt r4, r7, r9
3746 uqsaxle r8, r1, r2
3748 uqaddsubx r1, r2, r3
3749 uqsubaddx r3, r4, r8
3750 ite gt
3751 uqaddsubxgt r4, r7, r9
3752 uqsubaddxle r8, r1, r2
3754 @ CHECK: uqasx r1, r2, r3 @ encoding: [0xa2,0xfa,0x53,0xf1]
3755 @ CHECK: uqsax r3, r4, r8 @ encoding: [0xe4,0xfa,0x58,0xf3]
3756 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3757 @ CHECK: uqasxgt r4, r7, r9 @ encoding: [0xa7,0xfa,0x59,0xf4]
3758 @ CHECK: uqsaxle r8, r1, r2 @ encoding: [0xe1,0xfa,0x52,0xf8]
3760 @ CHECK: uqasx r1, r2, r3 @ encoding: [0xa2,0xfa,0x53,0xf1]
3761 @ CHECK: uqsax r3, r4, r8 @ encoding: [0xe4,0xfa,0x58,0xf3]
3762 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3763 @ CHECK: uqasxgt r4, r7, r9 @ encoding: [0xa7,0xfa,0x59,0xf4]
3764 @ CHECK: uqsaxle r8, r1, r2 @ encoding: [0xe1,0xfa,0x52,0xf8]
3767 @------------------------------------------------------------------------------
3768 @ UQSUB16/UQSUB8
3769 @------------------------------------------------------------------------------
3770 uqsub8 r8, r2, r9
3771 uqsub16 r1, r9, r7
3772 ite gt
3773 uqsub8gt r3, r1, r6
3774 uqsub16le r4, r6, r4
3776 @ CHECK: uqsub8 r8, r2, r9 @ encoding: [0xc2,0xfa,0x59,0xf8]
3777 @ CHECK: uqsub16 r1, r9, r7 @ encoding: [0xd9,0xfa,0x57,0xf1]
3778 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3779 @ CHECK: uqsub8gt r3, r1, r6 @ encoding: [0xc1,0xfa,0x56,0xf3]
3780 @ CHECK: uqsub16le r4, r6, r4 @ encoding: [0xd6,0xfa,0x54,0xf4]
3783 @------------------------------------------------------------------------------
3784 @ UQSUB16/UQSUB8
3785 @------------------------------------------------------------------------------
3786 usad8 r1, r9, r7
3787 usada8 r8, r2, r9, r12
3788 ite gt
3789 usada8gt r3, r1, r6, r9
3790 usad8le r4, r6, r4
3792 @ CHECK: usad8 r1, r9, r7 @ encoding: [0x79,0xfb,0x07,0xf1]
3793 @ CHECK: usada8 r8, r2, r9, r12 @ encoding: [0x72,0xfb,0x09,0xc8]
3794 @ CHECK: ite gt @ encoding: [0xcc,0xbf]
3795 @ CHECK: usada8gt r3, r1, r6, r9 @ encoding: [0x71,0xfb,0x06,0x93]
3796 @ CHECK: usad8le r4, r6, r4 @ encoding: [0x76,0xfb,0x04,0xf4]
3799 @------------------------------------------------------------------------------
3800 @ USAT
3801 @------------------------------------------------------------------------------
3802 usat r8, #1, r10
3803 usat r8, #4, r10, lsl #0
3804 usat r8, #5, r10, lsl #31
3805 usat r8, #16, r10, asr #1
3807 @ CHECK: usat r8, #1, r10 @ encoding: [0x8a,0xf3,0x01,0x08]
3808 @ CHECK: usat r8, #4, r10 @ encoding: [0x8a,0xf3,0x04,0x08]
3809 @ CHECK: usat r8, #5, r10, lsl #31 @ encoding: [0x8a,0xf3,0xc5,0x78]
3810 @ CHECK: usat r8, #16, r10, asr #1 @ encoding: [0xaa,0xf3,0x50,0x08]
3813 @------------------------------------------------------------------------------
3814 @ USAT16
3815 @------------------------------------------------------------------------------
3816 usat16 r2, #2, r7
3817 usat16 r3, #15, r5
3819 @ CHECK: usat16 r2, #2, r7 @ encoding: [0xa7,0xf3,0x02,0x02]
3820 @ CHECK: usat16 r3, #15, r5 @ encoding: [0xa5,0xf3,0x0f,0x03]
3823 @------------------------------------------------------------------------------
3824 @ USAX
3825 @------------------------------------------------------------------------------
3826 usax r2, r3, r4
3827 it ne
3828 usaxne r6, r1, r9
3829 usubaddx r2, r3, r4
3830 it ne
3831 usubaddxne r6, r1, r9
3833 @ CHECK: usax r2, r3, r4 @ encoding: [0xe3,0xfa,0x44,0xf2]
3834 @ CHECK: it ne @ encoding: [0x18,0xbf]
3835 @ CHECK: usaxne r6, r1, r9 @ encoding: [0xe1,0xfa,0x49,0xf6]
3836 @ CHECK: usax r2, r3, r4 @ encoding: [0xe3,0xfa,0x44,0xf2]
3837 @ CHECK: it ne @ encoding: [0x18,0xbf]
3838 @ CHECK: usaxne r6, r1, r9 @ encoding: [0xe1,0xfa,0x49,0xf6]
3841 @------------------------------------------------------------------------------
3842 @ USUB16/USUB8
3843 @------------------------------------------------------------------------------
3844 usub16 r4, r2, r7
3845 usub8 r1, r8, r5
3846 ite hi
3847 usub16hi r1, r1, r3
3848 usub8ls r9, r2, r3
3850 @ CHECK: usub16 r4, r2, r7 @ encoding: [0xd2,0xfa,0x47,0xf4]
3851 @ CHECK: usub8 r1, r8, r5 @ encoding: [0xc8,0xfa,0x45,0xf1]
3852 @ CHECK: ite hi @ encoding: [0x8c,0xbf]
3853 @ CHECK: usub16hi r1, r1, r3 @ encoding: [0xd1,0xfa,0x43,0xf1]
3854 @ CHECK: usub8ls r9, r2, r3 @ encoding: [0xc2,0xfa,0x43,0xf9]
3857 @------------------------------------------------------------------------------
3858 @ UXTAB
3859 @------------------------------------------------------------------------------
3860 uxtab r2, r3, r4
3861 uxtab r4, r5, r6, ror #0
3862 it lt
3863 uxtablt r6, r2, r9, ror #8
3864 uxtab r5, r1, r4, ror #16
3865 uxtab r7, r8, r3, ror #24
3867 @ CHECK: uxtab r2, r3, r4 @ encoding: [0x53,0xfa,0x84,0xf2]
3868 @ CHECK: uxtab r4, r5, r6 @ encoding: [0x55,0xfa,0x86,0xf4]
3869 @ CHECK: it lt @ encoding: [0xb8,0xbf]
3870 @ CHECK: uxtablt r6, r2, r9, ror #8 @ encoding: [0x52,0xfa,0x99,0xf6]
3871 @ CHECK: uxtab r5, r1, r4, ror #16 @ encoding: [0x51,0xfa,0xa4,0xf5]
3872 @ CHECK: uxtab r7, r8, r3, ror #24 @ encoding: [0x58,0xfa,0xb3,0xf7]
3875 @------------------------------------------------------------------------------
3876 @ UXTAB16
3877 @------------------------------------------------------------------------------
3878 it ge
3879 uxtab16ge r0, r1, r4
3880 uxtab16 r6, r2, r7, ror #0
3881 uxtab16 r3, r5, r8, ror #8
3882 uxtab16 r3, r2, r1, ror #16
3883 it eq
3884 uxtab16eq r1, r2, r3, ror #24
3886 @ CHECK: it ge @ encoding: [0xa8,0xbf]
3887 @ CHECK: uxtab16ge r0, r1, r4 @ encoding: [0x31,0xfa,0x84,0xf0]
3888 @ CHECK: uxtab16 r6, r2, r7 @ encoding: [0x32,0xfa,0x87,0xf6]
3889 @ CHECK: uxtab16 r3, r5, r8, ror #8 @ encoding: [0x35,0xfa,0x98,0xf3]
3890 @ CHECK: uxtab16 r3, r2, r1, ror #16 @ encoding: [0x32,0xfa,0xa1,0xf3]
3891 @ CHECK: it eq @ encoding: [0x08,0xbf]
3892 @ CHECK: uxtab16eq r1, r2, r3, ror #24 @ encoding: [0x32,0xfa,0xb3,0xf1]
3895 @------------------------------------------------------------------------------
3896 @ UXTAH
3897 @------------------------------------------------------------------------------
3898 uxtah r1, r3, r9
3899 it hi
3900 uxtahhi r6, r1, r6, ror #0
3901 uxtah r3, r8, r3, ror #8
3902 it lo
3903 uxtahlo r2, r2, r4, ror #16
3904 uxtah r9, r3, r3, ror #24
3906 @ CHECK: uxtah r1, r3, r9 @ encoding: [0x13,0xfa,0x89,0xf1]
3907 @ CHECK: it hi @ encoding: [0x88,0xbf]
3908 @ CHECK: uxtahhi r6, r1, r6 @ encoding: [0x11,0xfa,0x86,0xf6]
3909 @ CHECK: uxtah r3, r8, r3, ror #8 @ encoding: [0x18,0xfa,0x93,0xf3]
3910 @ CHECK: it lo @ encoding: [0x38,0xbf]
3911 @ CHECK: uxtahlo r2, r2, r4, ror #16 @ encoding: [0x12,0xfa,0xa4,0xf2]
3912 @ CHECK: uxtah r9, r3, r3, ror #24 @ encoding: [0x13,0xfa,0xb3,0xf9]
3915 @------------------------------------------------------------------------------
3916 @ UXTB
3917 @------------------------------------------------------------------------------
3918 it ge
3919 uxtbge r2, r4
3920 uxtb r5, r6, ror #0
3921 uxtb r6, r9, ror #8
3922 it cc
3923 uxtbcc r5, r1, ror #16
3924 uxtb r8, r3, ror #24
3925 uxtb.w r7, r8
3927 @ CHECK: it ge @ encoding: [0xa8,0xbf]
3928 @ CHECK: uxtbge r2, r4 @ encoding: [0xe2,0xb2]
3929 @ CHECK: uxtb r5, r6 @ encoding: [0xf5,0xb2]
3930 @ CHECK: uxtb.w r6, r9, ror #8 @ encoding: [0x5f,0xfa,0x99,0xf6]
3931 @ CHECK: it lo @ encoding: [0x38,0xbf]
3932 @ CHECK: uxtblo.w r5, r1, ror #16 @ encoding: [0x5f,0xfa,0xa1,0xf5]
3933 @ CHECK: uxtb.w r8, r3, ror #24 @ encoding: [0x5f,0xfa,0xb3,0xf8]
3934 @ CHECK: uxtb.w r7, r8 @ encoding: [0x5f,0xfa,0x88,0xf7]
3937 @------------------------------------------------------------------------------
3938 @ UXTB16
3939 @------------------------------------------------------------------------------
3940 uxtb16 r1, r4
3941 uxtb16 r6, r7, ror #0
3942 it cs
3943 uxtb16cs r3, r5, ror #8
3944 uxtb16 r3, r1, ror #16
3945 it ge
3946 uxtb16ge r2, r3, ror #24
3948 @ CHECK: uxtb16 r1, r4 @ encoding: [0x3f,0xfa,0x84,0xf1]
3949 @ CHECK: uxtb16 r6, r7 @ encoding: [0x3f,0xfa,0x87,0xf6]
3950 @ CHECK: it hs @ encoding: [0x28,0xbf]
3951 @ CHECK: uxtb16hs r3, r5, ror #8 @ encoding: [0x3f,0xfa,0x95,0xf3]
3952 @ CHECK: uxtb16 r3, r1, ror #16 @ encoding: [0x3f,0xfa,0xa1,0xf3]
3953 @ CHECK: it ge @ encoding: [0xa8,0xbf]
3954 @ CHECK: uxtb16ge r2, r3, ror #24 @ encoding: [0x3f,0xfa,0xb3,0xf2]
3957 @------------------------------------------------------------------------------
3958 @ UXTH
3959 @------------------------------------------------------------------------------
3960 it ne
3961 uxthne r3, r9
3962 uxth r1, r6, ror #0
3963 uxth r3, r8, ror #8
3964 it le
3965 uxthle r2, r2, ror #16
3966 uxth r9, r3, ror #24
3967 uxth.w r7, r8
3969 @ CHECK: it ne @ encoding: [0x18,0xbf]
3970 @ CHECK: uxthne.w r3, r9 @ encoding: [0x1f,0xfa,0x89,0xf3]
3971 @ CHECK: uxth r1, r6 @ encoding: [0xb1,0xb2]
3972 @ CHECK: uxth.w r3, r8, ror #8 @ encoding: [0x1f,0xfa,0x98,0xf3]
3973 @ CHECK: it le @ encoding: [0xd8,0xbf]
3974 @ CHECK: uxthle.w r2, r2, ror #16 @ encoding: [0x1f,0xfa,0xa2,0xf2]
3975 @ CHECK: uxth.w r9, r3, ror #24 @ encoding: [0x1f,0xfa,0xb3,0xf9]
3976 @ CHECK: uxth.w r7, r8 @ encoding: [0x1f,0xfa,0x88,0xf7]
3978 @------------------------------------------------------------------------------
3979 @ WFE/WFI/YIELD/HINT
3980 @------------------------------------------------------------------------------
3983 yield
3984 itet lt
3985 wfelt
3986 wfige
3987 yieldlt
3988 hint.w #4
3989 hint.w #3
3990 hint.w #2
3991 hint.w #1
3992 hint.w #0
3993 hint #4
3994 hint #3
3995 hint #2
3996 hint #1
3997 hint #0
3999 itet lt
4000 hintlt #15
4001 hintge #16
4002 hintlt #239
4004 @ CHECK: wfe @ encoding: [0x20,0xbf]
4005 @ CHECK: wfi @ encoding: [0x30,0xbf]
4006 @ CHECK: yield @ encoding: [0x10,0xbf]
4007 @ CHECK: itet lt @ encoding: [0xb6,0xbf]
4008 @ CHECK: wfelt @ encoding: [0x20,0xbf]
4009 @ CHECK: wfige @ encoding: [0x30,0xbf]
4010 @ CHECK: yieldlt @ encoding: [0x10,0xbf]
4011 @ CHECK: sev.w @ encoding: [0xaf,0xf3,0x04,0x80]
4012 @ CHECK: wfi.w @ encoding: [0xaf,0xf3,0x03,0x80]
4013 @ CHECK: wfe.w @ encoding: [0xaf,0xf3,0x02,0x80]
4014 @ CHECK: yield.w @ encoding: [0xaf,0xf3,0x01,0x80]
4015 @ CHECK: nop.w @ encoding: [0xaf,0xf3,0x00,0x80]
4016 @ CHECK: sev @ encoding: [0x40,0xbf]
4017 @ CHECK: wfi @ encoding: [0x30,0xbf]
4018 @ CHECK: wfe @ encoding: [0x20,0xbf]
4019 @ CHECK: yield @ encoding: [0x10,0xbf]
4020 @ CHECK: nop @ encoding: [0x00,0xbf]
4022 @ CHECK: itet lt @ encoding: [0xb6,0xbf]
4023 @ CHECK: hintlt #15 @ encoding: [0xf0,0xbf]
4024 @ CHECK: hintge.w #16 @ encoding: [0xaf,0xf3,0x10,0x80]
4025 @ CHECK: hintlt.w #239 @ encoding: [0xaf,0xf3,0xef,0x80]
4027 @------------------------------------------------------------------------------
4028 @ Unallocated wide/narrow hints
4029 @------------------------------------------------------------------------------
4030 hint #7
4031 hint.w #7
4032 @ CHECK: hint #7 @ encoding: [0x70,0xbf]
4033 @ CHECK: hint.w #7 @ encoding: [0xaf,0xf3,0x07,0x80]
4035 @------------------------------------------------------------------------------
4036 @ Alternate syntax for LDR*(literal) encodings
4037 @------------------------------------------------------------------------------
4038 ldrb r11, [pc, #22]
4039 ldrh r11, [pc, #22]
4040 ldrsb r11, [pc, #22]
4041 ldrsh r11, [pc, #22]
4042 ldr.w r11, [pc, #22]
4043 ldrb.w r11, [pc, #22]
4044 ldrh.w r11, [pc, #22]
4045 ldrsb.w r11, [pc, #22]
4046 ldrsh.w r11, [pc, #22]
4048 @ CHECK: ldrb.w r11, [pc, #22] @ encoding: [0x9f,0xf8,0x16,0xb0]
4049 @ CHECK: ldrh.w r11, [pc, #22] @ encoding: [0xbf,0xf8,0x16,0xb0]
4050 @ CHECK: ldrsb.w r11, [pc, #22] @ encoding: [0x9f,0xf9,0x16,0xb0]
4051 @ CHECK: ldrsh.w r11, [pc, #22] @ encoding: [0xbf,0xf9,0x16,0xb0]
4052 @ CHECK: ldr.w r11, [pc, #22] @ encoding: [0xdf,0xf8,0x16,0xb0]
4053 @ CHECK: ldrb.w r11, [pc, #22] @ encoding: [0x9f,0xf8,0x16,0xb0]
4054 @ CHECK: ldrh.w r11, [pc, #22] @ encoding: [0xbf,0xf8,0x16,0xb0]
4055 @ CHECK: ldrsb.w r11, [pc, #22] @ encoding: [0x9f,0xf9,0x16,0xb0]
4056 @ CHECK: ldrsh.w r11, [pc, #22] @ encoding: [0xbf,0xf9,0x16,0xb0]
4058 ldr r11, [pc, #-22]
4059 ldrb r11, [pc, #-22]
4060 ldrh r11, [pc, #-22]
4061 ldrsb r11, [pc, #-22]
4062 ldrsh r11, [pc, #-22]
4063 ldr.w r11, [pc, #-22]
4064 ldrb.w r11, [pc, #-22]
4065 ldrh.w r11, [pc, #-22]
4066 ldrsb.w r11, [pc, #-22]
4067 ldrsh.w r11, [pc, #-22]
4069 @ CHECK: ldr.w r11, [pc, #-22] @ encoding: [0x5f,0xf8,0x16,0xb0]
4070 @ CHECK: ldrb.w r11, [pc, #-22] @ encoding: [0x1f,0xf8,0x16,0xb0]
4071 @ CHECK: ldrh.w r11, [pc, #-22] @ encoding: [0x3f,0xf8,0x16,0xb0]
4072 @ CHECK: ldrsb.w r11, [pc, #-22] @ encoding: [0x1f,0xf9,0x16,0xb0]
4073 @ CHECK: ldrsh.w r11, [pc, #-22] @ encoding: [0x3f,0xf9,0x16,0xb0]
4074 @ CHECK: ldr.w r11, [pc, #-22] @ encoding: [0x5f,0xf8,0x16,0xb0]
4075 @ CHECK: ldrb.w r11, [pc, #-22] @ encoding: [0x1f,0xf8,0x16,0xb0]
4076 @ CHECK: ldrh.w r11, [pc, #-22] @ encoding: [0x3f,0xf8,0x16,0xb0]
4077 @ CHECK: ldrsb.w r11, [pc, #-22] @ encoding: [0x1f,0xf9,0x16,0xb0]
4078 @ CHECK: ldrsh.w r11, [pc, #-22] @ encoding: [0x3f,0xf9,0x16,0xb0]
4080 @ rdar://12596361
4081 ldr r1, [pc, #12]
4082 @ CHECK: ldr r1, [pc, #12] @ encoding: [0x03,0x49]
4084 @ rdar://14214063
4085 subs pc, lr, #4
4086 @ CHECK: subs pc, lr, #4 @ encoding: [0xde,0xf3,0x04,0x8f]