1 @ RUN: llvm-mc -triple=armv7-apple-darwin -show-encoding < %s | FileCheck %s
5 @ Check that the assembler can handle the documented syntax from the ARM ARM.
6 @ For complex constructs like shifter operands, check more thoroughly for them
7 @ once then spot check that following instructions accept the form generally.
8 @ This gives us good coverage while keeping the overall size of the test
14 @------------------------------------------------------------------------------
16 @------------------------------------------------------------------------------
23 adc r1, r2, #0xf000000
24 adc r1, r2, #0xf0000000
25 adc r1, r2, #0xf000000f
30 @ CHECK: adc r1, r2, #15 @ encoding: [0x0f,0x10,0xa2,0xe2]
31 @ CHECK: adc r1, r2, #240 @ encoding: [0xf0,0x10,0xa2,0xe2]
32 @ CHECK: adc r1, r2, #3840 @ encoding: [0x0f,0x1c,0xa2,0xe2]
33 @ CHECK: adc r1, r2, #61440 @ encoding: [0x0f,0x1a,0xa2,0xe2]
34 @ CHECK: adc r1, r2, #983040 @ encoding: [0x0f,0x18,0xa2,0xe2]
35 @ CHECK: adc r1, r2, #15728640 @ encoding: [0x0f,0x16,0xa2,0xe2]
36 @ CHECK: adc r1, r2, #251658240 @ encoding: [0x0f,0x14,0xa2,0xe2]
37 @ CHECK: adc r1, r2, #4026531840 @ encoding: [0x0f,0x12,0xa2,0xe2]
38 @ CHECK: adc r1, r2, #4026531855 @ encoding: [0xff,0x12,0xa2,0xe2]
40 @ CHECK: adcs r1, r2, #3840 @ encoding: [0x0f,0x1c,0xb2,0xe2]
41 @ CHECK: adcseq r1, r2, #3840 @ encoding: [0x0f,0x1c,0xb2,0x02]
42 @ CHECK: adceq r1, r2, #3840 @ encoding: [0x0f,0x1c,0xa2,0x02]
44 @------------------------------------------------------------------------------
46 @ ADC (shifted register)
47 @------------------------------------------------------------------------------
50 adc r4, r5, r6, lsl #1
51 adc r4, r5, r6, lsl #31
52 adc r4, r5, r6, lsr #1
53 adc r4, r5, r6, lsr #31
54 adc r4, r5, r6, lsr #32
55 adc r4, r5, r6, asr #1
56 adc r4, r5, r6, asr #31
57 adc r4, r5, r6, asr #32
58 adc r4, r5, r6, ror #1
59 adc r4, r5, r6, ror #31
62 adc r6, r7, r8, lsl r9
63 adc r6, r7, r8, lsr r9
64 adc r6, r7, r8, asr r9
65 adc r6, r7, r8, ror r9
68 @ Destination register is optional
87 @ CHECK: adc r4, r5, r6 @ encoding: [0x06,0x40,0xa5,0xe0]
89 @ CHECK: adc r4, r5, r6, lsl #1 @ encoding: [0x86,0x40,0xa5,0xe0]
90 @ CHECK: adc r4, r5, r6, lsl #31 @ encoding: [0x86,0x4f,0xa5,0xe0]
91 @ CHECK: adc r4, r5, r6, lsr #1 @ encoding: [0xa6,0x40,0xa5,0xe0]
92 @ CHECK: adc r4, r5, r6, lsr #31 @ encoding: [0xa6,0x4f,0xa5,0xe0]
93 @ CHECK: adc r4, r5, r6, lsr #32 @ encoding: [0x26,0x40,0xa5,0xe0]
94 @ CHECK: adc r4, r5, r6, asr #1 @ encoding: [0xc6,0x40,0xa5,0xe0]
95 @ CHECK: adc r4, r5, r6, asr #31 @ encoding: [0xc6,0x4f,0xa5,0xe0]
96 @ CHECK: adc r4, r5, r6, asr #32 @ encoding: [0x46,0x40,0xa5,0xe0]
97 @ CHECK: adc r4, r5, r6, ror #1 @ encoding: [0xe6,0x40,0xa5,0xe0]
98 @ CHECK: adc r4, r5, r6, ror #31 @ encoding: [0xe6,0x4f,0xa5,0xe0]
100 @ CHECK: adc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xa7,0xe0]
101 @ CHECK: adc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xa7,0xe0]
102 @ CHECK: adc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xa7,0xe0]
103 @ CHECK: adc r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xa7,0xe0]
104 @ CHECK: adc r4, r5, r6, rrx @ encoding: [0x66,0x40,0xa5,0xe0]
106 @ CHECK: adc r5, r5, r6 @ encoding: [0x06,0x50,0xa5,0xe0]
107 @ CHECK: adc r4, r4, r5, lsl #1 @ encoding: [0x85,0x40,0xa4,0xe0]
108 @ CHECK: adc r4, r4, r5, lsl #31 @ encoding: [0x85,0x4f,0xa4,0xe0]
109 @ CHECK: adc r4, r4, r5, lsr #1 @ encoding: [0xa5,0x40,0xa4,0xe0]
110 @ CHECK: adc r4, r4, r5, lsr #31 @ encoding: [0xa5,0x4f,0xa4,0xe0]
111 @ CHECK: adc r4, r4, r5, lsr #32 @ encoding: [0x25,0x40,0xa4,0xe0]
112 @ CHECK: adc r4, r4, r5, asr #1 @ encoding: [0xc5,0x40,0xa4,0xe0]
113 @ CHECK: adc r4, r4, r5, asr #31 @ encoding: [0xc5,0x4f,0xa4,0xe0]
114 @ CHECK: adc r4, r4, r5, asr #32 @ encoding: [0x45,0x40,0xa4,0xe0]
115 @ CHECK: adc r4, r4, r5, ror #1 @ encoding: [0xe5,0x40,0xa4,0xe0]
116 @ CHECK: adc r4, r4, r5, ror #31 @ encoding: [0xe5,0x4f,0xa4,0xe0]
117 @ CHECK: adc r4, r4, r5, rrx @ encoding: [0x65,0x40,0xa4,0xe0]
118 @ CHECK: adc r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xa6,0xe0]
119 @ CHECK: adc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xa6,0xe0]
120 @ CHECK: adc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xa6,0xe0]
121 @ CHECK: adc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xa6,0xe0]
122 @ CHECK: adc r4, r4, r5, rrx @ encoding: [0x65,0x40,0xa4,0xe0]
125 @------------------------------------------------------------------------------
127 @------------------------------------------------------------------------------
129 @------------------------------------------------------------------------------
131 @------------------------------------------------------------------------------
134 add r4, r5, r6, lsl #5
135 add r4, r5, r6, lsr #5
136 add r4, r5, r6, lsr #5
137 add r4, r5, r6, asr #5
138 add r4, r5, r6, ror #5
139 add r6, r7, r8, lsl r9
140 add r6, r7, r8, lsr r9
141 add r6, r7, r8, asr r9
142 add r6, r7, r8, ror r9
145 @ destination register is optional
159 @ CHECK: add r4, r5, #61440 @ encoding: [0x0f,0x4a,0x85,0xe2]
160 @ CHECK: add r4, r5, r6 @ encoding: [0x06,0x40,0x85,0xe0]
161 @ CHECK: add r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x85,0xe0]
162 @ CHECK: add r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe0]
163 @ CHECK: add r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe0]
164 @ CHECK: add r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x85,0xe0]
165 @ CHECK: add r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x85,0xe0]
166 @ CHECK: add r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x87,0xe0]
167 @ CHECK: add r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x87,0xe0]
168 @ CHECK: add r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x87,0xe0]
169 @ CHECK: add r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0xe0]
170 @ CHECK: add r4, r5, r6, rrx @ encoding: [0x66,0x40,0x85,0xe0]
173 @ CHECK: add r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0xe2]
174 @ CHECK: add r4, r4, r5 @ encoding: [0x05,0x40,0x84,0xe0]
175 @ CHECK: add r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x84,0xe0]
176 @ CHECK: add r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe0]
177 @ CHECK: add r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe0]
178 @ CHECK: add r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x84,0xe0]
179 @ CHECK: add r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x84,0xe0]
180 @ CHECK: add r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x86,0xe0]
181 @ CHECK: add r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x86,0xe0]
182 @ CHECK: add r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0xe0]
183 @ CHECK: add r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x86,0xe0]
184 @ CHECK: add r4, r4, r5, rrx @ encoding: [0x65,0x40,0x84,0xe0]
187 @------------------------------------------------------------------------------
189 @------------------------------------------------------------------------------
192 and r10, r1, r6, lsl #10
193 and r10, r1, r6, lsr #10
194 and r10, r1, r6, lsr #10
195 and r10, r1, r6, asr #10
196 and r10, r1, r6, ror #10
197 and r6, r7, r8, lsl r2
198 and r6, r7, r8, lsr r2
199 and r6, r7, r8, asr r2
200 and r6, r7, r8, ror r2
203 @ destination register is optional
217 @ CHECK: and r10, r1, #15 @ encoding: [0x0f,0xa0,0x01,0xe2]
218 @ CHECK: and r10, r1, r6 @ encoding: [0x06,0xa0,0x01,0xe0]
219 @ CHECK: and r10, r1, r6, lsl #10 @ encoding: [0x06,0xa5,0x01,0xe0]
220 @ CHECK: and r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0x01,0xe0]
221 @ CHECK: and r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0x01,0xe0]
222 @ CHECK: and r10, r1, r6, asr #10 @ encoding: [0x46,0xa5,0x01,0xe0]
223 @ CHECK: and r10, r1, r6, ror #10 @ encoding: [0x66,0xa5,0x01,0xe0]
224 @ CHECK: and r6, r7, r8, lsl r2 @ encoding: [0x18,0x62,0x07,0xe0]
225 @ CHECK: and r6, r7, r8, lsr r2 @ encoding: [0x38,0x62,0x07,0xe0]
226 @ CHECK: and r6, r7, r8, asr r2 @ encoding: [0x58,0x62,0x07,0xe0]
227 @ CHECK: and r6, r7, r8, ror r2 @ encoding: [0x78,0x62,0x07,0xe0]
228 @ CHECK: and r10, r1, r6, rrx @ encoding: [0x66,0xa0,0x01,0xe0]
230 @ CHECK: and r1, r1, #15 @ encoding: [0x0f,0x10,0x01,0xe2]
231 @ CHECK: and r10, r10, r1 @ encoding: [0x01,0xa0,0x0a,0xe0]
232 @ CHECK: and r10, r10, r1, lsl #10 @ encoding: [0x01,0xa5,0x0a,0xe0]
233 @ CHECK: and r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0x0a,0xe0]
234 @ CHECK: and r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0x0a,0xe0]
235 @ CHECK: and r10, r10, r1, asr #10 @ encoding: [0x41,0xa5,0x0a,0xe0]
236 @ CHECK: and r10, r10, r1, ror #10 @ encoding: [0x61,0xa5,0x0a,0xe0]
237 @ CHECK: and r6, r6, r7, lsl r2 @ encoding: [0x17,0x62,0x06,0xe0]
238 @ CHECK: and r6, r6, r7, lsr r2 @ encoding: [0x37,0x62,0x06,0xe0]
239 @ CHECK: and r6, r6, r7, asr r2 @ encoding: [0x57,0x62,0x06,0xe0]
240 @ CHECK: and r6, r6, r7, ror r2 @ encoding: [0x77,0x62,0x06,0xe0]
241 @ CHECK: and r10, r10, r1, rrx @ encoding: [0x61,0xa0,0x0a,0xe0]
243 @------------------------------------------------------------------------------
245 @------------------------------------------------------------------------------
246 @------------------------------------------------------------------------------
248 @------------------------------------------------------------------------------
249 @------------------------------------------------------------------------------
251 @------------------------------------------------------------------------------
252 @------------------------------------------------------------------------------
254 @------------------------------------------------------------------------------
256 @------------------------------------------------------------------------------
258 @------------------------------------------------------------------------------
261 bic r10, r1, r6, lsl #10
262 bic r10, r1, r6, lsr #10
263 bic r10, r1, r6, lsr #10
264 bic r10, r1, r6, asr #10
265 bic r10, r1, r6, ror #10
266 bic r6, r7, r8, lsl r2
267 bic r6, r7, r8, lsr r2
268 bic r6, r7, r8, asr r2
269 bic r6, r7, r8, ror r2
272 @ destination register is optional
286 @ CHECK: bic r10, r1, #15 @ encoding: [0x0f,0xa0,0xc1,0xe3]
287 @ CHECK: bic r10, r1, r6 @ encoding: [0x06,0xa0,0xc1,0xe1]
288 @ CHECK: bic r10, r1, r6, lsl #10 @ encoding: [0x06,0xa5,0xc1,0xe1]
289 @ CHECK: bic r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0xc1,0xe1]
290 @ CHECK: bic r10, r1, r6, lsr #10 @ encoding: [0x26,0xa5,0xc1,0xe1]
291 @ CHECK: bic r10, r1, r6, asr #10 @ encoding: [0x46,0xa5,0xc1,0xe1]
292 @ CHECK: bic r10, r1, r6, ror #10 @ encoding: [0x66,0xa5,0xc1,0xe1]
293 @ CHECK: bic r6, r7, r8, lsl r2 @ encoding: [0x18,0x62,0xc7,0xe1]
294 @ CHECK: bic r6, r7, r8, lsr r2 @ encoding: [0x38,0x62,0xc7,0xe1]
295 @ CHECK: bic r6, r7, r8, asr r2 @ encoding: [0x58,0x62,0xc7,0xe1]
296 @ CHECK: bic r6, r7, r8, ror r2 @ encoding: [0x78,0x62,0xc7,0xe1]
297 @ CHECK: bic r10, r1, r6, rrx @ encoding: [0x66,0xa0,0xc1,0xe1]
300 @ CHECK: bic r1, r1, #15 @ encoding: [0x0f,0x10,0xc1,0xe3]
301 @ CHECK: bic r10, r10, r1 @ encoding: [0x01,0xa0,0xca,0xe1]
302 @ CHECK: bic r10, r10, r1, lsl #10 @ encoding: [0x01,0xa5,0xca,0xe1]
303 @ CHECK: bic r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0xca,0xe1]
304 @ CHECK: bic r10, r10, r1, lsr #10 @ encoding: [0x21,0xa5,0xca,0xe1]
305 @ CHECK: bic r10, r10, r1, asr #10 @ encoding: [0x41,0xa5,0xca,0xe1]
306 @ CHECK: bic r10, r10, r1, ror #10 @ encoding: [0x61,0xa5,0xca,0xe1]
307 @ CHECK: bic r6, r6, r7, lsl r2 @ encoding: [0x17,0x62,0xc6,0xe1]
308 @ CHECK: bic r6, r6, r7, lsr r2 @ encoding: [0x37,0x62,0xc6,0xe1]
309 @ CHECK: bic r6, r6, r7, asr r2 @ encoding: [0x57,0x62,0xc6,0xe1]
310 @ CHECK: bic r6, r6, r7, ror r2 @ encoding: [0x77,0x62,0xc6,0xe1]
311 @ CHECK: bic r10, r10, r1, rrx @ encoding: [0x61,0xa0,0xca,0xe1]
313 @------------------------------------------------------------------------------
315 @------------------------------------------------------------------------------
319 @ CHECK: bkpt #10 @ encoding: [0x7a,0x00,0x20,0xe1]
320 @ CHECK: bkpt #65535 @ encoding: [0x7f,0xff,0x2f,0xe1]
322 @------------------------------------------------------------------------------
324 @------------------------------------------------------------------------------
329 @ CHECK: bl _bar @ encoding: [A,A,A,0xeb]
330 @ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch
332 @------------------------------------------------------------------------------
334 @------------------------------------------------------------------------------
338 @ CHECK: blx r2 @ encoding: [0x32,0xff,0x2f,0xe1]
339 @ CHECK: blxne r2 @ encoding: [0x32,0xff,0x2f,0x11]
341 @------------------------------------------------------------------------------
343 @------------------------------------------------------------------------------
348 @ CHECK: bx r2 @ encoding: [0x12,0xff,0x2f,0xe1]
349 @ CHECK: bxne r2 @ encoding: [0x12,0xff,0x2f,0x11]
351 @------------------------------------------------------------------------------
353 @------------------------------------------------------------------------------
358 @ CHECK: bxj r2 @ encoding: [0x22,0xff,0x2f,0xe1]
359 @ CHECK: bxjne r2 @ encoding: [0x22,0xff,0x2f,0x11]
361 @------------------------------------------------------------------------------
363 @------------------------------------------------------------------------------
366 @------------------------------------------------------------------------------
368 @------------------------------------------------------------------------------
369 cdp p7, #1, c1, c1, c1, #4
370 cdp2 p7, #1, c1, c1, c1, #4
372 @ CHECK: cdp p7, #1, c1, c1, c1, #4 @ encoding: [0x81,0x17,0x11,0xee]
373 @ CHECK: cdp2 p7, #1, c1, c1, c1, #4 @ encoding: [0x81,0x17,0x11,0xfe]
376 @------------------------------------------------------------------------------
378 @------------------------------------------------------------------------------
381 @ CHECK: clrex @ encoding: [0x1f,0xf0,0x7f,0xf5]
384 @------------------------------------------------------------------------------
386 @------------------------------------------------------------------------------
390 @ CHECK: clz r1, r2 @ encoding: [0x12,0x1f,0x6f,0xe1]
391 @ CHECK: clzeq r1, r2 @ encoding: [0x12,0x1f,0x6f,0x01]
393 @------------------------------------------------------------------------------
395 @------------------------------------------------------------------------------
409 @ CHECK: cmn r1, #15 @ encoding: [0x0f,0x00,0x71,0xe3]
410 @ CHECK: cmn r1, r6 @ encoding: [0x06,0x00,0x71,0xe1]
411 @ CHECK: cmn r1, r6, lsl #10 @ encoding: [0x06,0x05,0x71,0xe1]
412 @ CHECK: cmn r1, r6, lsr #10 @ encoding: [0x26,0x05,0x71,0xe1]
413 @ CHECK: cmn sp, r6, lsr #10 @ encoding: [0x26,0x05,0x7d,0xe1]
414 @ CHECK: cmn r1, r6, asr #10 @ encoding: [0x46,0x05,0x71,0xe1]
415 @ CHECK: cmn r1, r6, ror #10 @ encoding: [0x66,0x05,0x71,0xe1]
416 @ CHECK: cmn r7, r8, lsl r2 @ encoding: [0x18,0x02,0x77,0xe1]
417 @ CHECK: cmn sp, r8, lsr r2 @ encoding: [0x38,0x02,0x7d,0xe1]
418 @ CHECK: cmn r7, r8, asr r2 @ encoding: [0x58,0x02,0x77,0xe1]
419 @ CHECK: cmn r7, r8, ror r2 @ encoding: [0x78,0x02,0x77,0xe1]
420 @ CHECK: cmn r1, r6, rrx @ encoding: [0x66,0x00,0x71,0xe1]
422 @------------------------------------------------------------------------------
424 @------------------------------------------------------------------------------
438 @ CHECK: cmp r1, #15 @ encoding: [0x0f,0x00,0x51,0xe3]
439 @ CHECK: cmp r1, r6 @ encoding: [0x06,0x00,0x51,0xe1]
440 @ CHECK: cmp r1, r6, lsl #10 @ encoding: [0x06,0x05,0x51,0xe1]
441 @ CHECK: cmp r1, r6, lsr #10 @ encoding: [0x26,0x05,0x51,0xe1]
442 @ CHECK: cmp sp, r6, lsr #10 @ encoding: [0x26,0x05,0x5d,0xe1]
443 @ CHECK: cmp r1, r6, asr #10 @ encoding: [0x46,0x05,0x51,0xe1]
444 @ CHECK: cmp r1, r6, ror #10 @ encoding: [0x66,0x05,0x51,0xe1]
445 @ CHECK: cmp r7, r8, lsl r2 @ encoding: [0x18,0x02,0x57,0xe1]
446 @ CHECK: cmp sp, r8, lsr r2 @ encoding: [0x38,0x02,0x5d,0xe1]
447 @ CHECK: cmp r7, r8, asr r2 @ encoding: [0x58,0x02,0x57,0xe1]
448 @ CHECK: cmp r7, r8, ror r2 @ encoding: [0x78,0x02,0x57,0xe1]
449 @ CHECK: cmp r1, r6, rrx @ encoding: [0x66,0x00,0x51,0xe1]
451 @------------------------------------------------------------------------------
453 @------------------------------------------------------------------------------
458 @ CHECK: dbg #0 @ encoding: [0xf0,0xf0,0x20,0xe3]
459 @ CHECK: dbg #5 @ encoding: [0xf5,0xf0,0x20,0xe3]
460 @ CHECK: dbg #15 @ encoding: [0xff,0xf0,0x20,0xe3]
463 @------------------------------------------------------------------------------
465 @------------------------------------------------------------------------------
480 @ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5]
481 @ CHECK: dmb st @ encoding: [0x5e,0xf0,0x7f,0xf5]
482 @ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5]
483 @ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5]
484 @ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5]
485 @ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5]
486 @ CHECK: dmb nsh @ encoding: [0x57,0xf0,0x7f,0xf5]
487 @ CHECK: dmb nsh @ encoding: [0x57,0xf0,0x7f,0xf5]
488 @ CHECK: dmb nshst @ encoding: [0x56,0xf0,0x7f,0xf5]
489 @ CHECK: dmb nshst @ encoding: [0x56,0xf0,0x7f,0xf5]
490 @ CHECK: dmb osh @ encoding: [0x53,0xf0,0x7f,0xf5]
491 @ CHECK: dmb oshst @ encoding: [0x52,0xf0,0x7f,0xf5]
492 @ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5]
494 @------------------------------------------------------------------------------
496 @------------------------------------------------------------------------------
511 @ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5]
512 @ CHECK: dsb st @ encoding: [0x4e,0xf0,0x7f,0xf5]
513 @ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5]
514 @ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5]
515 @ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5]
516 @ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5]
517 @ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5]
518 @ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5]
519 @ CHECK: dsb nshst @ encoding: [0x46,0xf0,0x7f,0xf5]
520 @ CHECK: dsb nshst @ encoding: [0x46,0xf0,0x7f,0xf5]
521 @ CHECK: dsb osh @ encoding: [0x43,0xf0,0x7f,0xf5]
522 @ CHECK: dsb oshst @ encoding: [0x42,0xf0,0x7f,0xf5]
523 @ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5]
525 @------------------------------------------------------------------------------
527 @------------------------------------------------------------------------------
530 eor r4, r5, r6, lsl #5
531 eor r4, r5, r6, lsr #5
532 eor r4, r5, r6, lsr #5
533 eor r4, r5, r6, asr #5
534 eor r4, r5, r6, ror #5
535 eor r6, r7, r8, lsl r9
536 eor r6, r7, r8, lsr r9
537 eor r6, r7, r8, asr r9
538 eor r6, r7, r8, ror r9
541 @ destination register is optional
555 @ CHECK: eor r4, r5, #61440 @ encoding: [0x0f,0x4a,0x25,0xe2]
556 @ CHECK: eor r4, r5, r6 @ encoding: [0x06,0x40,0x25,0xe0]
557 @ CHECK: eor r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x25,0xe0]
558 @ CHECK: eor r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x25,0xe0]
559 @ CHECK: eor r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x25,0xe0]
560 @ CHECK: eor r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x25,0xe0]
561 @ CHECK: eor r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x25,0xe0]
562 @ CHECK: eor r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x27,0xe0]
563 @ CHECK: eor r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x27,0xe0]
564 @ CHECK: eor r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x27,0xe0]
565 @ CHECK: eor r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x27,0xe0]
566 @ CHECK: eor r4, r5, r6, rrx @ encoding: [0x66,0x40,0x25,0xe0]
569 @ CHECK: eor r5, r5, #61440 @ encoding: [0x0f,0x5a,0x25,0xe2]
570 @ CHECK: eor r4, r4, r5 @ encoding: [0x05,0x40,0x24,0xe0]
571 @ CHECK: eor r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x24,0xe0]
572 @ CHECK: eor r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x24,0xe0]
573 @ CHECK: eor r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x24,0xe0]
574 @ CHECK: eor r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x24,0xe0]
575 @ CHECK: eor r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x24,0xe0]
576 @ CHECK: eor r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x26,0xe0]
577 @ CHECK: eor r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x26,0xe0]
578 @ CHECK: eor r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x26,0xe0]
579 @ CHECK: eor r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x26,0xe0]
580 @ CHECK: eor r4, r4, r5, rrx @ encoding: [0x65,0x40,0x24,0xe0]
583 @------------------------------------------------------------------------------
585 @------------------------------------------------------------------------------
589 @ CHECK: isb sy @ encoding: [0x6f,0xf0,0x7f,0xf5]
590 @ CHECK: isb sy @ encoding: [0x6f,0xf0,0x7f,0xf5]
594 @------------------------------------------------------------------------------
596 @------------------------------------------------------------------------------
597 ldm r2, {r1,r3-r6,sp}
598 ldmia r2, {r1,r3-r6,sp}
599 ldmib r2, {r1,r3-r6,sp}
600 ldmda r2, {r1,r3-r6,sp}
601 ldmdb r2, {r1,r3-r6,sp}
602 ldmfd r2, {r1,r3-r6,sp}
605 ldm r2!, {r1,r3-r6,sp}
606 ldmib r2!, {r1,r3-r6,sp}
607 ldmda r2!, {r1,r3-r6,sp}
608 ldmdb r2!, {r1,r3-r6,sp}
610 @ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
611 @ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
612 @ CHECK: ldmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe9]
613 @ CHECK: ldmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe8]
614 @ CHECK: ldmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe9]
615 @ CHECK: ldm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
617 @ CHECK: ldm r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe8]
618 @ CHECK: ldmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe9]
619 @ CHECK: ldmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe8]
620 @ CHECK: ldmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe9]
622 @------------------------------------------------------------------------------
624 @------------------------------------------------------------------------------
625 @------------------------------------------------------------------------------
627 @------------------------------------------------------------------------------
628 @------------------------------------------------------------------------------
630 @------------------------------------------------------------------------------
632 @------------------------------------------------------------------------------
634 @------------------------------------------------------------------------------
635 mcr p7, #1, r5, c1, c1, #4
636 mcr2 p7, #1, r5, c1, c1, #4
638 @ CHECK: mcr p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xee]
639 @ CHECK: mcr2 p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xfe]
641 @------------------------------------------------------------------------------
643 @------------------------------------------------------------------------------
644 mcrr p7, #15, r5, r4, c1
645 mcrr2 p7, #15, r5, r4, c1
647 @ CHECK: mcrr p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xec]
648 @ CHECK: mcrr2 p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xfc]
651 @------------------------------------------------------------------------------
653 @------------------------------------------------------------------------------
659 @ CHECK: mla r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0xe0]
660 @ CHECK: mlas r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0xe0]
661 @ CHECK: mlane r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0x10]
662 @ CHECK: mlasne r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0x10]
664 @------------------------------------------------------------------------------
666 @------------------------------------------------------------------------------
670 @ CHECK: mls r2, r5, r6, r3 @ encoding: [0x95,0x36,0x62,0xe0]
671 @ CHECK: mlsne r2, r5, r6, r3 @ encoding: [0x95,0x36,0x62,0x10]
673 @------------------------------------------------------------------------------
675 @------------------------------------------------------------------------------
685 @ CHECK: mov r3, #7 @ encoding: [0x07,0x30,0xa0,0xe3]
686 @ CHECK: mov r4, #4080 @ encoding: [0xff,0x4e,0xa0,0xe3]
687 @ CHECK: mov r5, #16711680 @ encoding: [0xff,0x58,0xa0,0xe3]
688 @ CHECK: movw r6, #65535 @ encoding: [0xff,0x6f,0x0f,0xe3]
689 @ CHECK: movw r9, #65535 @ encoding: [0xff,0x9f,0x0f,0xe3]
690 @ CHECK: movs r3, #7 @ encoding: [0x07,0x30,0xb0,0xe3]
691 @ CHECK: moveq r4, #4080 @ encoding: [0xff,0x4e,0xa0,0x03]
692 @ CHECK: movseq r5, #16711680 @ encoding: [0xff,0x58,0xb0,0x03]
694 @------------------------------------------------------------------------------
696 @------------------------------------------------------------------------------
702 @ CHECK: mov r2, r3 @ encoding: [0x03,0x20,0xa0,0xe1]
703 @ CHECK: movs r2, r3 @ encoding: [0x03,0x20,0xb0,0xe1]
704 @ CHECK: moveq r2, r3 @ encoding: [0x03,0x20,0xa0,0x01]
705 @ CHECK: movseq r2, r3 @ encoding: [0x03,0x20,0xb0,0x01]
707 @------------------------------------------------------------------------------
709 @------------------------------------------------------------------------------
714 @ CHECK: movt r3, #7 @ encoding: [0x07,0x30,0x40,0xe3]
715 @ CHECK: movt r6, #65535 @ encoding: [0xff,0x6f,0x4f,0xe3]
716 @ CHECK: movteq r4, #4080 @ encoding: [0xf0,0x4f,0x40,0x03]
719 @------------------------------------------------------------------------------
721 @------------------------------------------------------------------------------
722 mrc p14, #0, r1, c1, c2, #4
723 mrc2 p14, #0, r1, c1, c2, #4
725 @ CHECK: mrc p14, #0, r1, c1, c2, #4 @ encoding: [0x92,0x1e,0x11,0xee]
726 @ CHECK: mrc2 p14, #0, r1, c1, c2, #4 @ encoding: [0x92,0x1e,0x11,0xfe]
728 @------------------------------------------------------------------------------
730 @------------------------------------------------------------------------------
731 mrrc p7, #1, r5, r4, c1
732 mrrc2 p7, #1, r5, r4, c1
734 @ CHECK: mrrc p7, #1, r5, r4, c1 @ encoding: [0x11,0x57,0x54,0xec]
735 @ CHECK: mrrc2 p7, #1, r5, r4, c1 @ encoding: [0x11,0x57,0x54,0xfc]
738 @------------------------------------------------------------------------------
740 @------------------------------------------------------------------------------
744 @ CHECK: mrs r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1]
745 @ CHECK: mrs r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1]
746 @ CHECK: mrs r8, spsr @ encoding: [0x00,0x80,0x4f,0xe1]
750 @------------------------------------------------------------------------------
752 @------------------------------------------------------------------------------
769 @ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3]
770 @ CHECK: msr APSR_g, #5 @ encoding: [0x05,0xf0,0x24,0xe3]
771 @ CHECK: msr APSR_nzcvq, #5 @ encoding: [0x05,0xf0,0x28,0xe3]
772 @ CHECK: msr APSR_nzcvq, #5 @ encoding: [0x05,0xf0,0x28,0xe3]
773 @ CHECK: msr APSR_nzcvqg, #5 @ encoding: [0x05,0xf0,0x2c,0xe3]
774 @ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3]
775 @ CHECK: msr CPSR_c, #5 @ encoding: [0x05,0xf0,0x21,0xe3]
776 @ CHECK: msr CPSR_x, #5 @ encoding: [0x05,0xf0,0x22,0xe3]
777 @ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3]
778 @ CHECK: msr CPSR_fc, #5 @ encoding: [0x05,0xf0,0x29,0xe3]
779 @ CHECK: msr CPSR_fsx, #5 @ encoding: [0x05,0xf0,0x2e,0xe3]
780 @ CHECK: msr SPSR_fc, #5 @ encoding: [0x05,0xf0,0x69,0xe3]
781 @ CHECK: msr SPSR_fsxc, #5 @ encoding: [0x05,0xf0,0x6f,0xe3]
782 @ CHECK: msr CPSR_fsxc, #5 @ encoding: [0x05,0xf0,0x2f,0xe3]
799 @ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
800 @ CHECK: msr APSR_g, r0 @ encoding: [0x00,0xf0,0x24,0xe1]
801 @ CHECK: msr APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1]
802 @ CHECK: msr APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1]
803 @ CHECK: msr APSR_nzcvqg, r0 @ encoding: [0x00,0xf0,0x2c,0xe1]
804 @ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
805 @ CHECK: msr CPSR_c, r0 @ encoding: [0x00,0xf0,0x21,0xe1]
806 @ CHECK: msr CPSR_x, r0 @ encoding: [0x00,0xf0,0x22,0xe1]
807 @ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
808 @ CHECK: msr CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
809 @ CHECK: msr CPSR_fsx, r0 @ encoding: [0x00,0xf0,0x2e,0xe1]
810 @ CHECK: msr SPSR_fc, r0 @ encoding: [0x00,0xf0,0x69,0xe1]
811 @ CHECK: msr SPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x6f,0xe1]
812 @ CHECK: msr CPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x2f,0xe1]
814 @------------------------------------------------------------------------------
816 @------------------------------------------------------------------------------
823 @ CHECK: mul r5, r6, r7 @ encoding: [0x96,0x07,0x05,0xe0]
824 @ CHECK: muls r5, r6, r7 @ encoding: [0x96,0x07,0x15,0xe0]
825 @ CHECK: mulgt r5, r6, r7 @ encoding: [0x96,0x07,0x05,0xc0]
826 @ CHECK: mulsle r5, r6, r7 @ encoding: [0x96,0x07,0x15,0xd0]
829 @------------------------------------------------------------------------------
831 @------------------------------------------------------------------------------
839 @ CHECK: mvn r3, #7 @ encoding: [0x07,0x30,0xe0,0xe3]
840 @ CHECK: mvn r4, #4080 @ encoding: [0xff,0x4e,0xe0,0xe3]
841 @ CHECK: mvn r5, #16711680 @ encoding: [0xff,0x58,0xe0,0xe3]
842 @ CHECK: mvns r3, #7 @ encoding: [0x07,0x30,0xf0,0xe3]
843 @ CHECK: mvneq r4, #4080 @ encoding: [0xff,0x4e,0xe0,0x03]
844 @ CHECK: mvnseq r5, #16711680 @ encoding: [0xff,0x58,0xf0,0x03]
847 @------------------------------------------------------------------------------
849 @------------------------------------------------------------------------------
858 mvnseq r2, r3, lsl #10
860 @ CHECK: mvn r2, r3 @ encoding: [0x03,0x20,0xe0,0xe1]
861 @ CHECK: mvns r2, r3 @ encoding: [0x03,0x20,0xf0,0xe1]
862 @ CHECK: mvn r5, r6, lsl #19 @ encoding: [0x86,0x59,0xe0,0xe1]
863 @ CHECK: mvn r5, r6, lsr #9 @ encoding: [0xa6,0x54,0xe0,0xe1]
864 @ CHECK: mvn r5, r6, asr #4 @ encoding: [0x46,0x52,0xe0,0xe1]
865 @ CHECK: mvn r5, r6, ror #6 @ encoding: [0x66,0x53,0xe0,0xe1]
866 @ CHECK: mvn r5, r6, rrx @ encoding: [0x66,0x50,0xe0,0xe1]
867 @ CHECK: mvneq r2, r3 @ encoding: [0x03,0x20,0xe0,0x01]
868 @ CHECK: mvnseq r2, r3, lsl #10 @ encoding: [0x03,0x25,0xf0,0x01]
871 @------------------------------------------------------------------------------
872 @ MVN (shifted register)
873 @------------------------------------------------------------------------------
877 mvnslt r5, r6, ror r7
879 @ CHECK: mvn r5, r6, lsl r7 @ encoding: [0x16,0x57,0xe0,0xe1]
880 @ CHECK: mvns r5, r6, lsr r7 @ encoding: [0x36,0x57,0xf0,0xe1]
881 @ CHECK: mvngt r5, r6, asr r7 @ encoding: [0x56,0x57,0xe0,0xc1]
882 @ CHECK: mvnslt r5, r6, ror r7 @ encoding: [0x76,0x57,0xf0,0xb1]
884 @------------------------------------------------------------------------------
886 @------------------------------------------------------------------------------
890 @ CHECK: nop @ encoding: [0x00,0xf0,0x20,0xe3]
891 @ CHECK: nopgt @ encoding: [0x00,0xf0,0x20,0xc3]
894 @------------------------------------------------------------------------------
896 @------------------------------------------------------------------------------
899 orr r4, r5, r6, lsl #5
900 orr r4, r5, r6, lsr #5
901 orr r4, r5, r6, lsr #5
902 orr r4, r5, r6, asr #5
903 orr r4, r5, r6, ror #5
904 orr r6, r7, r8, lsl r9
905 orr r6, r7, r8, lsr r9
906 orr r6, r7, r8, asr r9
907 orr r6, r7, r8, ror r9
910 @ destination register is optional
924 @ CHECK: orr r4, r5, #61440 @ encoding: [0x0f,0x4a,0x85,0xe3]
925 @ CHECK: orr r4, r5, r6 @ encoding: [0x06,0x40,0x85,0xe1]
926 @ CHECK: orr r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x85,0xe1]
927 @ CHECK: orr r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe1]
928 @ CHECK: orr r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x85,0xe1]
929 @ CHECK: orr r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x85,0xe1]
930 @ CHECK: orr r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x85,0xe1]
931 @ CHECK: orr r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x87,0xe1]
932 @ CHECK: orr r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x87,0xe1]
933 @ CHECK: orr r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x87,0xe1]
934 @ CHECK: orr r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0xe1]
935 @ CHECK: orr r4, r5, r6, rrx @ encoding: [0x66,0x40,0x85,0xe1]
937 @ CHECK: orr r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0xe3]
938 @ CHECK: orr r4, r4, r5 @ encoding: [0x05,0x40,0x84,0xe1]
939 @ CHECK: orr r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x84,0xe1]
940 @ CHECK: orr r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe1]
941 @ CHECK: orr r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x84,0xe1]
942 @ CHECK: orr r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x84,0xe1]
943 @ CHECK: orr r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x84,0xe1]
944 @ CHECK: orr r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x86,0xe1]
945 @ CHECK: orr r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x86,0xe1]
946 @ CHECK: orr r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0xe1]
947 @ CHECK: orr r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x86,0xe1]
948 @ CHECK: orr r4, r4, r5, rrx @ encoding: [0x65,0x40,0x84,0xe1]
950 orrseq r4, r5, #0xf000
952 orrseq r4, r5, r6, lsl #5
953 orrlo r6, r7, r8, ror r9
954 orrshi r4, r5, r6, rrx
958 orrslt r6, r7, ror r9
961 @ CHECK: orrseq r4, r5, #61440 @ encoding: [0x0f,0x4a,0x95,0x03]
962 @ CHECK: orrne r4, r5, r6 @ encoding: [0x06,0x40,0x85,0x11]
963 @ CHECK: orrseq r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x95,0x01]
964 @ CHECK: orrlo r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x87,0x31]
965 @ CHECK: orrshi r4, r5, r6, rrx @ encoding: [0x66,0x40,0x95,0x81]
966 @ CHECK: orrhs r5, r5, #61440 @ encoding: [0x0f,0x5a,0x85,0x23]
967 @ CHECK: orrseq r4, r4, r5 @ encoding: [0x05,0x40,0x94,0x01]
968 @ CHECK: orrne r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x86,0x11]
969 @ CHECK: orrslt r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x96,0xb1]
970 @ CHECK: orrsgt r4, r4, r5, rrx @ encoding: [0x65,0x40,0x94,0xc1]
972 @------------------------------------------------------------------------------
974 @------------------------------------------------------------------------------
976 pkhbt r2, r2, r3, lsl #31
977 pkhbt r2, r2, r3, lsl #0
978 pkhbt r2, r2, r3, lsl #15
981 pkhtb r2, r2, r3, asr #31
982 pkhtb r2, r2, r3, asr #15
984 @ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
985 @ CHECK: pkhbt r2, r2, r3, lsl #31 @ encoding: [0x93,0x2f,0x82,0xe6]
986 @ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
987 @ CHECK: pkhbt r2, r2, r3, lsl #15 @ encoding: [0x93,0x27,0x82,0xe6]
989 @ CHECK: pkhbt r2, r2, r3 @ encoding: [0x13,0x20,0x82,0xe6]
990 @ CHECK: pkhtb r2, r2, r3, asr #31 @ encoding: [0xd3,0x2f,0x82,0xe6]
991 @ CHECK: pkhtb r2, r2, r3, asr #15 @ encoding: [0xd3,0x27,0x82,0xe6]
993 @------------------------------------------------------------------------------
995 @------------------------------------------------------------------------------
996 @------------------------------------------------------------------------------
998 @------------------------------------------------------------------------------
1001 @------------------------------------------------------------------------------
1003 @------------------------------------------------------------------------------
1005 pop {r7, r8, r9, r10}
1007 @ FIXME: pop of a single register should encode as "ldr r7, [sp], #4"
1008 @ CHECK-FIXME: pop {r7} @ encoding: [0x04,0x70,0x9d,0xe4]
1009 @ CHECK: pop {r7, r8, r9, r10} @ encoding: [0x80,0x07,0xbd,0xe8]
1012 @------------------------------------------------------------------------------
1014 @------------------------------------------------------------------------------
1016 push {r7, r8, r9, r10}
1018 @ FIXME: push of a single register should encode as "str r7, [sp, #-4]!"
1019 @ CHECK-FIXME: push {r7} @ encoding: [0x04,0x70,0x2d,0xe5]
1020 @ CHECK: push {r7, r8, r9, r10} @ encoding: [0x80,0x07,0x2d,0xe9]
1023 @------------------------------------------------------------------------------
1025 @------------------------------------------------------------------------------
1033 @ CHECK: qadd r1, r2, r3 @ encoding: [0x52,0x10,0x03,0xe1]
1034 @ CHECK: qaddne r1, r2, r3 @ encoding: [0x52,0x10,0x03,0x11]
1035 @ CHECK: qadd16 r1, r2, r3 @ encoding: [0x13,0x1f,0x22,0xe6]
1036 @ CHECK: qadd16gt r1, r2, r3 @ encoding: [0x13,0x1f,0x22,0xc6]
1037 @ CHECK: qadd8 r1, r2, r3 @ encoding: [0x93,0x1f,0x22,0xe6]
1038 @ CHECK: qadd8le r1, r2, r3 @ encoding: [0x93,0x1f,0x22,0xd6]
1041 @------------------------------------------------------------------------------
1043 @------------------------------------------------------------------------------
1049 @ CHECK: qdadd r6, r7, r8 @ encoding: [0x57,0x60,0x48,0xe1]
1050 @ CHECK: qdaddhi r6, r7, r8 @ encoding: [0x57,0x60,0x48,0x81]
1051 @ CHECK: qdsub r6, r7, r8 @ encoding: [0x57,0x60,0x68,0xe1]
1052 @ CHECK: qdsubhi r6, r7, r8 @ encoding: [0x57,0x60,0x68,0x81]
1055 @------------------------------------------------------------------------------
1057 @------------------------------------------------------------------------------
1061 @ CHECK: qsax r9, r12, r0 @ encoding: [0x50,0x9f,0x2c,0xe6]
1062 @ CHECK: qsaxeq r9, r12, r0 @ encoding: [0x50,0x9f,0x2c,0x06]
1065 @------------------------------------------------------------------------------
1067 @------------------------------------------------------------------------------
1075 @ CHECK: qsub r1, r2, r3 @ encoding: [0x52,0x10,0x23,0xe1]
1076 @ CHECK: qsubne r1, r2, r3 @ encoding: [0x52,0x10,0x23,0x11]
1077 @ CHECK: qsub16 r1, r2, r3 @ encoding: [0x73,0x1f,0x22,0xe6]
1078 @ CHECK: qsub16gt r1, r2, r3 @ encoding: [0x73,0x1f,0x22,0xc6]
1079 @ CHECK: qsub8 r1, r2, r3 @ encoding: [0xf3,0x1f,0x22,0xe6]
1080 @ CHECK: qsub8le r1, r2, r3 @ encoding: [0xf3,0x1f,0x22,0xd6]
1083 @------------------------------------------------------------------------------
1085 @------------------------------------------------------------------------------
1089 @ CHECK: rbit r1, r2 @ encoding: [0x32,0x1f,0xff,0xe6]
1090 @ CHECK: rbitne r1, r2 @ encoding: [0x32,0x1f,0xff,0x16]
1093 @------------------------------------------------------------------------------
1095 @------------------------------------------------------------------------------
1103 @ CHECK: rev r1, r9 @ encoding: [0x39,0x1f,0xbf,0xe6]
1104 @ CHECK: revne r1, r5 @ encoding: [0x35,0x1f,0xbf,0x16]
1105 @ CHECK: rev16 r8, r3 @ encoding: [0xb3,0x8f,0xbf,0xe6]
1106 @ CHECK: rev16ne r12, r4 @ encoding: [0xb4,0xcf,0xbf,0x16]
1107 @ CHECK: revsh r4, r9 @ encoding: [0xb9,0x4f,0xff,0xe6]
1108 @ CHECK: revshne r9, r1 @ encoding: [0xb1,0x9f,0xff,0x16]
1111 @------------------------------------------------------------------------------
1113 @------------------------------------------------------------------------------
1116 rsb r4, r5, r6, lsl #5
1117 rsblo r4, r5, r6, lsr #5
1118 rsb r4, r5, r6, lsr #5
1119 rsb r4, r5, r6, asr #5
1120 rsb r4, r5, r6, ror #5
1121 rsb r6, r7, r8, lsl r9
1122 rsb r6, r7, r8, lsr r9
1123 rsb r6, r7, r8, asr r9
1124 rsble r6, r7, r8, ror r9
1127 @ destination register is optional
1132 rsbne r4, r5, lsr #5
1135 rsbgt r6, r7, lsl r9
1141 @ CHECK: rsb r4, r5, #61440 @ encoding: [0x0f,0x4a,0x65,0xe2]
1142 @ CHECK: rsb r4, r5, r6 @ encoding: [0x06,0x40,0x65,0xe0]
1143 @ CHECK: rsb r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0x65,0xe0]
1144 @ CHECK: rsblo r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x65,0x30]
1145 @ CHECK: rsb r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0x65,0xe0]
1146 @ CHECK: rsb r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0x65,0xe0]
1147 @ CHECK: rsb r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0x65,0xe0]
1148 @ CHECK: rsb r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0x67,0xe0]
1149 @ CHECK: rsb r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0x67,0xe0]
1150 @ CHECK: rsb r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0x67,0xe0]
1151 @ CHECK: rsble r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0x67,0xd0]
1152 @ CHECK: rsb r4, r5, r6, rrx @ encoding: [0x66,0x40,0x65,0xe0]
1154 @ CHECK: rsb r5, r5, #61440 @ encoding: [0x0f,0x5a,0x65,0xe2]
1155 @ CHECK: rsb r4, r4, r5 @ encoding: [0x05,0x40,0x64,0xe0]
1156 @ CHECK: rsb r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0x64,0xe0]
1157 @ CHECK: rsb r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x64,0xe0]
1158 @ CHECK: rsbne r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0x64,0x10]
1159 @ CHECK: rsb r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0x64,0xe0]
1160 @ CHECK: rsb r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0x64,0xe0]
1161 @ CHECK: rsbgt r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0x66,0xc0]
1162 @ CHECK: rsb r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0x66,0xe0]
1163 @ CHECK: rsb r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0x66,0xe0]
1164 @ CHECK: rsb r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0x66,0xe0]
1165 @ CHECK: rsb r4, r4, r5, rrx @ encoding: [0x65,0x40,0x64,0xe0]
1167 @------------------------------------------------------------------------------
1169 @------------------------------------------------------------------------------
1172 rsc r4, r5, r6, lsl #5
1173 rsclo r4, r5, r6, lsr #5
1174 rsc r4, r5, r6, lsr #5
1175 rsc r4, r5, r6, asr #5
1176 rsc r4, r5, r6, ror #5
1177 rsc r6, r7, r8, lsl r9
1178 rsc r6, r7, r8, lsr r9
1179 rsc r6, r7, r8, asr r9
1180 rscle r6, r7, r8, ror r9
1182 @ destination register is optional
1187 rscne r4, r5, lsr #5
1190 rscgt r6, r7, lsl r9
1195 @ CHECK: rsc r4, r5, #61440 @ encoding: [0x0f,0x4a,0xe5,0xe2]
1196 @ CHECK: rsc r4, r5, r6 @ encoding: [0x06,0x40,0xe5,0xe0]
1197 @ CHECK: rsc r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0xe5,0xe0]
1198 @ CHECK: rsclo r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xe5,0x30]
1199 @ CHECK: rsc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xe5,0xe0]
1200 @ CHECK: rsc r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0xe5,0xe0]
1201 @ CHECK: rsc r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0xe5,0xe0]
1202 @ CHECK: rsc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xe7,0xe0]
1203 @ CHECK: rsc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xe7,0xe0]
1204 @ CHECK: rsc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xe7,0xe0]
1205 @ CHECK: rscle r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xe7,0xd0]
1207 @ CHECK: rsc r5, r5, #61440 @ encoding: [0x0f,0x5a,0xe5,0xe2]
1208 @ CHECK: rsc r4, r4, r5 @ encoding: [0x05,0x40,0xe4,0xe0]
1209 @ CHECK: rsc r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0xe4,0xe0]
1210 @ CHECK: rsc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xe4,0xe0]
1211 @ CHECK: rscne r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xe4,0x10]
1212 @ CHECK: rsc r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0xe4,0xe0]
1213 @ CHECK: rsc r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0xe4,0xe0]
1214 @ CHECK: rscgt r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xe6,0xc0]
1215 @ CHECK: rsc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xe6,0xe0]
1216 @ CHECK: rsc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xe6,0xe0]
1217 @ CHECK: rsc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xe6,0xe0]
1219 @------------------------------------------------------------------------------
1221 @------------------------------------------------------------------------------
1227 @ CHECK: sadd16 r1, r2, r3 @ encoding: [0x13,0x1f,0x12,0xe6]
1228 @ CHECK: sadd16gt r1, r2, r3 @ encoding: [0x13,0x1f,0x12,0xc6]
1229 @ CHECK: sadd8 r1, r2, r3 @ encoding: [0x93,0x1f,0x12,0xe6]
1230 @ CHECK: sadd8le r1, r2, r3 @ encoding: [0x93,0x1f,0x12,0xd6]
1233 @------------------------------------------------------------------------------
1235 @------------------------------------------------------------------------------
1239 @ CHECK: sasx r9, r12, r0 @ encoding: [0x30,0x9f,0x1c,0xe6]
1240 @ CHECK: sasxeq r9, r12, r0 @ encoding: [0x30,0x9f,0x1c,0x06]
1243 @------------------------------------------------------------------------------
1245 @------------------------------------------------------------------------------
1248 sbc r4, r5, r6, lsl #5
1249 sbc r4, r5, r6, lsr #5
1250 sbc r4, r5, r6, lsr #5
1251 sbc r4, r5, r6, asr #5
1252 sbc r4, r5, r6, ror #5
1253 sbc r6, r7, r8, lsl r9
1254 sbc r6, r7, r8, lsr r9
1255 sbc r6, r7, r8, asr r9
1256 sbc r6, r7, r8, ror r9
1258 @ destination register is optional
1271 @ CHECK: sbc r4, r5, #61440 @ encoding: [0x0f,0x4a,0xc5,0xe2]
1272 @ CHECK: sbc r4, r5, r6 @ encoding: [0x06,0x40,0xc5,0xe0]
1273 @ CHECK: sbc r4, r5, r6, lsl #5 @ encoding: [0x86,0x42,0xc5,0xe0]
1274 @ CHECK: sbc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xc5,0xe0]
1275 @ CHECK: sbc r4, r5, r6, lsr #5 @ encoding: [0xa6,0x42,0xc5,0xe0]
1276 @ CHECK: sbc r4, r5, r6, asr #5 @ encoding: [0xc6,0x42,0xc5,0xe0]
1277 @ CHECK: sbc r4, r5, r6, ror #5 @ encoding: [0xe6,0x42,0xc5,0xe0]
1278 @ CHECK: sbc r6, r7, r8, lsl r9 @ encoding: [0x18,0x69,0xc7,0xe0]
1279 @ CHECK: sbc r6, r7, r8, lsr r9 @ encoding: [0x38,0x69,0xc7,0xe0]
1280 @ CHECK: sbc r6, r7, r8, asr r9 @ encoding: [0x58,0x69,0xc7,0xe0]
1281 @ CHECK: sbc r6, r7, r8, ror r9 @ encoding: [0x78,0x69,0xc7,0xe0]
1283 @ CHECK: sbc r5, r5, #61440 @ encoding: [0x0f,0x5a,0xc5,0xe2]
1284 @ CHECK: sbc r4, r4, r5 @ encoding: [0x05,0x40,0xc4,0xe0]
1285 @ CHECK: sbc r4, r4, r5, lsl #5 @ encoding: [0x85,0x42,0xc4,0xe0]
1286 @ CHECK: sbc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xc4,0xe0]
1287 @ CHECK: sbc r4, r4, r5, lsr #5 @ encoding: [0xa5,0x42,0xc4,0xe0]
1288 @ CHECK: sbc r4, r4, r5, asr #5 @ encoding: [0xc5,0x42,0xc4,0xe0]
1289 @ CHECK: sbc r4, r4, r5, ror #5 @ encoding: [0xe5,0x42,0xc4,0xe0]
1290 @ CHECK: sbc r6, r6, r7, lsl r9 @ encoding: [0x17,0x69,0xc6,0xe0]
1291 @ CHECK: sbc r6, r6, r7, lsr r9 @ encoding: [0x37,0x69,0xc6,0xe0]
1292 @ CHECK: sbc r6, r6, r7, asr r9 @ encoding: [0x57,0x69,0xc6,0xe0]
1293 @ CHECK: sbc r6, r6, r7, ror r9 @ encoding: [0x77,0x69,0xc6,0xe0]
1296 @------------------------------------------------------------------------------
1298 @------------------------------------------------------------------------------
1302 @ CHECK: sel r9, r2, r1 @ encoding: [0xb1,0x9f,0x82,0xe6]
1303 @ CHECK: selne r9, r2, r1 @ encoding: [0xb1,0x9f,0x82,0x16]
1306 @------------------------------------------------------------------------------
1308 @------------------------------------------------------------------------------
1312 sel r9, r2, r1 @ encoding: [0xb1,0x9f,0x82,0xe6]
1313 selne r9, r2, r1 @ encoding: [0xb1,0x9f,0x82,0x16]
1316 @------------------------------------------------------------------------------
1318 @------------------------------------------------------------------------------
1322 @ CHECK: sev @ encoding: [0x04,0xf0,0x20,0xe3]
1323 @ CHECK: seveq @ encoding: [0x04,0xf0,0x20,0x03]
1325 @------------------------------------------------------------------------------
1327 @------------------------------------------------------------------------------
1329 shadd16gt r4, r8, r2
1333 @ CHECK: shadd16 r4, r8, r2 @ encoding: [0x12,0x4f,0x38,0xe6]
1334 @ CHECK: shadd16gt r4, r8, r2 @ encoding: [0x12,0x4f,0x38,0xc6]
1335 @ CHECK: shadd8 r4, r8, r2 @ encoding: [0x92,0x4f,0x38,0xe6]
1336 @ CHECK: shadd8gt r4, r8, r2 @ encoding: [0x92,0x4f,0x38,0xc6]
1339 @------------------------------------------------------------------------------
1341 @------------------------------------------------------------------------------
1345 @ CHECK: shasx r4, r8, r2 @ encoding: [0x32,0x4f,0x38,0xe6]
1346 @ CHECK: shasxgt r4, r8, r2 @ encoding: [0x32,0x4f,0x38,0xc6]
1349 @------------------------------------------------------------------------------
1351 @------------------------------------------------------------------------------
1353 shsub16gt r4, r8, r2
1357 @ CHECK: shsub16 r4, r8, r2 @ encoding: [0x72,0x4f,0x38,0xe6]
1358 @ CHECK: shsub16gt r4, r8, r2 @ encoding: [0x72,0x4f,0x38,0xc6]
1359 @ CHECK: shsub8 r4, r8, r2 @ encoding: [0xf2,0x4f,0x38,0xe6]
1360 @ CHECK: shsub8gt r4, r8, r2 @ encoding: [0xf2,0x4f,0x38,0xc6]
1362 @------------------------------------------------------------------------------
1364 @------------------------------------------------------------------------------
1368 @ CHECK: smc #15 @ encoding: [0x7f,0x00,0x60,0xe1]
1369 @ CHECK: smceq #0 @ encoding: [0x70,0x00,0x60,0x01]
1371 @------------------------------------------------------------------------------
1372 @ SMLABB/SMLABT/SMLATB/SMLATT
1373 @------------------------------------------------------------------------------
1374 smlabb r3, r1, r9, r0
1375 smlabt r5, r6, r4, r1
1376 smlatb r4, r2, r3, r2
1377 smlatt r8, r3, r8, r4
1378 smlabbge r3, r1, r9, r0
1379 smlabtle r5, r6, r4, r1
1380 smlatbne r4, r2, r3, r2
1381 smlatteq r8, r3, r8, r4
1383 @ CHECK: smlabb r3, r1, r9, r0 @ encoding: [0x81,0x09,0x03,0xe1]
1384 @ CHECK: smlabt r5, r6, r4, r1 @ encoding: [0xc6,0x14,0x05,0xe1]
1385 @ CHECK: smlatb r4, r2, r3, r2 @ encoding: [0xa2,0x23,0x04,0xe1]
1386 @ CHECK: smlatt r8, r3, r8, r4 @ encoding: [0xe3,0x48,0x08,0xe1]
1387 @ CHECK: smlabbge r3, r1, r9, r0 @ encoding: [0x81,0x09,0x03,0xa1]
1388 @ CHECK: smlabtle r5, r6, r4, r1 @ encoding: [0xc6,0x14,0x05,0xd1]
1389 @ CHECK: smlatbne r4, r2, r3, r2 @ encoding: [0xa2,0x23,0x04,0x11]
1390 @ CHECK: smlatteq r8, r3, r8, r4 @ encoding: [0xe3,0x48,0x08,0x01]
1393 @------------------------------------------------------------------------------
1395 @------------------------------------------------------------------------------
1396 stm r2, {r1,r3-r6,sp}
1397 stmia r2, {r1,r3-r6,sp}
1398 stmib r2, {r1,r3-r6,sp}
1399 stmda r2, {r1,r3-r6,sp}
1400 stmdb r2, {r1,r3-r6,sp}
1401 stmfd r2, {r1,r3-r6,sp}
1404 stmia r2!, {r1,r3-r6,sp}
1405 stmib r2!, {r1,r3-r6,sp}
1406 stmda r2!, {r1,r3-r6,sp}
1407 stmdb r2!, {r1,r3-r6,sp}
1408 @ CHECK: stm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8]
1409 @ CHECK: stm r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8]
1410 @ CHECK: stmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe9]
1411 @ CHECK: stmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe8]
1412 @ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9]
1413 @ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9]
1415 @ CHECK: stm r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe8]
1416 @ CHECK: stmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe9]
1417 @ CHECK: stmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe8]
1418 @ CHECK: stmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe9]