basic-arm-instructions.s revision 71810ab7c0ecd6927dde1eee0c73169642f3764d
1@ RUN: llvm-mc -triple=armv7-apple-darwin -show-encoding < %s | FileCheck %s
2  .syntax unified
3  .globl _func
4
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
9@ more reasonable.
10
11_func:
12@ CHECK: _func
13
14@------------------------------------------------------------------------------
15@ ADC (immediate)
16@------------------------------------------------------------------------------
17        adc r1, r2, #0xf
18        adc r1, r2, #0xf0
19        adc r1, r2, #0xf00
20        adc r1, r2, #0xf000
21        adc r1, r2, #0xf0000
22        adc r1, r2, #0xf00000
23        adc r1, r2, #0xf000000
24        adc r1, r2, #0xf0000000
25        adc r1, r2, #0xf000000f
26        adcs r1, r2, #0xf00
27        adcseq r1, r2, #0xf00
28        adceq r1, r2, #0xf00
29
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]
39
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]
43
44@------------------------------------------------------------------------------
45@ ADC (register)
46@ ADC (shifted register)
47@------------------------------------------------------------------------------
48        adc r4, r5, r6
49        @ Constant shifts
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
60
61        @ Register shifts
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
66        adc r4, r5, r6, rrx
67
68        @ Destination register is optional
69        adc r5, r6
70        adc r4, r5, lsl #1
71        adc r4, r5, lsl #31
72        adc r4, r5, lsr #1
73        adc r4, r5, lsr #31
74        adc r4, r5, lsr #32
75        adc r4, r5, asr #1
76        adc r4, r5, asr #31
77        adc r4, r5, asr #32
78        adc r4, r5, ror #1
79        adc r4, r5, ror #31
80        adc r4, r5, rrx
81        adc r6, r7, lsl r9
82        adc r6, r7, lsr r9
83        adc r6, r7, asr r9
84        adc r6, r7, ror r9
85        adc r4, r5, rrx
86
87@ CHECK: adc	r4, r5, r6              @ encoding: [0x06,0x40,0xa5,0xe0]
88
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]
99
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]
105
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]
123
124
125@------------------------------------------------------------------------------
126@ ADR
127@------------------------------------------------------------------------------
128Lback:
129        adr r2, Lback
130        adr r3, Lforward
131Lforward:
132        adr	r2, #3
133        adr	r2, #-3
134
135@ CHECK: Lback:
136@ CHECK: adr	r2, Lback    @ encoding: [0bAAAAAAA0,0x20'A',0x0f'A',0b1110001A]
137@ CHECK:  @   fixup A - offset: 0, value: Lback, kind: fixup_arm_adr_pcrel_12
138@ CHECK: adr	r3, Lforward @ encoding: [0bAAAAAAA0,0x30'A',0x0f'A',0b1110001A]
139@ CHECK:  @   fixup A - offset: 0, value: Lforward, kind: fixup_arm_adr_pcrel_12
140@ CHECK: Lforward:
141@ CHECK: adr	r2, #3                  @ encoding: [0x03,0x20,0x8f,0xe2]
142@ CHECK: adr	r2, #-3                 @ encoding: [0x03,0x20,0x4f,0xe2]
143
144
145@------------------------------------------------------------------------------
146@ ADD
147@------------------------------------------------------------------------------
148        add r4, r5, #0xf000
149        add r4, r5, r6
150        add r4, r5, r6, lsl #5
151        add r4, r5, r6, lsr #5
152        add r4, r5, r6, lsr #5
153        add r4, r5, r6, asr #5
154        add r4, r5, r6, ror #5
155        add r6, r7, r8, lsl r9
156        add r6, r7, r8, lsr r9
157        add r6, r7, r8, asr r9
158        add r6, r7, r8, ror r9
159        add r4, r5, r6, rrx
160
161        @ destination register is optional
162        add r5, #0xf000
163        add r4, r5
164        add r4, r5, lsl #5
165        add r4, r5, lsr #5
166        add r4, r5, lsr #5
167        add r4, r5, asr #5
168        add r4, r5, ror #5
169        add r6, r7, lsl r9
170        add r6, r7, lsr r9
171        add r6, r7, asr r9
172        add r6, r7, ror r9
173        add r4, r5, rrx
174
175@ CHECK: add	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x85,0xe2]
176@ CHECK: add	r4, r5, r6              @ encoding: [0x06,0x40,0x85,0xe0]
177@ CHECK: add	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x85,0xe0]
178@ CHECK: add	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe0]
179@ CHECK: add	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe0]
180@ CHECK: add	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x85,0xe0]
181@ CHECK: add	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x85,0xe0]
182@ CHECK: add	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x87,0xe0]
183@ CHECK: add	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x87,0xe0]
184@ CHECK: add	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x87,0xe0]
185@ CHECK: add	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x87,0xe0]
186@ CHECK: add	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x85,0xe0]
187
188
189@ CHECK: add	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x85,0xe2]
190@ CHECK: add	r4, r4, r5              @ encoding: [0x05,0x40,0x84,0xe0]
191@ CHECK: add	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x84,0xe0]
192@ CHECK: add	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe0]
193@ CHECK: add	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe0]
194@ CHECK: add	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x84,0xe0]
195@ CHECK: add	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x84,0xe0]
196@ CHECK: add	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x86,0xe0]
197@ CHECK: add	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x86,0xe0]
198@ CHECK: add	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x86,0xe0]
199@ CHECK: add	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x86,0xe0]
200@ CHECK: add	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x84,0xe0]
201
202
203@------------------------------------------------------------------------------
204@ AND
205@------------------------------------------------------------------------------
206    and r10, r1, #0xf
207    and r10, r1, r6
208    and r10, r1, r6, lsl #10
209    and r10, r1, r6, lsr #10
210    and r10, r1, r6, lsr #10
211    and r10, r1, r6, asr #10
212    and r10, r1, r6, ror #10
213    and r6, r7, r8, lsl r2
214    and r6, r7, r8, lsr r2
215    and r6, r7, r8, asr r2
216    and r6, r7, r8, ror r2
217    and r10, r1, r6, rrx
218
219    @ destination register is optional
220    and r1, #0xf
221    and r10, r1
222    and r10, r1, lsl #10
223    and r10, r1, lsr #10
224    and r10, r1, lsr #10
225    and r10, r1, asr #10
226    and r10, r1, ror #10
227    and r6, r7, lsl r2
228    and r6, r7, lsr r2
229    and r6, r7, asr r2
230    and r6, r7, ror r2
231    and r10, r1, rrx
232
233@ CHECK: and	r10, r1, #15            @ encoding: [0x0f,0xa0,0x01,0xe2]
234@ CHECK: and	r10, r1, r6             @ encoding: [0x06,0xa0,0x01,0xe0]
235@ CHECK: and	r10, r1, r6, lsl #10    @ encoding: [0x06,0xa5,0x01,0xe0]
236@ CHECK: and	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0x01,0xe0]
237@ CHECK: and	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0x01,0xe0]
238@ CHECK: and	r10, r1, r6, asr #10    @ encoding: [0x46,0xa5,0x01,0xe0]
239@ CHECK: and	r10, r1, r6, ror #10    @ encoding: [0x66,0xa5,0x01,0xe0]
240@ CHECK: and	r6, r7, r8, lsl r2      @ encoding: [0x18,0x62,0x07,0xe0]
241@ CHECK: and	r6, r7, r8, lsr r2      @ encoding: [0x38,0x62,0x07,0xe0]
242@ CHECK: and	r6, r7, r8, asr r2      @ encoding: [0x58,0x62,0x07,0xe0]
243@ CHECK: and	r6, r7, r8, ror r2      @ encoding: [0x78,0x62,0x07,0xe0]
244@ CHECK: and	r10, r1, r6, rrx        @ encoding: [0x66,0xa0,0x01,0xe0]
245
246@ CHECK: and	r1, r1, #15             @ encoding: [0x0f,0x10,0x01,0xe2]
247@ CHECK: and	r10, r10, r1            @ encoding: [0x01,0xa0,0x0a,0xe0]
248@ CHECK: and	r10, r10, r1, lsl #10   @ encoding: [0x01,0xa5,0x0a,0xe0]
249@ CHECK: and	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0x0a,0xe0]
250@ CHECK: and	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0x0a,0xe0]
251@ CHECK: and	r10, r10, r1, asr #10   @ encoding: [0x41,0xa5,0x0a,0xe0]
252@ CHECK: and	r10, r10, r1, ror #10   @ encoding: [0x61,0xa5,0x0a,0xe0]
253@ CHECK: and	r6, r6, r7, lsl r2      @ encoding: [0x17,0x62,0x06,0xe0]
254@ CHECK: and	r6, r6, r7, lsr r2      @ encoding: [0x37,0x62,0x06,0xe0]
255@ CHECK: and	r6, r6, r7, asr r2      @ encoding: [0x57,0x62,0x06,0xe0]
256@ CHECK: and	r6, r6, r7, ror r2      @ encoding: [0x77,0x62,0x06,0xe0]
257@ CHECK: and	r10, r10, r1, rrx       @ encoding: [0x61,0xa0,0x0a,0xe0]
258
259@------------------------------------------------------------------------------
260@ ASR
261@------------------------------------------------------------------------------
262	asr r2, r4, #32
263	asr r2, r4, #2
264
265@ CHECK: asr	r2, r4, #32             @ encoding: [0x44,0x20,0xa0,0xe1]
266@ CHECK: asr	r2, r4, #2              @ encoding: [0x44,0x21,0xa0,0xe1]
267
268
269@------------------------------------------------------------------------------
270@ B
271@------------------------------------------------------------------------------
272        b _bar
273        beq _baz
274
275@ CHECK: b	_bar                    @ encoding: [A,A,A,0xea]
276             @   fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch
277@ CHECK: beq	_baz                    @ encoding: [A,A,A,0x0a]
278             @   fixup A - offset: 0, value: _baz, kind: fixup_arm_condbranch
279
280
281@------------------------------------------------------------------------------
282@ BFC
283@------------------------------------------------------------------------------
284        bfc r5, #3, #17
285        bfccc r5, #3, #17
286
287@ CHECK: bfc	r5, #3, #17             @ encoding: [0x9f,0x51,0xd3,0xe7]
288@ CHECK: bfclo	r5, #3, #17             @ encoding: [0x9f,0x51,0xd3,0x37]
289
290
291@------------------------------------------------------------------------------
292@ BFI
293@------------------------------------------------------------------------------
294        bfi r5, r2, #3, #17
295        bfine r5, r2, #3, #17
296
297@ CHECK: bfi	r5, r2, #3, #17         @ encoding: [0x92,0x51,0xd3,0xe7]
298@ CHECK: bfine	r5, r2, #3, #17         @ encoding: [0x92,0x51,0xd3,0x17]
299
300
301@------------------------------------------------------------------------------
302@ BIC
303@------------------------------------------------------------------------------
304        bic r10, r1, #0xf
305        bic r10, r1, r6
306        bic r10, r1, r6, lsl #10
307        bic r10, r1, r6, lsr #10
308        bic r10, r1, r6, lsr #10
309        bic r10, r1, r6, asr #10
310        bic r10, r1, r6, ror #10
311        bic r6, r7, r8, lsl r2
312        bic r6, r7, r8, lsr r2
313        bic r6, r7, r8, asr r2
314        bic r6, r7, r8, ror r2
315        bic r10, r1, r6, rrx
316
317        @ destination register is optional
318        bic r1, #0xf
319        bic r10, r1
320        bic r10, r1, lsl #10
321        bic r10, r1, lsr #10
322        bic r10, r1, lsr #10
323        bic r10, r1, asr #10
324        bic r10, r1, ror #10
325        bic r6, r7, lsl r2
326        bic r6, r7, lsr r2
327        bic r6, r7, asr r2
328        bic r6, r7, ror r2
329        bic r10, r1, rrx
330
331@ CHECK: bic	r10, r1, #15            @ encoding: [0x0f,0xa0,0xc1,0xe3]
332@ CHECK: bic	r10, r1, r6             @ encoding: [0x06,0xa0,0xc1,0xe1]
333@ CHECK: bic	r10, r1, r6, lsl #10    @ encoding: [0x06,0xa5,0xc1,0xe1]
334@ CHECK: bic	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0xc1,0xe1]
335@ CHECK: bic	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0xc1,0xe1]
336@ CHECK: bic	r10, r1, r6, asr #10    @ encoding: [0x46,0xa5,0xc1,0xe1]
337@ CHECK: bic	r10, r1, r6, ror #10    @ encoding: [0x66,0xa5,0xc1,0xe1]
338@ CHECK: bic	r6, r7, r8, lsl r2      @ encoding: [0x18,0x62,0xc7,0xe1]
339@ CHECK: bic	r6, r7, r8, lsr r2      @ encoding: [0x38,0x62,0xc7,0xe1]
340@ CHECK: bic	r6, r7, r8, asr r2      @ encoding: [0x58,0x62,0xc7,0xe1]
341@ CHECK: bic	r6, r7, r8, ror r2      @ encoding: [0x78,0x62,0xc7,0xe1]
342@ CHECK: bic	r10, r1, r6, rrx        @ encoding: [0x66,0xa0,0xc1,0xe1]
343
344
345@ CHECK: bic	r1, r1, #15             @ encoding: [0x0f,0x10,0xc1,0xe3]
346@ CHECK: bic	r10, r10, r1            @ encoding: [0x01,0xa0,0xca,0xe1]
347@ CHECK: bic	r10, r10, r1, lsl #10   @ encoding: [0x01,0xa5,0xca,0xe1]
348@ CHECK: bic	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0xca,0xe1]
349@ CHECK: bic	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0xca,0xe1]
350@ CHECK: bic	r10, r10, r1, asr #10   @ encoding: [0x41,0xa5,0xca,0xe1]
351@ CHECK: bic	r10, r10, r1, ror #10   @ encoding: [0x61,0xa5,0xca,0xe1]
352@ CHECK: bic	r6, r6, r7, lsl r2      @ encoding: [0x17,0x62,0xc6,0xe1]
353@ CHECK: bic	r6, r6, r7, lsr r2      @ encoding: [0x37,0x62,0xc6,0xe1]
354@ CHECK: bic	r6, r6, r7, asr r2      @ encoding: [0x57,0x62,0xc6,0xe1]
355@ CHECK: bic	r6, r6, r7, ror r2      @ encoding: [0x77,0x62,0xc6,0xe1]
356@ CHECK: bic	r10, r10, r1, rrx       @ encoding: [0x61,0xa0,0xca,0xe1]
357
358@------------------------------------------------------------------------------
359@ BKPT
360@------------------------------------------------------------------------------
361        bkpt #10
362        bkpt #65535
363
364@ CHECK: bkpt  #10                      @ encoding: [0x7a,0x00,0x20,0xe1]
365@ CHECK: bkpt  #65535                   @ encoding: [0x7f,0xff,0x2f,0xe1]
366
367@------------------------------------------------------------------------------
368@ BL/BLX (immediate)
369@------------------------------------------------------------------------------
370
371        bl _bar
372        blx _bar
373        blls #28634268
374        blx	#32424576
375        blx	#16212288
376
377@ CHECK: bl  _bar @ encoding: [A,A,A,0xeb]
378@ CHECK:   @   fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch
379@ CHECK: blx	_bar @ encoding: [A,A,A,0xfa]
380           @   fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch
381@ CHECK: blls	#28634268               @ encoding: [0x27,0x3b,0x6d,0x9b]
382@ CHECK: blx	#32424576               @ encoding: [0xa0,0xb0,0x7b,0xfa]
383@ CHECK: blx	#16212288               @ encoding: [0x50,0xd8,0x3d,0xfa]
384@------------------------------------------------------------------------------
385@ BLX (register)
386@------------------------------------------------------------------------------
387        blx r2
388        blxne r2
389
390@ CHECK: blx r2                         @ encoding: [0x32,0xff,0x2f,0xe1]
391@ CHECK: blxne r2                       @ encoding: [0x32,0xff,0x2f,0x11]
392
393@------------------------------------------------------------------------------
394@ BX
395@------------------------------------------------------------------------------
396        bx r2
397        bxne r2
398
399@ CHECK: bx	r2                      @ encoding: [0x12,0xff,0x2f,0xe1]
400@ CHECK: bxne	r2                      @ encoding: [0x12,0xff,0x2f,0x11]
401
402@------------------------------------------------------------------------------
403@ BXJ
404@------------------------------------------------------------------------------
405        bxj r2
406        bxjne r2
407
408@ CHECK: bxj	r2                      @ encoding: [0x22,0xff,0x2f,0xe1]
409@ CHECK: bxjne	r2                      @ encoding: [0x22,0xff,0x2f,0x11]
410
411
412@------------------------------------------------------------------------------
413@ CDP/CDP2
414@------------------------------------------------------------------------------
415        cdp  p7, #1, c1, c1, c1, #4
416        cdp2  p7, #1, c1, c1, c1, #4
417
418@ CHECK: cdp  p7, #1, c1, c1, c1, #4     @ encoding: [0x81,0x17,0x11,0xee]
419@ CHECK: cdp2  p7, #1, c1, c1, c1, #4    @ encoding: [0x81,0x17,0x11,0xfe]
420
421
422@------------------------------------------------------------------------------
423@ CLREX
424@------------------------------------------------------------------------------
425        clrex
426
427@ CHECK: clrex                           @ encoding: [0x1f,0xf0,0x7f,0xf5]
428
429
430@------------------------------------------------------------------------------
431@ CLZ
432@------------------------------------------------------------------------------
433    clz r1, r2
434    clzeq r1, r2
435
436@ CHECK: clz r1, r2                      @ encoding: [0x12,0x1f,0x6f,0xe1]
437@ CHECK: clzeq r1, r2                    @ encoding: [0x12,0x1f,0x6f,0x01]
438
439@------------------------------------------------------------------------------
440@ CMN
441@------------------------------------------------------------------------------
442        cmn r1, #0xf
443        cmn r1, r6
444        cmn r1, r6, lsl #10
445        cmn r1, r6, lsr #10
446        cmn sp, r6, lsr #10
447        cmn r1, r6, asr #10
448        cmn r1, r6, ror #10
449        cmn r7, r8, lsl r2
450        cmn sp, r8, lsr r2
451        cmn r7, r8, asr r2
452        cmn r7, r8, ror r2
453        cmn r1, r6, rrx
454
455@ CHECK: cmn	r1, #15                 @ encoding: [0x0f,0x00,0x71,0xe3]
456@ CHECK: cmn	r1, r6                  @ encoding: [0x06,0x00,0x71,0xe1]
457@ CHECK: cmn	r1, r6, lsl #10         @ encoding: [0x06,0x05,0x71,0xe1]
458@ CHECK: cmn	r1, r6, lsr #10         @ encoding: [0x26,0x05,0x71,0xe1]
459@ CHECK: cmn	sp, r6, lsr #10         @ encoding: [0x26,0x05,0x7d,0xe1]
460@ CHECK: cmn	r1, r6, asr #10         @ encoding: [0x46,0x05,0x71,0xe1]
461@ CHECK: cmn	r1, r6, ror #10         @ encoding: [0x66,0x05,0x71,0xe1]
462@ CHECK: cmn	r7, r8, lsl r2          @ encoding: [0x18,0x02,0x77,0xe1]
463@ CHECK: cmn	sp, r8, lsr r2          @ encoding: [0x38,0x02,0x7d,0xe1]
464@ CHECK: cmn	r7, r8, asr r2          @ encoding: [0x58,0x02,0x77,0xe1]
465@ CHECK: cmn	r7, r8, ror r2          @ encoding: [0x78,0x02,0x77,0xe1]
466@ CHECK: cmn	r1, r6, rrx             @ encoding: [0x66,0x00,0x71,0xe1]
467
468@------------------------------------------------------------------------------
469@ CMP
470@------------------------------------------------------------------------------
471        cmp r1, #0xf
472        cmp r1, r6
473        cmp r1, r6, lsl #10
474        cmp r1, r6, lsr #10
475        cmp sp, r6, lsr #10
476        cmp r1, r6, asr #10
477        cmp r1, r6, ror #10
478        cmp r7, r8, lsl r2
479        cmp sp, r8, lsr r2
480        cmp r7, r8, asr r2
481        cmp r7, r8, ror r2
482        cmp r1, r6, rrx
483
484@ CHECK: cmp	r1, #15                 @ encoding: [0x0f,0x00,0x51,0xe3]
485@ CHECK: cmp	r1, r6                  @ encoding: [0x06,0x00,0x51,0xe1]
486@ CHECK: cmp	r1, r6, lsl #10         @ encoding: [0x06,0x05,0x51,0xe1]
487@ CHECK: cmp	r1, r6, lsr #10         @ encoding: [0x26,0x05,0x51,0xe1]
488@ CHECK: cmp	sp, r6, lsr #10         @ encoding: [0x26,0x05,0x5d,0xe1]
489@ CHECK: cmp	r1, r6, asr #10         @ encoding: [0x46,0x05,0x51,0xe1]
490@ CHECK: cmp	r1, r6, ror #10         @ encoding: [0x66,0x05,0x51,0xe1]
491@ CHECK: cmp	r7, r8, lsl r2          @ encoding: [0x18,0x02,0x57,0xe1]
492@ CHECK: cmp	sp, r8, lsr r2          @ encoding: [0x38,0x02,0x5d,0xe1]
493@ CHECK: cmp	r7, r8, asr r2          @ encoding: [0x58,0x02,0x57,0xe1]
494@ CHECK: cmp	r7, r8, ror r2          @ encoding: [0x78,0x02,0x57,0xe1]
495@ CHECK: cmp	r1, r6, rrx             @ encoding: [0x66,0x00,0x51,0xe1]
496
497
498@------------------------------------------------------------------------------
499@ CPS
500@------------------------------------------------------------------------------
501        cpsie  aif
502        cps  #15
503        cpsid  if, #10
504
505@ CHECK: cpsie  aif @ encoding: [0xc0,0x01,0x08,0xf1]
506@ CHECK: cps  #15 @ encoding: [0x0f,0x00,0x02,0xf1]
507@ CHECK: cpsid  if, #10 @ encoding: [0xca,0x00,0x0e,0xf1]
508
509
510@------------------------------------------------------------------------------
511@ DBG
512@------------------------------------------------------------------------------
513        dbg #0
514        dbg #5
515        dbg #15
516
517@ CHECK: dbg #0                         @ encoding: [0xf0,0xf0,0x20,0xe3]
518@ CHECK: dbg #5                         @ encoding: [0xf5,0xf0,0x20,0xe3]
519@ CHECK: dbg #15                        @ encoding: [0xff,0xf0,0x20,0xe3]
520
521
522@------------------------------------------------------------------------------
523@ DMB
524@------------------------------------------------------------------------------
525        dmb sy
526        dmb st
527        dmb sh
528        dmb ish
529        dmb shst
530        dmb ishst
531        dmb un
532        dmb nsh
533        dmb unst
534        dmb nshst
535        dmb osh
536        dmb oshst
537        dmb
538
539@ CHECK: dmb	sy                      @ encoding: [0x5f,0xf0,0x7f,0xf5]
540@ CHECK: dmb	st                      @ encoding: [0x5e,0xf0,0x7f,0xf5]
541@ CHECK: dmb	ish                     @ encoding: [0x5b,0xf0,0x7f,0xf5]
542@ CHECK: dmb	ish                     @ encoding: [0x5b,0xf0,0x7f,0xf5]
543@ CHECK: dmb	ishst                   @ encoding: [0x5a,0xf0,0x7f,0xf5]
544@ CHECK: dmb	ishst                   @ encoding: [0x5a,0xf0,0x7f,0xf5]
545@ CHECK: dmb	nsh                     @ encoding: [0x57,0xf0,0x7f,0xf5]
546@ CHECK: dmb	nsh                     @ encoding: [0x57,0xf0,0x7f,0xf5]
547@ CHECK: dmb	nshst                   @ encoding: [0x56,0xf0,0x7f,0xf5]
548@ CHECK: dmb	nshst                   @ encoding: [0x56,0xf0,0x7f,0xf5]
549@ CHECK: dmb	osh                     @ encoding: [0x53,0xf0,0x7f,0xf5]
550@ CHECK: dmb	oshst                   @ encoding: [0x52,0xf0,0x7f,0xf5]
551@ CHECK: dmb	sy                      @ encoding: [0x5f,0xf0,0x7f,0xf5]
552
553@------------------------------------------------------------------------------
554@ DSB
555@------------------------------------------------------------------------------
556        dsb sy
557        dsb st
558        dsb sh
559        dsb ish
560        dsb shst
561        dsb ishst
562        dsb un
563        dsb nsh
564        dsb unst
565        dsb nshst
566        dsb osh
567        dsb oshst
568        dsb
569
570@ CHECK: dsb	sy                      @ encoding: [0x4f,0xf0,0x7f,0xf5]
571@ CHECK: dsb	st                      @ encoding: [0x4e,0xf0,0x7f,0xf5]
572@ CHECK: dsb	ish                     @ encoding: [0x4b,0xf0,0x7f,0xf5]
573@ CHECK: dsb	ish                     @ encoding: [0x4b,0xf0,0x7f,0xf5]
574@ CHECK: dsb	ishst                   @ encoding: [0x4a,0xf0,0x7f,0xf5]
575@ CHECK: dsb	ishst                   @ encoding: [0x4a,0xf0,0x7f,0xf5]
576@ CHECK: dsb	nsh                     @ encoding: [0x47,0xf0,0x7f,0xf5]
577@ CHECK: dsb	nsh                     @ encoding: [0x47,0xf0,0x7f,0xf5]
578@ CHECK: dsb	nshst                   @ encoding: [0x46,0xf0,0x7f,0xf5]
579@ CHECK: dsb	nshst                   @ encoding: [0x46,0xf0,0x7f,0xf5]
580@ CHECK: dsb	osh                     @ encoding: [0x43,0xf0,0x7f,0xf5]
581@ CHECK: dsb	oshst                   @ encoding: [0x42,0xf0,0x7f,0xf5]
582@ CHECK: dsb	sy                      @ encoding: [0x4f,0xf0,0x7f,0xf5]
583
584@------------------------------------------------------------------------------
585@ EOR
586@------------------------------------------------------------------------------
587        eor r4, r5, #0xf000
588        eor r4, r5, r6
589        eor r4, r5, r6, lsl #5
590        eor r4, r5, r6, lsr #5
591        eor r4, r5, r6, lsr #5
592        eor r4, r5, r6, asr #5
593        eor r4, r5, r6, ror #5
594        eor r6, r7, r8, lsl r9
595        eor r6, r7, r8, lsr r9
596        eor r6, r7, r8, asr r9
597        eor r6, r7, r8, ror r9
598        eor r4, r5, r6, rrx
599
600        @ destination register is optional
601        eor r5, #0xf000
602        eor r4, r5
603        eor r4, r5, lsl #5
604        eor r4, r5, lsr #5
605        eor r4, r5, lsr #5
606        eor r4, r5, asr #5
607        eor r4, r5, ror #5
608        eor r6, r7, lsl r9
609        eor r6, r7, lsr r9
610        eor r6, r7, asr r9
611        eor r6, r7, ror r9
612        eor r4, r5, rrx
613
614@ CHECK: eor	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x25,0xe2]
615@ CHECK: eor	r4, r5, r6              @ encoding: [0x06,0x40,0x25,0xe0]
616@ CHECK: eor	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x25,0xe0]
617@ CHECK: eor	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x25,0xe0]
618@ CHECK: eor	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x25,0xe0]
619@ CHECK: eor	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x25,0xe0]
620@ CHECK: eor	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x25,0xe0]
621@ CHECK: eor	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x27,0xe0]
622@ CHECK: eor	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x27,0xe0]
623@ CHECK: eor	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x27,0xe0]
624@ CHECK: eor	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x27,0xe0]
625@ CHECK: eor	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x25,0xe0]
626
627
628@ CHECK: eor	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x25,0xe2]
629@ CHECK: eor	r4, r4, r5              @ encoding: [0x05,0x40,0x24,0xe0]
630@ CHECK: eor	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x24,0xe0]
631@ CHECK: eor	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x24,0xe0]
632@ CHECK: eor	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x24,0xe0]
633@ CHECK: eor	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x24,0xe0]
634@ CHECK: eor	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x24,0xe0]
635@ CHECK: eor	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x26,0xe0]
636@ CHECK: eor	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x26,0xe0]
637@ CHECK: eor	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x26,0xe0]
638@ CHECK: eor	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x26,0xe0]
639@ CHECK: eor	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x24,0xe0]
640
641
642@------------------------------------------------------------------------------
643@ ISB
644@------------------------------------------------------------------------------
645        isb sy
646        isb
647
648@ CHECK: isb sy                         @ encoding: [0x6f,0xf0,0x7f,0xf5]
649@ CHECK: isb sy                         @ encoding: [0x6f,0xf0,0x7f,0xf5]
650
651
652@------------------------------------------------------------------------------
653@ LDC{L}/LDC2{L}
654@------------------------------------------------------------------------------
655        ldc2 p0, c8, [r1, #4]
656        ldc2 p1, c7, [r2]
657        ldc2 p2, c6, [r3, #-224]
658        ldc2 p3, c5, [r4, #-120]!
659        ldc2 p4, c4, [r5], #16
660        ldc2 p5, c3, [r6], #-72
661        ldc2l p6, c2, [r7, #4]
662        ldc2l p7, c1, [r8]
663        ldc2l p8, c0, [r9, #-224]
664        ldc2l p9, c1, [r10, #-120]!
665        ldc2l p10, c2, [r11], #16
666        ldc2l p11, c3, [r12], #-72
667
668        ldc p12, c4, [r0, #4]
669        ldc p13, c5, [r1]
670        ldc p14, c6, [r2, #-224]
671        ldc p15, c7, [r3, #-120]!
672        ldc p5, c8, [r4], #16
673        ldc p4, c9, [r5], #-72
674        ldcl p3, c10, [r6, #4]
675        ldcl p2, c11, [r7]
676        ldcl p1, c12, [r8, #-224]
677        ldcl p0, c13, [r9, #-120]!
678        ldcl p6, c14, [r10], #16
679        ldcl p7, c15, [r11], #-72
680
681        ldclo p12, c4, [r0, #4]
682        ldchi p13, c5, [r1]
683        ldccs p14, c6, [r2, #-224]
684        ldccc p15, c7, [r3, #-120]!
685        ldceq p5, c8, [r4], #16
686        ldcgt p4, c9, [r5], #-72
687        ldcllt p3, c10, [r6, #4]
688        ldclge p2, c11, [r7]
689        ldclle p1, c12, [r8, #-224]
690        ldclne p0, c13, [r9, #-120]!
691        ldcleq p6, c14, [r10], #16
692        ldclhi p7, c15, [r11], #-72
693
694        ldc2 p2, c8, [r1], { 25 }
695
696@ CHECK: ldc2	p0, c8, [r1, #4]        @ encoding: [0x01,0x80,0x91,0xfd]
697@ CHECK: ldc2	p1, c7, [r2]            @ encoding: [0x00,0x71,0x92,0xfd]
698@ CHECK: ldc2	p2, c6, [r3, #-224]     @ encoding: [0x38,0x62,0x13,0xfd]
699@ CHECK: ldc2	p3, c5, [r4, #-120]!    @ encoding: [0x1e,0x53,0x34,0xfd]
700@ CHECK: ldc2	p4, c4, [r5], #16       @ encoding: [0x04,0x44,0xb5,0xfc]
701@ CHECK: ldc2	p5, c3, [r6], #-72      @ encoding: [0x12,0x35,0x36,0xfc]
702@ CHECK: ldc2l	p6, c2, [r7, #4]        @ encoding: [0x01,0x26,0xd7,0xfd]
703@ CHECK: ldc2l	p7, c1, [r8]            @ encoding: [0x00,0x17,0xd8,0xfd]
704@ CHECK: ldc2l	p8, c0, [r9, #-224]     @ encoding: [0x38,0x08,0x59,0xfd]
705@ CHECK: ldc2l	p9, c1, [r10, #-120]!   @ encoding: [0x1e,0x19,0x7a,0xfd]
706@ CHECK: ldc2l	p10, c2, [r11], #16     @ encoding: [0x04,0x2a,0xfb,0xfc]
707@ CHECK: ldc2l	p11, c3, [r12], #-72    @ encoding: [0x12,0x3b,0x7c,0xfc]
708
709@ CHECK: ldc	p12, c4, [r0, #4]       @ encoding: [0x01,0x4c,0x90,0xed]
710@ CHECK: ldc	p13, c5, [r1]           @ encoding: [0x00,0x5d,0x91,0xed]
711@ CHECK: ldc	p14, c6, [r2, #-224]    @ encoding: [0x38,0x6e,0x12,0xed]
712@ CHECK: ldc	p15, c7, [r3, #-120]!   @ encoding: [0x1e,0x7f,0x33,0xed]
713@ CHECK: ldc	p5, c8, [r4], #16       @ encoding: [0x04,0x85,0xb4,0xec]
714@ CHECK: ldc	p4, c9, [r5], #-72      @ encoding: [0x12,0x94,0x35,0xec]
715@ CHECK: ldcl	p3, c10, [r6, #4]       @ encoding: [0x01,0xa3,0xd6,0xed]
716@ CHECK: ldcl	p2, c11, [r7]           @ encoding: [0x00,0xb2,0xd7,0xed]
717@ CHECK: ldcl	p1, c12, [r8, #-224]    @ encoding: [0x38,0xc1,0x58,0xed]
718@ CHECK: ldcl	p0, c13, [r9, #-120]!   @ encoding: [0x1e,0xd0,0x79,0xed]
719@ CHECK: ldcl	p6, c14, [r10], #16     @ encoding: [0x04,0xe6,0xfa,0xec]
720@ CHECK: ldcl	p7, c15, [r11], #-72    @ encoding: [0x12,0xf7,0x7b,0xec]
721
722@ CHECK: ldclo	p12, c4, [r0, #4]       @ encoding: [0x01,0x4c,0x90,0x3d]
723@ CHECK: ldchi	p13, c5, [r1]           @ encoding: [0x00,0x5d,0x91,0x8d]
724@ CHECK: ldchs	p14, c6, [r2, #-224]    @ encoding: [0x38,0x6e,0x12,0x2d]
725@ CHECK: ldclo	p15, c7, [r3, #-120]!   @ encoding: [0x1e,0x7f,0x33,0x3d]
726@ CHECK: ldceq	p5, c8, [r4], #16       @ encoding: [0x04,0x85,0xb4,0x0c]
727@ CHECK: ldcgt	p4, c9, [r5], #-72      @ encoding: [0x12,0x94,0x35,0xcc]
728@ CHECK: ldcllt	p3, c10, [r6, #4]       @ encoding: [0x01,0xa3,0xd6,0xbd]
729@ CHECK: ldclge	p2, c11, [r7]           @ encoding: [0x00,0xb2,0xd7,0xad]
730@ CHECK: ldclle	p1, c12, [r8, #-224]    @ encoding: [0x38,0xc1,0x58,0xdd]
731@ CHECK: ldclne	p0, c13, [r9, #-120]!   @ encoding: [0x1e,0xd0,0x79,0x1d]
732@ CHECK: ldcleq	p6, c14, [r10], #16     @ encoding: [0x04,0xe6,0xfa,0x0c]
733@ CHECK: ldclhi	p7, c15, [r11], #-72    @ encoding: [0x12,0xf7,0x7b,0x8c]
734
735@ CHECK: ldc2	p2, c8, [r1], {25}      @ encoding: [0x19,0x82,0x91,0xfc]
736
737
738@------------------------------------------------------------------------------
739@ LDM*
740@------------------------------------------------------------------------------
741        ldm       r2, {r1,r3-r6,sp}
742        ldmia     r2, {r1,r3-r6,sp}
743        ldmib     r2, {r1,r3-r6,sp}
744        ldmda     r2, {r1,r3-r6,sp}
745        ldmdb     r2, {r1,r3-r6,sp}
746        ldmfd     r2, {r1,r3-r6,sp}
747
748        @ with update
749        ldm       r2!, {r1,r3-r6,sp}
750        ldmib     r2!, {r1,r3-r6,sp}
751        ldmda     r2!, {r1,r3-r6,sp}
752        ldmdb     r2!, {r1,r3-r6,sp}
753
754@ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
755@ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
756@ CHECK: ldmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe9]
757@ CHECK: ldmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe8]
758@ CHECK: ldmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe9]
759@ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
760
761@ CHECK: ldm   r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe8]
762@ CHECK: ldmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe9]
763@ CHECK: ldmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe8]
764@ CHECK: ldmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe9]
765
766
767@------------------------------------------------------------------------------
768@ LDREX/LDREXB/LDREXH/LDREXD
769@------------------------------------------------------------------------------
770        ldrexb  r3, [r4]
771        ldrexh  r2, [r5]
772        ldrex  r1, [r7]
773        ldrexd  r6, r7, [r8]
774
775@ CHECK: ldrexb	r3, [r4]                @ encoding: [0x9f,0x3f,0xd4,0xe1]
776@ CHECK: ldrexh	r2, [r5]                @ encoding: [0x9f,0x2f,0xf5,0xe1]
777@ CHECK: ldrex	r1, [r7]                @ encoding: [0x9f,0x1f,0x97,0xe1]
778@ CHECK: ldrexd	r6, r7, [r8]            @ encoding: [0x9f,0x6f,0xb8,0xe1]
779
780@------------------------------------------------------------------------------
781@ LDRHT
782@------------------------------------------------------------------------------
783        ldrhthi	r8, [r11], #-0
784        ldrhthi	r8, [r11], #0
785
786@ CHECK: ldrhthi r8, [r11], #-0         @ encoding: [0xb0,0x80,0x7b,0x80]
787@ CHECK: ldrhthi r8, [r11], #0          @ encoding: [0xb0,0x80,0xfb,0x80]
788
789@------------------------------------------------------------------------------
790@ FIXME: LSL
791@------------------------------------------------------------------------------
792@------------------------------------------------------------------------------
793@ FIXME: LSR
794@------------------------------------------------------------------------------
795
796@------------------------------------------------------------------------------
797@ MCR/MCR2
798@------------------------------------------------------------------------------
799        mcr  p7, #1, r5, c1, c1, #4
800        mcr2  p7, #1, r5, c1, c1, #4
801
802@ CHECK: mcr  p7, #1, r5, c1, c1, #4    @ encoding: [0x91,0x57,0x21,0xee]
803@ CHECK: mcr2  p7, #1, r5, c1, c1, #4   @ encoding: [0x91,0x57,0x21,0xfe]
804
805@------------------------------------------------------------------------------
806@ MCRR/MCRR2
807@------------------------------------------------------------------------------
808        mcrr  p7, #15, r5, r4, c1
809        mcrr2  p7, #15, r5, r4, c1
810
811@ CHECK: mcrr  p7, #15, r5, r4, c1      @ encoding: [0xf1,0x57,0x44,0xec]
812@ CHECK: mcrr2  p7, #15, r5, r4, c1     @ encoding: [0xf1,0x57,0x44,0xfc]
813
814
815@------------------------------------------------------------------------------
816@ MLA
817@------------------------------------------------------------------------------
818        mla  r1,r2,r3,r4
819        mlas r1,r2,r3,r4
820        mlane  r1,r2,r3,r4
821        mlasne r1,r2,r3,r4
822
823@ CHECK: mla 	r1, r2, r3, r4          @ encoding: [0x92,0x43,0x21,0xe0]
824@ CHECK: mlas	r1, r2, r3, r4          @ encoding: [0x92,0x43,0x31,0xe0]
825@ CHECK: mlane 	r1, r2, r3, r4          @ encoding: [0x92,0x43,0x21,0x10]
826@ CHECK: mlasne	r1, r2, r3, r4          @ encoding: [0x92,0x43,0x31,0x10]
827
828@------------------------------------------------------------------------------
829@ MLS
830@------------------------------------------------------------------------------
831        mls  r2,r5,r6,r3
832        mlsne  r2,r5,r6,r3
833
834@ CHECK: mls	r2, r5, r6, r3          @ encoding: [0x95,0x36,0x62,0xe0]
835@ CHECK: mlsne	r2, r5, r6, r3          @ encoding: [0x95,0x36,0x62,0x10]
836
837@------------------------------------------------------------------------------
838@ MOV (immediate)
839@------------------------------------------------------------------------------
840        mov r3, #7
841        mov r4, #0xff0
842        mov r5, #0xff0000
843        mov r6, #0xffff
844        movw r9, #0xffff
845        movs r3, #7
846        moveq r4, #0xff0
847        movseq r5, #0xff0000
848
849@ CHECK: mov	r3, #7                  @ encoding: [0x07,0x30,0xa0,0xe3]
850@ CHECK: mov	r4, #4080               @ encoding: [0xff,0x4e,0xa0,0xe3]
851@ CHECK: mov	r5, #16711680           @ encoding: [0xff,0x58,0xa0,0xe3]
852@ CHECK: movw	r6, #65535              @ encoding: [0xff,0x6f,0x0f,0xe3]
853@ CHECK: movw	r9, #65535              @ encoding: [0xff,0x9f,0x0f,0xe3]
854@ CHECK: movs	r3, #7                  @ encoding: [0x07,0x30,0xb0,0xe3]
855@ CHECK: moveq	r4, #4080               @ encoding: [0xff,0x4e,0xa0,0x03]
856@ CHECK: movseq	r5, #16711680           @ encoding: [0xff,0x58,0xb0,0x03]
857
858@------------------------------------------------------------------------------
859@ MOV (register)
860@------------------------------------------------------------------------------
861        mov r2, r3
862        movs r2, r3
863        moveq r2, r3
864        movseq r2, r3
865
866@ CHECK: mov	r2, r3                  @ encoding: [0x03,0x20,0xa0,0xe1]
867@ CHECK: movs	r2, r3                  @ encoding: [0x03,0x20,0xb0,0xe1]
868@ CHECK: moveq	r2, r3                  @ encoding: [0x03,0x20,0xa0,0x01]
869@ CHECK: movseq	r2, r3                  @ encoding: [0x03,0x20,0xb0,0x01]
870
871@------------------------------------------------------------------------------
872@ MOVT
873@------------------------------------------------------------------------------
874        movt r3, #7
875        movt r6, #0xffff
876        movteq r4, #0xff0
877
878@ CHECK: movt	r3, #7                  @ encoding: [0x07,0x30,0x40,0xe3]
879@ CHECK: movt	r6, #65535              @ encoding: [0xff,0x6f,0x4f,0xe3]
880@ CHECK: movteq	r4, #4080               @ encoding: [0xf0,0x4f,0x40,0x03]
881
882
883@------------------------------------------------------------------------------
884@ MRC/MRC2
885@------------------------------------------------------------------------------
886        mrc  p14, #0, r1, c1, c2, #4
887        mrc2  p14, #0, r1, c1, c2, #4
888
889@ CHECK: mrc  p14, #0, r1, c1, c2, #4   @ encoding: [0x92,0x1e,0x11,0xee]
890@ CHECK: mrc2  p14, #0, r1, c1, c2, #4  @ encoding: [0x92,0x1e,0x11,0xfe]
891
892@------------------------------------------------------------------------------
893@ MRRC/MRRC2
894@------------------------------------------------------------------------------
895        mrrc  p7, #1, r5, r4, c1
896        mrrc2  p7, #1, r5, r4, c1
897
898@ CHECK: mrrc  p7, #1, r5, r4, c1       @ encoding: [0x11,0x57,0x54,0xec]
899@ CHECK: mrrc2  p7, #1, r5, r4, c1      @ encoding: [0x11,0x57,0x54,0xfc]
900
901
902@------------------------------------------------------------------------------
903@ MRS
904@------------------------------------------------------------------------------
905        mrs  r8, apsr
906        mrs  r8, cpsr
907        mrs  r8, spsr
908@ CHECK: mrs  r8, apsr                  @ encoding: [0x00,0x80,0x0f,0xe1]
909@ CHECK: mrs  r8, apsr                  @ encoding: [0x00,0x80,0x0f,0xe1]
910@ CHECK: mrs  r8, spsr                  @ encoding: [0x00,0x80,0x4f,0xe1]
911
912
913
914@------------------------------------------------------------------------------
915@ MSR
916@------------------------------------------------------------------------------
917
918        msr  apsr, #5
919        msr  apsr_g, #5
920        msr  apsr_nzcvq, #5
921        msr  APSR_nzcvq, #5
922        msr  apsr_nzcvqg, #5
923        msr  cpsr_fc, #5
924        msr  cpsr_c, #5
925        msr  cpsr_x, #5
926        msr  cpsr_fc, #5
927        msr  cpsr_all, #5
928        msr  cpsr_fsx, #5
929        msr  spsr_fc, #5
930        msr  SPSR_fsxc, #5
931        msr  cpsr_fsxc, #5
932
933@ CHECK: msr	APSR_nzcvq, #5          @ encoding: [0x05,0xf0,0x28,0xe3]
934@ CHECK: msr	APSR_g, #5              @ encoding: [0x05,0xf0,0x24,0xe3]
935@ CHECK: msr	APSR_nzcvq, #5          @ encoding: [0x05,0xf0,0x28,0xe3]
936@ CHECK: msr	APSR_nzcvq, #5          @ encoding: [0x05,0xf0,0x28,0xe3]
937@ CHECK: msr	APSR_nzcvqg, #5         @ encoding: [0x05,0xf0,0x2c,0xe3]
938@ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
939@ CHECK: msr	CPSR_c, #5              @ encoding: [0x05,0xf0,0x21,0xe3]
940@ CHECK: msr	CPSR_x, #5              @ encoding: [0x05,0xf0,0x22,0xe3]
941@ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
942@ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
943@ CHECK: msr	CPSR_fsx, #5            @ encoding: [0x05,0xf0,0x2e,0xe3]
944@ CHECK: msr	SPSR_fc, #5             @ encoding: [0x05,0xf0,0x69,0xe3]
945@ CHECK: msr	SPSR_fsxc, #5           @ encoding: [0x05,0xf0,0x6f,0xe3]
946@ CHECK: msr	CPSR_fsxc, #5           @ encoding: [0x05,0xf0,0x2f,0xe3]
947
948        msr  apsr, r0
949        msr  apsr_g, r0
950        msr  apsr_nzcvq, r0
951        msr  APSR_nzcvq, r0
952        msr  apsr_nzcvqg, r0
953        msr  cpsr_fc, r0
954        msr  cpsr_c, r0
955        msr  cpsr_x, r0
956        msr  cpsr_fc, r0
957        msr  cpsr_all, r0
958        msr  cpsr_fsx, r0
959        msr  spsr_fc, r0
960        msr  SPSR_fsxc, r0
961        msr  cpsr_fsxc, r0
962
963@ CHECK: msr  APSR_nzcvq, r0            @ encoding: [0x00,0xf0,0x28,0xe1]
964@ CHECK: msr  APSR_g, r0                @ encoding: [0x00,0xf0,0x24,0xe1]
965@ CHECK: msr  APSR_nzcvq, r0            @ encoding: [0x00,0xf0,0x28,0xe1]
966@ CHECK: msr  APSR_nzcvq, r0            @ encoding: [0x00,0xf0,0x28,0xe1]
967@ CHECK: msr  APSR_nzcvqg, r0           @ encoding: [0x00,0xf0,0x2c,0xe1]
968@ CHECK: msr  CPSR_fc, r0               @ encoding: [0x00,0xf0,0x29,0xe1]
969@ CHECK: msr  CPSR_c, r0                @ encoding: [0x00,0xf0,0x21,0xe1]
970@ CHECK: msr  CPSR_x, r0                @ encoding: [0x00,0xf0,0x22,0xe1]
971@ CHECK: msr  CPSR_fc, r0               @ encoding: [0x00,0xf0,0x29,0xe1]
972@ CHECK: msr  CPSR_fc, r0               @ encoding: [0x00,0xf0,0x29,0xe1]
973@ CHECK: msr  CPSR_fsx, r0              @ encoding: [0x00,0xf0,0x2e,0xe1]
974@ CHECK: msr  SPSR_fc, r0               @ encoding: [0x00,0xf0,0x69,0xe1]
975@ CHECK: msr  SPSR_fsxc, r0             @ encoding: [0x00,0xf0,0x6f,0xe1]
976@ CHECK: msr  CPSR_fsxc, r0             @ encoding: [0x00,0xf0,0x2f,0xe1]
977
978@------------------------------------------------------------------------------
979@ MUL
980@------------------------------------------------------------------------------
981        mul r5, r6, r7
982        muls r5, r6, r7
983        mulgt r5, r6, r7
984        mulsle r5, r6, r7
985
986@ CHECK: mul	r5, r6, r7              @ encoding: [0x96,0x07,0x05,0xe0]
987@ CHECK: muls	r5, r6, r7              @ encoding: [0x96,0x07,0x15,0xe0]
988@ CHECK: mulgt	r5, r6, r7              @ encoding: [0x96,0x07,0x05,0xc0]
989@ CHECK: mulsle	r5, r6, r7              @ encoding: [0x96,0x07,0x15,0xd0]
990
991
992@------------------------------------------------------------------------------
993@ MVN (immediate)
994@------------------------------------------------------------------------------
995        mvn r3, #7
996        mvn r4, #0xff0
997        mvn r5, #0xff0000
998        mvns r3, #7
999        mvneq r4, #0xff0
1000        mvnseq r5, #0xff0000
1001
1002@ CHECK: mvn	r3, #7                  @ encoding: [0x07,0x30,0xe0,0xe3]
1003@ CHECK: mvn	r4, #4080               @ encoding: [0xff,0x4e,0xe0,0xe3]
1004@ CHECK: mvn	r5, #16711680           @ encoding: [0xff,0x58,0xe0,0xe3]
1005@ CHECK: mvns	r3, #7                  @ encoding: [0x07,0x30,0xf0,0xe3]
1006@ CHECK: mvneq	r4, #4080               @ encoding: [0xff,0x4e,0xe0,0x03]
1007@ CHECK: mvnseq	r5, #16711680           @ encoding: [0xff,0x58,0xf0,0x03]
1008
1009
1010@------------------------------------------------------------------------------
1011@ MVN (register)
1012@------------------------------------------------------------------------------
1013        mvn r2, r3
1014        mvns r2, r3
1015        mvn r5, r6, lsl #19
1016        mvn r5, r6, lsr #9
1017        mvn r5, r6, asr #4
1018        mvn r5, r6, ror #6
1019        mvn r5, r6, rrx
1020        mvneq r2, r3
1021        mvnseq r2, r3, lsl #10
1022
1023@ CHECK: mvn	r2, r3                  @ encoding: [0x03,0x20,0xe0,0xe1]
1024@ CHECK: mvns	r2, r3                  @ encoding: [0x03,0x20,0xf0,0xe1]
1025@ CHECK: mvn	r5, r6, lsl #19         @ encoding: [0x86,0x59,0xe0,0xe1]
1026@ CHECK: mvn	r5, r6, lsr #9          @ encoding: [0xa6,0x54,0xe0,0xe1]
1027@ CHECK: mvn	r5, r6, asr #4          @ encoding: [0x46,0x52,0xe0,0xe1]
1028@ CHECK: mvn	r5, r6, ror #6          @ encoding: [0x66,0x53,0xe0,0xe1]
1029@ CHECK: mvn	r5, r6, rrx             @ encoding: [0x66,0x50,0xe0,0xe1]
1030@ CHECK: mvneq	r2, r3                  @ encoding: [0x03,0x20,0xe0,0x01]
1031@ CHECK: mvnseq	r2, r3, lsl #10         @ encoding: [0x03,0x25,0xf0,0x01]
1032
1033
1034@------------------------------------------------------------------------------
1035@ MVN (shifted register)
1036@------------------------------------------------------------------------------
1037        mvn r5, r6, lsl r7
1038        mvns r5, r6, lsr r7
1039        mvngt r5, r6, asr r7
1040        mvnslt r5, r6, ror r7
1041
1042@ CHECK: mvn	r5, r6, lsl r7          @ encoding: [0x16,0x57,0xe0,0xe1]
1043@ CHECK: mvns	r5, r6, lsr r7          @ encoding: [0x36,0x57,0xf0,0xe1]
1044@ CHECK: mvngt	r5, r6, asr r7          @ encoding: [0x56,0x57,0xe0,0xc1]
1045@ CHECK: mvnslt	r5, r6, ror r7          @ encoding: [0x76,0x57,0xf0,0xb1]
1046
1047@------------------------------------------------------------------------------
1048@ NOP
1049@------------------------------------------------------------------------------
1050        nop
1051        nopgt
1052
1053@ CHECK: nop @ encoding: [0x00,0xf0,0x20,0xe3]
1054@ CHECK: nopgt @ encoding: [0x00,0xf0,0x20,0xc3]
1055
1056
1057@------------------------------------------------------------------------------
1058@ ORR
1059@------------------------------------------------------------------------------
1060        orr r4, r5, #0xf000
1061        orr r4, r5, r6
1062        orr r4, r5, r6, lsl #5
1063        orr r4, r5, r6, lsr #5
1064        orr r4, r5, r6, lsr #5
1065        orr r4, r5, r6, asr #5
1066        orr r4, r5, r6, ror #5
1067        orr r6, r7, r8, lsl r9
1068        orr r6, r7, r8, lsr r9
1069        orr r6, r7, r8, asr r9
1070        orr r6, r7, r8, ror r9
1071        orr r4, r5, r6, rrx
1072
1073        @ destination register is optional
1074        orr r5, #0xf000
1075        orr r4, r5
1076        orr r4, r5, lsl #5
1077        orr r4, r5, lsr #5
1078        orr r4, r5, lsr #5
1079        orr r4, r5, asr #5
1080        orr r4, r5, ror #5
1081        orr r6, r7, lsl r9
1082        orr r6, r7, lsr r9
1083        orr r6, r7, asr r9
1084        orr r6, r7, ror r9
1085        orr r4, r5, rrx
1086
1087@ CHECK: orr	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x85,0xe3]
1088@ CHECK: orr	r4, r5, r6              @ encoding: [0x06,0x40,0x85,0xe1]
1089@ CHECK: orr	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x85,0xe1]
1090@ CHECK: orr	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe1]
1091@ CHECK: orr	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe1]
1092@ CHECK: orr	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x85,0xe1]
1093@ CHECK: orr	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x85,0xe1]
1094@ CHECK: orr	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x87,0xe1]
1095@ CHECK: orr	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x87,0xe1]
1096@ CHECK: orr	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x87,0xe1]
1097@ CHECK: orr	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x87,0xe1]
1098@ CHECK: orr	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x85,0xe1]
1099
1100@ CHECK: orr	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x85,0xe3]
1101@ CHECK: orr	r4, r4, r5              @ encoding: [0x05,0x40,0x84,0xe1]
1102@ CHECK: orr	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x84,0xe1]
1103@ CHECK: orr	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe1]
1104@ CHECK: orr	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe1]
1105@ CHECK: orr	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x84,0xe1]
1106@ CHECK: orr	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x84,0xe1]
1107@ CHECK: orr	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x86,0xe1]
1108@ CHECK: orr	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x86,0xe1]
1109@ CHECK: orr	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x86,0xe1]
1110@ CHECK: orr	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x86,0xe1]
1111@ CHECK: orr	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x84,0xe1]
1112
1113        orrseq r4, r5, #0xf000
1114        orrne r4, r5, r6
1115        orrseq r4, r5, r6, lsl #5
1116        orrlo r6, r7, r8, ror r9
1117        orrshi r4, r5, r6, rrx
1118        orrcs r5, #0xf000
1119        orrseq r4, r5
1120        orrne r6, r7, asr r9
1121        orrslt r6, r7, ror r9
1122        orrsgt r4, r5, rrx
1123
1124@ CHECK: orrseq	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x95,0x03]
1125@ CHECK: orrne	r4, r5, r6              @ encoding: [0x06,0x40,0x85,0x11]
1126@ CHECK: orrseq	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x95,0x01]
1127@ CHECK: orrlo	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x87,0x31]
1128@ CHECK: orrshi	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x95,0x81]
1129@ CHECK: orrhs	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x85,0x23]
1130@ CHECK: orrseq	r4, r4, r5              @ encoding: [0x05,0x40,0x94,0x01]
1131@ CHECK: orrne	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x86,0x11]
1132@ CHECK: orrslt	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x96,0xb1]
1133@ CHECK: orrsgt	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x94,0xc1]
1134
1135@------------------------------------------------------------------------------
1136@ PKH
1137@------------------------------------------------------------------------------
1138        pkhbt r2, r2, r3
1139        pkhbt r2, r2, r3, lsl #31
1140        pkhbt r2, r2, r3, lsl #0
1141        pkhbt r2, r2, r3, lsl #15
1142
1143        pkhtb r2, r2, r3
1144        pkhtb r2, r2, r3, asr #31
1145        pkhtb r2, r2, r3, asr #15
1146
1147@ CHECK: pkhbt	r2, r2, r3              @ encoding: [0x13,0x20,0x82,0xe6]
1148@ CHECK: pkhbt	r2, r2, r3, lsl #31     @ encoding: [0x93,0x2f,0x82,0xe6]
1149@ CHECK: pkhbt	r2, r2, r3              @ encoding: [0x13,0x20,0x82,0xe6]
1150@ CHECK: pkhbt	r2, r2, r3, lsl #15     @ encoding: [0x93,0x27,0x82,0xe6]
1151
1152@ CHECK: pkhbt	r2, r2, r3              @ encoding: [0x13,0x20,0x82,0xe6]
1153@ CHECK: pkhtb	r2, r2, r3, asr #31     @ encoding: [0xd3,0x2f,0x82,0xe6]
1154@ CHECK: pkhtb	r2, r2, r3, asr #15     @ encoding: [0xd3,0x27,0x82,0xe6]
1155
1156@------------------------------------------------------------------------------
1157@ FIXME: PLD
1158@------------------------------------------------------------------------------
1159@------------------------------------------------------------------------------
1160@ FIXME: PLI
1161@------------------------------------------------------------------------------
1162
1163
1164@------------------------------------------------------------------------------
1165@ POP
1166@------------------------------------------------------------------------------
1167        pop {r7}
1168        pop {r7, r8, r9, r10}
1169
1170@ CHECK: pop	{r7}                    @ encoding: [0x04,0x70,0x9d,0xe4]
1171@ CHECK: pop	{r7, r8, r9, r10}       @ encoding: [0x80,0x07,0xbd,0xe8]
1172
1173
1174@------------------------------------------------------------------------------
1175@ PUSH
1176@------------------------------------------------------------------------------
1177        push {r7}
1178        push {r7, r8, r9, r10}
1179
1180@ CHECK: push	{r7}                    @ encoding: [0x04,0x70,0x2d,0xe5]
1181@ CHECK: push	{r7, r8, r9, r10}       @ encoding: [0x80,0x07,0x2d,0xe9]
1182
1183
1184@------------------------------------------------------------------------------
1185@ QADD/QADD16/QADD8
1186@------------------------------------------------------------------------------
1187        qadd r1, r2, r3
1188        qaddne r1, r2, r3
1189        qadd16 r1, r2, r3
1190        qadd16gt r1, r2, r3
1191        qadd8 r1, r2, r3
1192        qadd8le r1, r2, r3
1193
1194@ CHECK: qadd	r1, r2, r3              @ encoding: [0x52,0x10,0x03,0xe1]
1195@ CHECK: qaddne	r1, r2, r3              @ encoding: [0x52,0x10,0x03,0x11]
1196@ CHECK: qadd16	r1, r2, r3              @ encoding: [0x13,0x1f,0x22,0xe6]
1197@ CHECK: qadd16gt	r1, r2, r3      @ encoding: [0x13,0x1f,0x22,0xc6]
1198@ CHECK: qadd8	r1, r2, r3              @ encoding: [0x93,0x1f,0x22,0xe6]
1199@ CHECK: qadd8le r1, r2, r3             @ encoding: [0x93,0x1f,0x22,0xd6]
1200
1201
1202@------------------------------------------------------------------------------
1203@ QDADD/QDSUB
1204@------------------------------------------------------------------------------
1205        qdadd r6, r7, r8
1206        qdaddhi r6, r7, r8
1207        qdsub r6, r7, r8
1208        qdsubhi r6, r7, r8
1209
1210@ CHECK: qdadd	r6, r7, r8              @ encoding: [0x57,0x60,0x48,0xe1]
1211@ CHECK: qdaddhi r6, r7, r8             @ encoding: [0x57,0x60,0x48,0x81]
1212@ CHECK: qdsub	r6, r7, r8              @ encoding: [0x57,0x60,0x68,0xe1]
1213@ CHECK: qdsubhi r6, r7, r8             @ encoding: [0x57,0x60,0x68,0x81]
1214
1215
1216@------------------------------------------------------------------------------
1217@ QSAX
1218@------------------------------------------------------------------------------
1219        qsax r9, r12, r0
1220        qsaxeq r9, r12, r0
1221
1222@ CHECK: qsax	r9, r12, r0             @ encoding: [0x50,0x9f,0x2c,0xe6]
1223@ CHECK: qsaxeq	r9, r12, r0             @ encoding: [0x50,0x9f,0x2c,0x06]
1224
1225
1226@------------------------------------------------------------------------------
1227@ QSUB/QSUB16/QSUB8
1228@------------------------------------------------------------------------------
1229        qsub r1, r2, r3
1230        qsubne r1, r2, r3
1231        qsub16 r1, r2, r3
1232        qsub16gt r1, r2, r3
1233        qsub8 r1, r2, r3
1234        qsub8le r1, r2, r3
1235
1236@ CHECK: qsub	r1, r2, r3              @ encoding: [0x52,0x10,0x23,0xe1]
1237@ CHECK: qsubne	r1, r2, r3              @ encoding: [0x52,0x10,0x23,0x11]
1238@ CHECK: qsub16	r1, r2, r3              @ encoding: [0x73,0x1f,0x22,0xe6]
1239@ CHECK: qsub16gt	r1, r2, r3      @ encoding: [0x73,0x1f,0x22,0xc6]
1240@ CHECK: qsub8	r1, r2, r3              @ encoding: [0xf3,0x1f,0x22,0xe6]
1241@ CHECK: qsub8le r1, r2, r3             @ encoding: [0xf3,0x1f,0x22,0xd6]
1242
1243
1244@------------------------------------------------------------------------------
1245@ RBIT
1246@------------------------------------------------------------------------------
1247        rbit r1, r2
1248        rbitne r1, r2
1249
1250@ CHECK: rbit	r1, r2                  @ encoding: [0x32,0x1f,0xff,0xe6]
1251@ CHECK: rbitne	r1, r2                  @ encoding: [0x32,0x1f,0xff,0x16]
1252
1253
1254@------------------------------------------------------------------------------
1255@ REV/REV16/REVSH
1256@------------------------------------------------------------------------------
1257        rev r1, r9
1258        revne r1, r5
1259        rev16 r8, r3
1260        rev16ne r12, r4
1261        revsh r4, r9
1262        revshne r9, r1
1263
1264@ CHECK: rev	r1, r9                  @ encoding: [0x39,0x1f,0xbf,0xe6]
1265@ CHECK: revne	r1, r5                  @ encoding: [0x35,0x1f,0xbf,0x16]
1266@ CHECK: rev16	r8, r3                  @ encoding: [0xb3,0x8f,0xbf,0xe6]
1267@ CHECK: rev16ne r12, r4                @ encoding: [0xb4,0xcf,0xbf,0x16]
1268@ CHECK: revsh	r4, r9                  @ encoding: [0xb9,0x4f,0xff,0xe6]
1269@ CHECK: revshne r9, r1                 @ encoding: [0xb1,0x9f,0xff,0x16]
1270
1271
1272@------------------------------------------------------------------------------
1273@ RFE
1274@------------------------------------------------------------------------------
1275        rfeda r2
1276        rfedb r3
1277        rfeia r5
1278        rfeib r6
1279
1280        rfeda r4!
1281        rfedb r7!
1282        rfeia r9!
1283        rfeib r8!
1284
1285        rfefa r2
1286        rfeea r3
1287        rfefd r5
1288        rfeed r6
1289
1290        rfefa r4!
1291        rfeea r7!
1292        rfefd r9!
1293        rfeed r8!
1294
1295        rfe r1
1296        rfe r1!
1297
1298@ CHECK: rfeda	r2                      @ encoding: [0x00,0x0a,0x12,0xf8]
1299@ CHECK: rfedb	r3                      @ encoding: [0x00,0x0a,0x13,0xf9]
1300@ CHECK: rfeia	r5                      @ encoding: [0x00,0x0a,0x95,0xf8]
1301@ CHECK: rfeib	r6                      @ encoding: [0x00,0x0a,0x96,0xf9]
1302
1303@ CHECK: rfeda	r4!                     @ encoding: [0x00,0x0a,0x34,0xf8]
1304@ CHECK: rfedb	r7!                     @ encoding: [0x00,0x0a,0x37,0xf9]
1305@ CHECK: rfeia	r9!                     @ encoding: [0x00,0x0a,0xb9,0xf8]
1306@ CHECK: rfeib	r8!                     @ encoding: [0x00,0x0a,0xb8,0xf9]
1307
1308@ CHECK: rfeda	r2                      @ encoding: [0x00,0x0a,0x12,0xf8]
1309@ CHECK: rfedb	r3                      @ encoding: [0x00,0x0a,0x13,0xf9]
1310@ CHECK: rfeia	r5                      @ encoding: [0x00,0x0a,0x95,0xf8]
1311@ CHECK: rfeib	r6                      @ encoding: [0x00,0x0a,0x96,0xf9]
1312
1313@ CHECK: rfeda	r4!                     @ encoding: [0x00,0x0a,0x34,0xf8]
1314@ CHECK: rfedb	r7!                     @ encoding: [0x00,0x0a,0x37,0xf9]
1315@ CHECK: rfeia	r9!                     @ encoding: [0x00,0x0a,0xb9,0xf8]
1316@ CHECK: rfeib	r8!                     @ encoding: [0x00,0x0a,0xb8,0xf9]
1317
1318@ CHECK: rfeia	r1                      @ encoding: [0x00,0x0a,0x91,0xf8]
1319@ CHECK: rfeia	r1!                     @ encoding: [0x00,0x0a,0xb1,0xf8]
1320
1321
1322@------------------------------------------------------------------------------
1323@ RSB
1324@------------------------------------------------------------------------------
1325        rsb r4, r5, #0xf000
1326        rsb r4, r5, r6
1327        rsb r4, r5, r6, lsl #5
1328        rsblo r4, r5, r6, lsr #5
1329        rsb r4, r5, r6, lsr #5
1330        rsb r4, r5, r6, asr #5
1331        rsb r4, r5, r6, ror #5
1332        rsb r6, r7, r8, lsl r9
1333        rsb r6, r7, r8, lsr r9
1334        rsb r6, r7, r8, asr r9
1335        rsble r6, r7, r8, ror r9
1336        rsb r4, r5, r6, rrx
1337
1338        @ destination register is optional
1339        rsb r5, #0xf000
1340        rsb r4, r5
1341        rsb r4, r5, lsl #5
1342        rsb r4, r5, lsr #5
1343        rsbne r4, r5, lsr #5
1344        rsb r4, r5, asr #5
1345        rsb r4, r5, ror #5
1346        rsbgt r6, r7, lsl r9
1347        rsb r6, r7, lsr r9
1348        rsb r6, r7, asr r9
1349        rsb r6, r7, ror r9
1350        rsb r4, r5, rrx
1351
1352@ CHECK: rsb	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x65,0xe2]
1353@ CHECK: rsb	r4, r5, r6              @ encoding: [0x06,0x40,0x65,0xe0]
1354@ CHECK: rsb	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x65,0xe0]
1355@ CHECK: rsblo	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x65,0x30]
1356@ CHECK: rsb	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x65,0xe0]
1357@ CHECK: rsb	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x65,0xe0]
1358@ CHECK: rsb	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x65,0xe0]
1359@ CHECK: rsb	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x67,0xe0]
1360@ CHECK: rsb	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x67,0xe0]
1361@ CHECK: rsb	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x67,0xe0]
1362@ CHECK: rsble	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x67,0xd0]
1363@ CHECK: rsb	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x65,0xe0]
1364
1365@ CHECK: rsb	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x65,0xe2]
1366@ CHECK: rsb	r4, r4, r5              @ encoding: [0x05,0x40,0x64,0xe0]
1367@ CHECK: rsb	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x64,0xe0]
1368@ CHECK: rsb	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x64,0xe0]
1369@ CHECK: rsbne	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x64,0x10]
1370@ CHECK: rsb	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x64,0xe0]
1371@ CHECK: rsb	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x64,0xe0]
1372@ CHECK: rsbgt	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x66,0xc0]
1373@ CHECK: rsb	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x66,0xe0]
1374@ CHECK: rsb	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x66,0xe0]
1375@ CHECK: rsb	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x66,0xe0]
1376@ CHECK: rsb	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x64,0xe0]
1377
1378@------------------------------------------------------------------------------
1379@ RSC
1380@------------------------------------------------------------------------------
1381        rsc r4, r5, #0xf000
1382        rsc r4, r5, r6
1383        rsc r4, r5, r6, lsl #5
1384        rsclo r4, r5, r6, lsr #5
1385        rsc r4, r5, r6, lsr #5
1386        rsc r4, r5, r6, asr #5
1387        rsc r4, r5, r6, ror #5
1388        rsc r6, r7, r8, lsl r9
1389        rsc r6, r7, r8, lsr r9
1390        rsc r6, r7, r8, asr r9
1391        rscle r6, r7, r8, ror r9
1392        rscs r1, r8, #4064
1393
1394        @ destination register is optional
1395        rsc r5, #0xf000
1396        rsc r4, r5
1397        rsc r4, r5, lsl #5
1398        rsc r4, r5, lsr #5
1399        rscne r4, r5, lsr #5
1400        rsc r4, r5, asr #5
1401        rsc r4, r5, ror #5
1402        rscgt r6, r7, lsl r9
1403        rsc r6, r7, lsr r9
1404        rsc r6, r7, asr r9
1405        rsc r6, r7, ror r9
1406
1407@ CHECK: rsc	r4, r5, #61440          @ encoding: [0x0f,0x4a,0xe5,0xe2]
1408@ CHECK: rsc	r4, r5, r6              @ encoding: [0x06,0x40,0xe5,0xe0]
1409@ CHECK: rsc	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0xe5,0xe0]
1410@ CHECK: rsclo	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0xe5,0x30]
1411@ CHECK: rsc	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0xe5,0xe0]
1412@ CHECK: rsc	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0xe5,0xe0]
1413@ CHECK: rsc	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0xe5,0xe0]
1414@ CHECK: rsc	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0xe7,0xe0]
1415@ CHECK: rsc	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0xe7,0xe0]
1416@ CHECK: rsc	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0xe7,0xe0]
1417@ CHECK: rscle	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0xe7,0xd0]
1418@ CHECK: rscs	r1, r8, #4064           @ encoding: [0xfe,0x1e,0xf8,0xe2]
1419
1420@ CHECK: rsc	r5, r5, #61440          @ encoding: [0x0f,0x5a,0xe5,0xe2]
1421@ CHECK: rsc	r4, r4, r5              @ encoding: [0x05,0x40,0xe4,0xe0]
1422@ CHECK: rsc	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0xe4,0xe0]
1423@ CHECK: rsc	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0xe4,0xe0]
1424@ CHECK: rscne	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0xe4,0x10]
1425@ CHECK: rsc	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0xe4,0xe0]
1426@ CHECK: rsc	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0xe4,0xe0]
1427@ CHECK: rscgt	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0xe6,0xc0]
1428@ CHECK: rsc	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0xe6,0xe0]
1429@ CHECK: rsc	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0xe6,0xe0]
1430@ CHECK: rsc	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0xe6,0xe0]
1431
1432@------------------------------------------------------------------------------
1433@ SADD16/SADD8
1434@------------------------------------------------------------------------------
1435        sadd16 r1, r2, r3
1436        sadd16gt r1, r2, r3
1437        sadd8 r1, r2, r3
1438        sadd8le r1, r2, r3
1439
1440@ CHECK: sadd16	r1, r2, r3              @ encoding: [0x13,0x1f,0x12,0xe6]
1441@ CHECK: sadd16gt	r1, r2, r3      @ encoding: [0x13,0x1f,0x12,0xc6]
1442@ CHECK: sadd8	r1, r2, r3              @ encoding: [0x93,0x1f,0x12,0xe6]
1443@ CHECK: sadd8le r1, r2, r3             @ encoding: [0x93,0x1f,0x12,0xd6]
1444
1445
1446@------------------------------------------------------------------------------
1447@ SASX
1448@------------------------------------------------------------------------------
1449        sasx r9, r12, r0
1450        sasxeq r9, r12, r0
1451
1452@ CHECK: sasx	r9, r12, r0             @ encoding: [0x30,0x9f,0x1c,0xe6]
1453@ CHECK: sasxeq	r9, r12, r0             @ encoding: [0x30,0x9f,0x1c,0x06]
1454
1455
1456@------------------------------------------------------------------------------
1457@ SBC
1458@------------------------------------------------------------------------------
1459        sbc r4, r5, #0xf000
1460        sbc r4, r5, r6
1461        sbc r4, r5, r6, lsl #5
1462        sbc r4, r5, r6, lsr #5
1463        sbc r4, r5, r6, lsr #5
1464        sbc r4, r5, r6, asr #5
1465        sbc r4, r5, r6, ror #5
1466        sbc r6, r7, r8, lsl r9
1467        sbc r6, r7, r8, lsr r9
1468        sbc r6, r7, r8, asr r9
1469        sbc r6, r7, r8, ror r9
1470
1471        @ destination register is optional
1472        sbc r5, #0xf000
1473        sbc r4, r5
1474        sbc r4, r5, lsl #5
1475        sbc r4, r5, lsr #5
1476        sbc r4, r5, lsr #5
1477        sbc r4, r5, asr #5
1478        sbc r4, r5, ror #5
1479        sbc r6, r7, lsl r9
1480        sbc r6, r7, lsr r9
1481        sbc r6, r7, asr r9
1482        sbc r6, r7, ror r9
1483
1484@ CHECK: sbc	r4, r5, #61440          @ encoding: [0x0f,0x4a,0xc5,0xe2]
1485@ CHECK: sbc	r4, r5, r6              @ encoding: [0x06,0x40,0xc5,0xe0]
1486@ CHECK: sbc	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0xc5,0xe0]
1487@ CHECK: sbc	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0xc5,0xe0]
1488@ CHECK: sbc	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0xc5,0xe0]
1489@ CHECK: sbc	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0xc5,0xe0]
1490@ CHECK: sbc	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0xc5,0xe0]
1491@ CHECK: sbc	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0xc7,0xe0]
1492@ CHECK: sbc	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0xc7,0xe0]
1493@ CHECK: sbc	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0xc7,0xe0]
1494@ CHECK: sbc	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0xc7,0xe0]
1495
1496@ CHECK: sbc	r5, r5, #61440          @ encoding: [0x0f,0x5a,0xc5,0xe2]
1497@ CHECK: sbc	r4, r4, r5              @ encoding: [0x05,0x40,0xc4,0xe0]
1498@ CHECK: sbc	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0xc4,0xe0]
1499@ CHECK: sbc	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0xc4,0xe0]
1500@ CHECK: sbc	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0xc4,0xe0]
1501@ CHECK: sbc	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0xc4,0xe0]
1502@ CHECK: sbc	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0xc4,0xe0]
1503@ CHECK: sbc	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0xc6,0xe0]
1504@ CHECK: sbc	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0xc6,0xe0]
1505@ CHECK: sbc	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0xc6,0xe0]
1506@ CHECK: sbc	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0xc6,0xe0]
1507
1508
1509@------------------------------------------------------------------------------
1510@ SBFX
1511@------------------------------------------------------------------------------
1512        sbfx r4, r5, #16, #1
1513        sbfxgt r4, r5, #16, #16
1514
1515@ CHECK: sbfx	r4, r5, #16, #1         @ encoding: [0x55,0x48,0xa0,0xe7]
1516@ CHECK: sbfxgt	r4, r5, #16, #16        @ encoding: [0x55,0x48,0xaf,0xc7]
1517
1518
1519@------------------------------------------------------------------------------
1520@ SEL
1521@------------------------------------------------------------------------------
1522        sel r9, r2, r1
1523        selne r9, r2, r1
1524
1525@ CHECK: sel	r9, r2, r1              @ encoding: [0xb1,0x9f,0x82,0xe6]
1526@ CHECK: selne	r9, r2, r1              @ encoding: [0xb1,0x9f,0x82,0x16]
1527
1528
1529@------------------------------------------------------------------------------
1530@ SETEND
1531@------------------------------------------------------------------------------
1532        setend be
1533        setend le
1534
1535@ CHECK: setend	be                      @ encoding: [0x00,0x02,0x01,0xf1]
1536@ CHECK: setend	le                      @ encoding: [0x00,0x00,0x01,0xf1]
1537
1538
1539@------------------------------------------------------------------------------
1540@ SEV
1541@------------------------------------------------------------------------------
1542        sev
1543        seveq
1544
1545@ CHECK: sev                            @ encoding: [0x04,0xf0,0x20,0xe3]
1546@ CHECK: seveq                          @ encoding: [0x04,0xf0,0x20,0x03]
1547
1548
1549@------------------------------------------------------------------------------
1550@ SHADD16/SHADD8
1551@------------------------------------------------------------------------------
1552        shadd16 r4, r8, r2
1553        shadd16gt r4, r8, r2
1554        shadd8 r4, r8, r2
1555        shadd8gt r4, r8, r2
1556
1557@ CHECK: shadd16	r4, r8, r2      @ encoding: [0x12,0x4f,0x38,0xe6]
1558@ CHECK: shadd16gt	r4, r8, r2      @ encoding: [0x12,0x4f,0x38,0xc6]
1559@ CHECK: shadd8	r4, r8, r2              @ encoding: [0x92,0x4f,0x38,0xe6]
1560@ CHECK: shadd8gt	r4, r8, r2      @ encoding: [0x92,0x4f,0x38,0xc6]
1561
1562
1563@------------------------------------------------------------------------------
1564@ SHASX
1565@------------------------------------------------------------------------------
1566        shasx r4, r8, r2
1567        shasxgt r4, r8, r2
1568
1569@ CHECK: shasx	r4, r8, r2              @ encoding: [0x32,0x4f,0x38,0xe6]
1570@ CHECK: shasxgt r4, r8, r2             @ encoding: [0x32,0x4f,0x38,0xc6]
1571
1572
1573@------------------------------------------------------------------------------
1574@ SHSUB16/SHSUB8
1575@------------------------------------------------------------------------------
1576        shsub16 r4, r8, r2
1577        shsub16gt r4, r8, r2
1578        shsub8 r4, r8, r2
1579        shsub8gt r4, r8, r2
1580
1581@ CHECK: shsub16	r4, r8, r2      @ encoding: [0x72,0x4f,0x38,0xe6]
1582@ CHECK: shsub16gt	r4, r8, r2      @ encoding: [0x72,0x4f,0x38,0xc6]
1583@ CHECK: shsub8	r4, r8, r2              @ encoding: [0xf2,0x4f,0x38,0xe6]
1584@ CHECK: shsub8gt	r4, r8, r2      @ encoding: [0xf2,0x4f,0x38,0xc6]
1585
1586@------------------------------------------------------------------------------
1587@ SMC
1588@------------------------------------------------------------------------------
1589        smc #0xf
1590        smceq #0
1591
1592@ CHECK: smc	#15                     @ encoding: [0x7f,0x00,0x60,0xe1]
1593@ CHECK: smceq	#0                      @ encoding: [0x70,0x00,0x60,0x01]
1594
1595@------------------------------------------------------------------------------
1596@ SMLABB/SMLABT/SMLATB/SMLATT
1597@------------------------------------------------------------------------------
1598        smlabb r3, r1, r9, r0
1599        smlabt r5, r6, r4, r1
1600        smlatb r4, r2, r3, r2
1601        smlatt r8, r3, r8, r4
1602        smlabbge r3, r1, r9, r0
1603        smlabtle r5, r6, r4, r1
1604        smlatbne r4, r2, r3, r2
1605        smlatteq r8, r3, r8, r4
1606
1607@ CHECK: smlabb	r3, r1, r9, r0          @ encoding: [0x81,0x09,0x03,0xe1]
1608@ CHECK: smlabt	r5, r6, r4, r1          @ encoding: [0xc6,0x14,0x05,0xe1]
1609@ CHECK: smlatb	r4, r2, r3, r2          @ encoding: [0xa2,0x23,0x04,0xe1]
1610@ CHECK: smlatt	r8, r3, r8, r4          @ encoding: [0xe3,0x48,0x08,0xe1]
1611@ CHECK: smlabbge	r3, r1, r9, r0  @ encoding: [0x81,0x09,0x03,0xa1]
1612@ CHECK: smlabtle	r5, r6, r4, r1  @ encoding: [0xc6,0x14,0x05,0xd1]
1613@ CHECK: smlatbne	r4, r2, r3, r2  @ encoding: [0xa2,0x23,0x04,0x11]
1614@ CHECK: smlatteq	r8, r3, r8, r4  @ encoding: [0xe3,0x48,0x08,0x01]
1615
1616@------------------------------------------------------------------------------
1617@ SMLAD/SMLADX
1618@------------------------------------------------------------------------------
1619        smlad r2, r3, r5, r8
1620        smladx r2, r3, r5, r8
1621        smladeq r2, r3, r5, r8
1622        smladxhi r2, r3, r5, r8
1623
1624@ CHECK: smlad	r2, r3, r5, r8          @ encoding: [0x13,0x85,0x02,0xe7]
1625@ CHECK: smladx	r2, r3, r5, r8          @ encoding: [0x33,0x85,0x02,0xe7]
1626@ CHECK: smladeq	r2, r3, r5, r8  @ encoding: [0x13,0x85,0x02,0x07]
1627@ CHECK: smladxhi	r2, r3, r5, r8  @ encoding: [0x33,0x85,0x02,0x87]
1628
1629
1630@------------------------------------------------------------------------------
1631@ SMLAL
1632@------------------------------------------------------------------------------
1633        smlal r2, r3, r5, r8
1634        smlals r2, r3, r5, r8
1635        smlaleq r2, r3, r5, r8
1636        smlalshi r2, r3, r5, r8
1637
1638@ CHECK: smlal	r2, r3, r5, r8          @ encoding: [0x95,0x28,0xe3,0xe0]
1639@ CHECK: smlals	r2, r3, r5, r8          @ encoding: [0x95,0x28,0xf3,0xe0]
1640@ CHECK: smlaleq	r2, r3, r5, r8  @ encoding: [0x95,0x28,0xe3,0x00]
1641@ CHECK: smlalshi	r2, r3, r5, r8  @ encoding: [0x95,0x28,0xf3,0x80]
1642
1643
1644@------------------------------------------------------------------------------
1645@ SMLALBB/SMLALBT/SMLALTB/SMLALTT
1646@------------------------------------------------------------------------------
1647        smlalbb r3, r1, r9, r0
1648        smlalbt r5, r6, r4, r1
1649        smlaltb r4, r2, r3, r2
1650        smlaltt r8, r3, r8, r4
1651        smlalbbge r3, r1, r9, r0
1652        smlalbtle r5, r6, r4, r1
1653        smlaltbne r4, r2, r3, r2
1654        smlaltteq r8, r3, r8, r4
1655
1656@ CHECK: smlalbb	r3, r1, r9, r0  @ encoding: [0x89,0x30,0x41,0xe1]
1657@ CHECK: smlalbt	r5, r6, r4, r1  @ encoding: [0xc4,0x51,0x46,0xe1]
1658@ CHECK: smlaltb	r4, r2, r3, r2  @ encoding: [0xa3,0x42,0x42,0xe1]
1659@ CHECK: smlaltt	r8, r3, r8, r4  @ encoding: [0xe8,0x84,0x43,0xe1]
1660@ CHECK: smlalbbge	r3, r1, r9, r0  @ encoding: [0x89,0x30,0x41,0xa1]
1661@ CHECK: smlalbtle	r5, r6, r4, r1  @ encoding: [0xc4,0x51,0x46,0xd1]
1662@ CHECK: smlaltbne	r4, r2, r3, r2  @ encoding: [0xa3,0x42,0x42,0x11]
1663@ CHECK: smlaltteq	r8, r3, r8, r4  @ encoding: [0xe8,0x84,0x43,0x01]
1664
1665
1666@------------------------------------------------------------------------------
1667@ SMLALD/SMLALDX
1668@------------------------------------------------------------------------------
1669        smlald r2, r3, r5, r8
1670        smlaldx r2, r3, r5, r8
1671        smlaldeq r2, r3, r5, r8
1672        smlaldxhi r2, r3, r5, r8
1673
1674@ CHECK: smlald	r2, r3, r5, r8          @ encoding: [0x15,0x28,0x43,0xe7]
1675@ CHECK: smlaldx	r2, r3, r5, r8  @ encoding: [0x35,0x28,0x43,0xe7]
1676@ CHECK: smlaldeq	r2, r3, r5, r8  @ encoding: [0x15,0x28,0x43,0x07]
1677@ CHECK: smlaldxhi	r2, r3, r5, r8  @ encoding: [0x35,0x28,0x43,0x87]
1678
1679
1680@------------------------------------------------------------------------------
1681@ SMLAWB/SMLAWT
1682@------------------------------------------------------------------------------
1683        smlawb r2, r3, r10, r8
1684        smlawt r8, r3, r5, r9
1685        smlawbeq r2, r7, r5, r8
1686        smlawthi r1, r3, r0, r8
1687
1688@ CHECK: smlawb	r2, r3, r10, r8         @ encoding: [0x83,0x8a,0x22,0xe1]
1689@ CHECK: smlawt	r8, r3, r5, r9          @ encoding: [0xc3,0x95,0x28,0xe1]
1690@ CHECK: smlawbeq	r2, r7, r5, r8  @ encoding: [0x87,0x85,0x22,0x01]
1691@ CHECK: smlawthi	r1, r3, r0, r8  @ encoding: [0xc3,0x80,0x21,0x81]
1692
1693
1694@------------------------------------------------------------------------------
1695@ SMLSD/SMLSDX
1696@------------------------------------------------------------------------------
1697        smlsd r2, r3, r5, r8
1698        smlsdx r2, r3, r5, r8
1699        smlsdeq r2, r3, r5, r8
1700        smlsdxhi r2, r3, r5, r8
1701
1702@ CHECK: smlsd	r2, r3, r5, r8          @ encoding: [0x53,0x85,0x02,0xe7]
1703@ CHECK: smlsdx	r2, r3, r5, r8          @ encoding: [0x73,0x85,0x02,0xe7]
1704@ CHECK: smlsdeq	r2, r3, r5, r8  @ encoding: [0x53,0x85,0x02,0x07]
1705@ CHECK: smlsdxhi	r2, r3, r5, r8  @ encoding: [0x73,0x85,0x02,0x87]
1706
1707
1708@------------------------------------------------------------------------------
1709@ SMLSLD/SMLSLDX
1710@------------------------------------------------------------------------------
1711        smlsld r2, r9, r5, r1
1712        smlsldx r4, r11, r2, r8
1713        smlsldeq r8, r2, r5, r6
1714        smlsldxhi r1, r0, r3, r8
1715
1716@ CHECK: smlsld	r2, r9, r5, r1          @ encoding: [0x55,0x21,0x49,0xe7]
1717@ CHECK: smlsldx	r4, r11, r2, r8 @ encoding: [0x72,0x48,0x4b,0xe7]
1718@ CHECK: smlsldeq	r8, r2, r5, r6  @ encoding: [0x55,0x86,0x42,0x07]
1719@ CHECK: smlsldxhi	r1, r0, r3, r8  @ encoding: [0x73,0x18,0x40,0x87]
1720
1721
1722@------------------------------------------------------------------------------
1723@ SMMLA/SMMLAR
1724@------------------------------------------------------------------------------
1725        smmla r1, r2, r3, r4
1726        smmlar r4, r3, r2, r1
1727        smmlalo r1, r2, r3, r4
1728        smmlarcs r4, r3, r2, r1
1729
1730@ CHECK: smmla	r1, r2, r3, r4          @ encoding: [0x12,0x43,0x51,0xe7]
1731@ CHECK: smmlar	r4, r3, r2, r1          @ encoding: [0x33,0x12,0x54,0xe7]
1732@ CHECK: smmlalo	r1, r2, r3, r4  @ encoding: [0x12,0x43,0x51,0x37]
1733@ CHECK: smmlarhs	r4, r3, r2, r1  @ encoding: [0x33,0x12,0x54,0x27]
1734
1735
1736@------------------------------------------------------------------------------
1737@ SMMLS/SMMLSR
1738@------------------------------------------------------------------------------
1739        smmls r1, r2, r3, r4
1740        smmlsr r4, r3, r2, r1
1741        smmlslo r1, r2, r3, r4
1742        smmlsrcs r4, r3, r2, r1
1743
1744@ CHECK: smmls	r1, r2, r3, r4          @ encoding: [0xd2,0x43,0x51,0xe7]
1745@ CHECK: smmlsr	r4, r3, r2, r1          @ encoding: [0xf3,0x12,0x54,0xe7]
1746@ CHECK: smmlslo	r1, r2, r3, r4  @ encoding: [0xd2,0x43,0x51,0x37]
1747@ CHECK: smmlsrhs	r4, r3, r2, r1  @ encoding: [0xf3,0x12,0x54,0x27]
1748
1749
1750@------------------------------------------------------------------------------
1751@ SMMUL/SMMULR
1752@------------------------------------------------------------------------------
1753        smmul r2, r3, r4
1754        smmulr r3, r2, r1
1755        smmulcc r2, r3, r4
1756        smmulrhs r3, r2, r1
1757
1758@ CHECK: smmul	r2, r3, r4              @ encoding: [0x13,0xf4,0x52,0xe7]
1759@ CHECK: smmulr	r3, r2, r1              @ encoding: [0x32,0xf1,0x53,0xe7]
1760@ CHECK: smmullo	r2, r3, r4      @ encoding: [0x13,0xf4,0x52,0x37]
1761@ CHECK: smmulrhs	r3, r2, r1      @ encoding: [0x32,0xf1,0x53,0x27]
1762
1763
1764@------------------------------------------------------------------------------
1765@ SMUAD/SMUADX
1766@------------------------------------------------------------------------------
1767        smuad r2, r3, r4
1768        smuadx r3, r2, r1
1769        smuadlt r2, r3, r4
1770        smuadxge r3, r2, r1
1771
1772@ CHECK: smuad	r2, r3, r4              @ encoding: [0x13,0xf4,0x02,0xe7]
1773@ CHECK: smuadx	r3, r2, r1              @ encoding: [0x32,0xf1,0x03,0xe7]
1774@ CHECK: smuadlt	r2, r3, r4      @ encoding: [0x13,0xf4,0x02,0xb7]
1775@ CHECK: smuadxge	r3, r2, r1      @ encoding: [0x32,0xf1,0x03,0xa7]
1776
1777
1778@------------------------------------------------------------------------------
1779@ SMULBB/SMULBT/SMULTB/SMULTT
1780@------------------------------------------------------------------------------
1781        smulbb r3, r9, r0
1782        smulbt r5, r4, r1
1783        smultb r4, r2, r2
1784        smultt r8, r3, r4
1785        smulbbge r1, r9, r0
1786        smulbtle r5, r6, r4
1787        smultbne r2, r3, r2
1788        smultteq r8, r3, r4
1789
1790@ CHECK: smulbb	r3, r9, r0              @ encoding: [0x89,0x00,0x63,0xe1]
1791@ CHECK: smulbt	r5, r4, r1              @ encoding: [0xc4,0x01,0x65,0xe1]
1792@ CHECK: smultb	r4, r2, r2              @ encoding: [0xa2,0x02,0x64,0xe1]
1793@ CHECK: smultt	r8, r3, r4              @ encoding: [0xe3,0x04,0x68,0xe1]
1794@ CHECK: smulbbge	r1, r9, r0      @ encoding: [0x89,0x00,0x61,0xa1]
1795@ CHECK: smulbtle	r5, r6, r4      @ encoding: [0xc6,0x04,0x65,0xd1]
1796@ CHECK: smultbne	r2, r3, r2      @ encoding: [0xa3,0x02,0x62,0x11]
1797@ CHECK: smultteq	r8, r3, r4      @ encoding: [0xe3,0x04,0x68,0x01]
1798
1799
1800@------------------------------------------------------------------------------
1801@ SMULL
1802@------------------------------------------------------------------------------
1803        smull r3, r9, r0, r1
1804        smulls r3, r9, r0, r2
1805        smulleq r8, r3, r4, r5
1806        smullseq r8, r3, r4, r3
1807
1808@ CHECK: smull	r3, r9, r0, r1          @ encoding: [0x90,0x31,0xc9,0xe0]
1809@ CHECK: smulls	r3, r9, r0, r2          @ encoding: [0x90,0x32,0xd9,0xe0]
1810@ CHECK: smulleq	r8, r3, r4, r5  @ encoding: [0x94,0x85,0xc3,0x00]
1811@ CHECK: smullseq	r8, r3, r4, r3  @ encoding: [0x94,0x83,0xd3,0x00]
1812
1813
1814@------------------------------------------------------------------------------
1815@ SMULWB/SMULWT
1816@------------------------------------------------------------------------------
1817        smulwb r3, r9, r0
1818        smulwt r3, r9, r2
1819
1820@ CHECK: smulwb	r3, r9, r0              @ encoding: [0xa9,0x00,0x23,0xe1]
1821@ CHECK: smulwt	r3, r9, r2              @ encoding: [0xe9,0x02,0x23,0xe1]
1822
1823
1824@------------------------------------------------------------------------------
1825@ SMUSD/SMUSDX
1826@------------------------------------------------------------------------------
1827        smusd r3, r0, r1
1828        smusdx r3, r9, r2
1829        smusdeq r8, r3, r2
1830        smusdxne r7, r4, r3
1831
1832@ CHECK: smusd	r3, r0, r1              @ encoding: [0x50,0xf1,0x03,0xe7]
1833@ CHECK: smusdx	r3, r9, r2              @ encoding: [0x79,0xf2,0x03,0xe7]
1834@ CHECK: smusdeq	r8, r3, r2      @ encoding: [0x53,0xf2,0x08,0x07]
1835@ CHECK: smusdxne	r7, r4, r3      @ encoding: [0x74,0xf3,0x07,0x17]
1836
1837
1838@------------------------------------------------------------------------------
1839@ SRS
1840@------------------------------------------------------------------------------
1841        srsda sp, #5
1842        srsdb sp, #1
1843        srsia sp, #0
1844        srsib sp, #15
1845
1846        srsda sp!, #31
1847        srsdb sp!, #19
1848        srsia sp!, #2
1849        srsib sp!, #14
1850
1851        srsfa sp, #11
1852        srsea sp, #10
1853        srsfd sp, #9
1854        srsed sp, #5
1855
1856        srsfa sp!, #5
1857        srsea sp!, #5
1858        srsfd sp!, #5
1859        srsed sp!, #5
1860
1861        srs sp, #5
1862        srs sp!, #5
1863
1864@ CHECK: srsda	sp, #5                  @ encoding: [0x05,0x05,0x4d,0xf8]
1865@ CHECK: srsdb	sp, #1                  @ encoding: [0x01,0x05,0x4d,0xf9]
1866@ CHECK: srsia	sp, #0                  @ encoding: [0x00,0x05,0xcd,0xf8]
1867@ CHECK: srsib	sp, #15                 @ encoding: [0x0f,0x05,0xcd,0xf9]
1868
1869@ CHECK: srsda	sp!, #31                @ encoding: [0x1f,0x05,0x6d,0xf8]
1870@ CHECK: srsdb	sp!, #19                @ encoding: [0x13,0x05,0x6d,0xf9]
1871@ CHECK: srsia	sp!, #2                 @ encoding: [0x02,0x05,0xed,0xf8]
1872@ CHECK: srsib	sp!, #14                @ encoding: [0x0e,0x05,0xed,0xf9]
1873
1874@ CHECK: srsda	sp, #11                 @ encoding: [0x0b,0x05,0x4d,0xf8]
1875@ CHECK: srsdb	sp, #10                 @ encoding: [0x0a,0x05,0x4d,0xf9]
1876@ CHECK: srsia	sp, #9                  @ encoding: [0x09,0x05,0xcd,0xf8]
1877@ CHECK: srsib	sp, #5                  @ encoding: [0x05,0x05,0xcd,0xf9]
1878
1879@ CHECK: srsda	sp!, #5                 @ encoding: [0x05,0x05,0x6d,0xf8]
1880@ CHECK: srsdb	sp!, #5                 @ encoding: [0x05,0x05,0x6d,0xf9]
1881@ CHECK: srsia	sp!, #5                 @ encoding: [0x05,0x05,0xed,0xf8]
1882@ CHECK: srsib	sp!, #5                 @ encoding: [0x05,0x05,0xed,0xf9]
1883
1884@ CHECK: srsia	sp, #5                  @ encoding: [0x05,0x05,0xcd,0xf8]
1885@ CHECK: srsia	sp!, #5                 @ encoding: [0x05,0x05,0xed,0xf8]
1886
1887
1888@------------------------------------------------------------------------------
1889@ SSAT
1890@------------------------------------------------------------------------------
1891        ssat	r8, #1, r10
1892        ssat	r8, #1, r10, lsl #0
1893        ssat	r8, #1, r10, lsl #31
1894        ssat	r8, #1, r10, asr #32
1895        ssat	r8, #1, r10, asr #1
1896
1897@ CHECK: ssat	r8, #1, r10             @ encoding: [0x1a,0x80,0xa0,0xe6]
1898@ CHECK: ssat	r8, #1, r10             @ encoding: [0x1a,0x80,0xa0,0xe6]
1899@ CHECK: ssat	r8, #1, r10, lsl #31    @ encoding: [0x9a,0x8f,0xa0,0xe6]
1900@ CHECK: ssat	r8, #1, r10, asr #32    @ encoding: [0x5a,0x80,0xa0,0xe6]
1901@ CHECK: ssat	r8, #1, r10, asr #1     @ encoding: [0xda,0x80,0xa0,0xe6]
1902
1903
1904@------------------------------------------------------------------------------
1905@ SSAT16
1906@------------------------------------------------------------------------------
1907        ssat16	r2, #1, r7
1908        ssat16	r3, #16, r5
1909
1910@ CHECK: ssat16	r2, #1, r7              @ encoding: [0x37,0x2f,0xa0,0xe6]
1911@ CHECK: ssat16	r3, #16, r5             @ encoding: [0x35,0x3f,0xaf,0xe6]
1912
1913
1914@------------------------------------------------------------------------------
1915@ SSAX
1916@------------------------------------------------------------------------------
1917        ssax r2, r3, r4
1918        ssaxlt r2, r3, r4
1919
1920@ CHECK: ssax	r2, r3, r4              @ encoding: [0x54,0x2f,0x13,0xe6]
1921@ CHECK: ssaxlt	r2, r3, r4              @ encoding: [0x54,0x2f,0x13,0xb6]
1922
1923@------------------------------------------------------------------------------
1924@ SSUB16/SSUB8
1925@------------------------------------------------------------------------------
1926        ssub16 r1, r0, r6
1927        ssub16ne r5, r3, r2
1928        ssub8 r9, r2, r4
1929        ssub8eq r5, r1, r2
1930
1931@ CHECK: ssub16	r1, r0, r6              @ encoding: [0x76,0x1f,0x10,0xe6]
1932@ CHECK: ssub16ne	r5, r3, r2      @ encoding: [0x72,0x5f,0x13,0x16]
1933@ CHECK: ssub8	r9, r2, r4              @ encoding: [0xf4,0x9f,0x12,0xe6]
1934@ CHECK: ssub8eq	r5, r1, r2      @ encoding: [0xf2,0x5f,0x11,0x06]
1935
1936@------------------------------------------------------------------------------
1937@ STC{L}/STC2{L}
1938@------------------------------------------------------------------------------
1939        stc2 p0, c8, [r1, #4]
1940        stc2 p1, c7, [r2]
1941        stc2 p2, c6, [r3, #-224]
1942        stc2 p3, c5, [r4, #-120]!
1943        stc2 p4, c4, [r5], #16
1944        stc2 p5, c3, [r6], #-72
1945        stc2l p6, c2, [r7, #4]
1946        stc2l p7, c1, [r8]
1947        stc2l p8, c0, [r9, #-224]
1948        stc2l p9, c1, [r10, #-120]!
1949        stc2l p10, c2, [r11], #16
1950        stc2l p11, c3, [r12], #-72
1951
1952        stc p12, c4, [r0, #4]
1953        stc p13, c5, [r1]
1954        stc p14, c6, [r2, #-224]
1955        stc p15, c7, [r3, #-120]!
1956        stc p5, c8, [r4], #16
1957        stc p4, c9, [r5], #-72
1958        stcl p3, c10, [r6, #4]
1959        stcl p2, c11, [r7]
1960        stcl p1, c12, [r8, #-224]
1961        stcl p0, c13, [r9, #-120]!
1962        stcl p6, c14, [r10], #16
1963        stcl p7, c15, [r11], #-72
1964
1965        stclo p12, c4, [r0, #4]
1966        stchi p13, c5, [r1]
1967        stccs p14, c6, [r2, #-224]
1968        stccc p15, c7, [r3, #-120]!
1969        stceq p5, c8, [r4], #16
1970        stcgt p4, c9, [r5], #-72
1971        stcllt p3, c10, [r6, #4]
1972        stclge p2, c11, [r7]
1973        stclle p1, c12, [r8, #-224]
1974        stclne p0, c13, [r9, #-120]!
1975        stcleq p6, c14, [r10], #16
1976        stclhi p7, c15, [r11], #-72
1977
1978        stc2 p2, c8, [r1], { 25 }
1979
1980@ CHECK: stc2	p0, c8, [r1, #4]        @ encoding: [0x01,0x80,0x81,0xfd]
1981@ CHECK: stc2	p1, c7, [r2]            @ encoding: [0x00,0x71,0x82,0xfd]
1982@ CHECK: stc2	p2, c6, [r3, #-224]     @ encoding: [0x38,0x62,0x03,0xfd]
1983@ CHECK: stc2	p3, c5, [r4, #-120]!    @ encoding: [0x1e,0x53,0x24,0xfd]
1984@ CHECK: stc2	p4, c4, [r5], #16       @ encoding: [0x04,0x44,0xa5,0xfc]
1985@ CHECK: stc2	p5, c3, [r6], #-72      @ encoding: [0x12,0x35,0x26,0xfc]
1986@ CHECK: stc2l	p6, c2, [r7, #4]        @ encoding: [0x01,0x26,0xc7,0xfd]
1987@ CHECK: stc2l	p7, c1, [r8]            @ encoding: [0x00,0x17,0xc8,0xfd]
1988@ CHECK: stc2l	p8, c0, [r9, #-224]     @ encoding: [0x38,0x08,0x49,0xfd]
1989@ CHECK: stc2l	p9, c1, [r10, #-120]!   @ encoding: [0x1e,0x19,0x6a,0xfd]
1990@ CHECK: stc2l	p10, c2, [r11], #16     @ encoding: [0x04,0x2a,0xeb,0xfc]
1991@ CHECK: stc2l	p11, c3, [r12], #-72    @ encoding: [0x12,0x3b,0x6c,0xfc]
1992
1993@ CHECK: stc	p12, c4, [r0, #4]       @ encoding: [0x01,0x4c,0x80,0xed]
1994@ CHECK: stc	p13, c5, [r1]           @ encoding: [0x00,0x5d,0x81,0xed]
1995@ CHECK: stc	p14, c6, [r2, #-224]    @ encoding: [0x38,0x6e,0x02,0xed]
1996@ CHECK: stc	p15, c7, [r3, #-120]!   @ encoding: [0x1e,0x7f,0x23,0xed]
1997@ CHECK: stc	p5, c8, [r4], #16       @ encoding: [0x04,0x85,0xa4,0xec]
1998@ CHECK: stc	p4, c9, [r5], #-72      @ encoding: [0x12,0x94,0x25,0xec]
1999@ CHECK: stcl	p3, c10, [r6, #4]       @ encoding: [0x01,0xa3,0xc6,0xed]
2000@ CHECK: stcl	p2, c11, [r7]           @ encoding: [0x00,0xb2,0xc7,0xed]
2001@ CHECK: stcl	p1, c12, [r8, #-224]    @ encoding: [0x38,0xc1,0x48,0xed]
2002@ CHECK: stcl	p0, c13, [r9, #-120]!   @ encoding: [0x1e,0xd0,0x69,0xed]
2003@ CHECK: stcl	p6, c14, [r10], #16     @ encoding: [0x04,0xe6,0xea,0xec]
2004@ CHECK: stcl	p7, c15, [r11], #-72    @ encoding: [0x12,0xf7,0x6b,0xec]
2005
2006@ CHECK: stclo	p12, c4, [r0, #4]       @ encoding: [0x01,0x4c,0x80,0x3d]
2007@ CHECK: stchi	p13, c5, [r1]           @ encoding: [0x00,0x5d,0x81,0x8d]
2008@ CHECK: stchs	p14, c6, [r2, #-224]    @ encoding: [0x38,0x6e,0x02,0x2d]
2009@ CHECK: stclo	p15, c7, [r3, #-120]!   @ encoding: [0x1e,0x7f,0x23,0x3d]
2010@ CHECK: stceq	p5, c8, [r4], #16       @ encoding: [0x04,0x85,0xa4,0x0c]
2011@ CHECK: stcgt	p4, c9, [r5], #-72      @ encoding: [0x12,0x94,0x25,0xcc]
2012@ CHECK: stcllt	p3, c10, [r6, #4]       @ encoding: [0x01,0xa3,0xc6,0xbd]
2013@ CHECK: stclge	p2, c11, [r7]           @ encoding: [0x00,0xb2,0xc7,0xad]
2014@ CHECK: stclle	p1, c12, [r8, #-224]    @ encoding: [0x38,0xc1,0x48,0xdd]
2015@ CHECK: stclne	p0, c13, [r9, #-120]!   @ encoding: [0x1e,0xd0,0x69,0x1d]
2016@ CHECK: stcleq	p6, c14, [r10], #16     @ encoding: [0x04,0xe6,0xea,0x0c]
2017@ CHECK: stclhi	p7, c15, [r11], #-72    @ encoding: [0x12,0xf7,0x6b,0x8c]
2018
2019@ CHECK: stc2	p2, c8, [r1], {25}      @ encoding: [0x19,0x82,0x81,0xfc]
2020
2021
2022@------------------------------------------------------------------------------
2023@ STM*
2024@------------------------------------------------------------------------------
2025        stm       r2, {r1,r3-r6,sp}
2026        stmia     r3, {r1,r3-r6,lr}
2027        stmib     r4, {r1,r3-r6,sp}
2028        stmda     r5, {r1,r3-r6,sp}
2029        stmdb     r6, {r1,r3-r6,r8}
2030        stmfd     sp, {r1,r3-r6,sp}
2031
2032        @ with update
2033        stm       r8!, {r1,r3-r6,sp}
2034        stmib     r9!, {r1,r3-r6,sp}
2035        stmda     sp!, {r1,r3-r6}
2036        stmdb     r0!, {r1,r5,r7,sp}
2037
2038@ CHECK: stm	r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8]
2039@ CHECK: stm	r3, {lr, r1, r3, r4, r5, r6} @ encoding: [0x7a,0x40,0x83,0xe8]
2040@ CHECK: stmib	r4, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x84,0xe9]
2041@ CHECK: stmda	r5, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x05,0xe8]
2042@ CHECK: stmdb	r6, {r1, r3, r4, r5, r6, r8} @ encoding: [0x7a,0x01,0x06,0xe9]
2043@ CHECK: stmdb	sp, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x0d,0xe9]
2044
2045@ CHECK: stm	r8!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa8,0xe8]
2046@ CHECK: stmib	r9!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa9,0xe9]
2047@ CHECK: stmda	sp!, {r1, r3, r4, r5, r6}     @ encoding: [0x7a,0x00,0x2d,0xe8]
2048@ CHECK: stmdb	r0!, {r1, r5, r7, sp}         @ encoding: [0xa2,0x20,0x20,0xe9]
2049
2050
2051@------------------------------------------------------------------------------
2052@ STREX/STREXB/STREXH/STREXD
2053@------------------------------------------------------------------------------
2054        strexb  r1, r3, [r4]
2055        strexh  r4, r2, [r5]
2056        strex  r2, r1, [r7]
2057        strexd  r6, r2, r3, [r8]
2058
2059@ CHECK: strexb	r1, r3, [r4]            @ encoding: [0x93,0x1f,0xc4,0xe1]
2060@ CHECK: strexh	r4, r2, [r5]            @ encoding: [0x92,0x4f,0xe5,0xe1]
2061@ CHECK: strex	r2, r1, [r7]            @ encoding: [0x91,0x2f,0x87,0xe1]
2062@ CHECK: strexd	r6, r2, r3, [r8]        @ encoding: [0x92,0x6f,0xa8,0xe1]
2063
2064@------------------------------------------------------------------------------
2065@ STR
2066@------------------------------------------------------------------------------
2067        strpl	r3, [r10, #-0]!
2068        strpl	r3, [r10, #0]!
2069
2070@ CHECK: strpl	r3, [r10, #-0]!         @ encoding: [0x00,0x30,0x2a,0x55]
2071@ CHECK: strpl	r3, [r10]!              @ encoding: [0x00,0x30,0xaa,0x55]
2072
2073@------------------------------------------------------------------------------
2074@ SUB
2075@------------------------------------------------------------------------------
2076        sub r4, r5, #0xf000
2077        sub r4, r5, r6
2078        sub r4, r5, r6, lsl #5
2079        sub r4, r5, r6, lsr #5
2080        sub r4, r5, r6, lsr #5
2081        sub r4, r5, r6, asr #5
2082        sub r4, r5, r6, ror #5
2083        sub r6, r7, r8, lsl r9
2084        sub r6, r7, r8, lsr r9
2085        sub r6, r7, r8, asr r9
2086        sub r6, r7, r8, ror r9
2087
2088        @ destination register is optional
2089        sub r5, #0xf000
2090        sub r4, r5
2091        sub r4, r5, lsl #5
2092        sub r4, r5, lsr #5
2093        sub r4, r5, lsr #5
2094        sub r4, r5, asr #5
2095        sub r4, r5, ror #5
2096        sub r6, r7, lsl r9
2097        sub r6, r7, lsr r9
2098        sub r6, r7, asr r9
2099        sub r6, r7, ror r9
2100
2101@ CHECK: sub	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x45,0xe2]
2102@ CHECK: sub	r4, r5, r6              @ encoding: [0x06,0x40,0x45,0xe0]
2103@ CHECK: sub	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x45,0xe0]
2104@ CHECK: sub	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x45,0xe0]
2105@ CHECK: sub	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x45,0xe0]
2106@ CHECK: sub	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x45,0xe0]
2107@ CHECK: sub	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x45,0xe0]
2108@ CHECK: sub	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x47,0xe0]
2109@ CHECK: sub	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x47,0xe0]
2110@ CHECK: sub	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x47,0xe0]
2111@ CHECK: sub	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x47,0xe0]
2112
2113
2114@ CHECK: sub	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x45,0xe2]
2115@ CHECK: sub	r4, r4, r5              @ encoding: [0x05,0x40,0x44,0xe0]
2116@ CHECK: sub	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x44,0xe0]
2117@ CHECK: sub	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x44,0xe0]
2118@ CHECK: sub	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x44,0xe0]
2119@ CHECK: sub	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x44,0xe0]
2120@ CHECK: sub	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x44,0xe0]
2121@ CHECK: sub	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x46,0xe0]
2122@ CHECK: sub	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x46,0xe0]
2123@ CHECK: sub	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x46,0xe0]
2124@ CHECK: sub	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x46,0xe0]
2125
2126
2127@------------------------------------------------------------------------------
2128@ SVC
2129@------------------------------------------------------------------------------
2130        svc #16
2131        svc #0
2132        svc #0xffffff
2133
2134@ CHECK: svc	#16                     @ encoding: [0x10,0x00,0x00,0xef]
2135@ CHECK: svc	#0                      @ encoding: [0x00,0x00,0x00,0xef]
2136@ CHECK: svc	#16777215               @ encoding: [0xff,0xff,0xff,0xef]
2137
2138
2139@------------------------------------------------------------------------------
2140@ SWP/SWPB
2141@------------------------------------------------------------------------------
2142        swp r1, r2, [r3]
2143        swp r4, r4, [r6]
2144        swpb r5, r1, [r9]
2145
2146@ CHECK: swp	r1, r2, [r3]            @ encoding: [0x92,0x10,0x03,0xe1]
2147@ CHECK: swp	r4, r4, [r6]            @ encoding: [0x94,0x40,0x06,0xe1]
2148@ CHECK: swpb	r5, r1, [r9]            @ encoding: [0x91,0x50,0x49,0xe1]
2149
2150
2151@------------------------------------------------------------------------------
2152@ SXTAB
2153@------------------------------------------------------------------------------
2154        sxtab r2, r3, r4
2155        sxtab r4, r5, r6, ror #0
2156        sxtablt r6, r2, r9, ror #8
2157        sxtab r5, r1, r4, ror #16
2158        sxtab r7, r8, r3, ror #24
2159
2160@ CHECK: sxtab	r2, r3, r4              @ encoding: [0x74,0x20,0xa3,0xe6]
2161@ CHECK: sxtab	r4, r5, r6              @ encoding: [0x76,0x40,0xa5,0xe6]
2162@ CHECK: sxtablt r6, r2, r9, ror #8     @ encoding: [0x79,0x64,0xa2,0xb6]
2163@ CHECK: sxtab	r5, r1, r4, ror #16     @ encoding: [0x74,0x58,0xa1,0xe6]
2164@ CHECK: sxtab	r7, r8, r3, ror #24     @ encoding: [0x73,0x7c,0xa8,0xe6]
2165
2166
2167@------------------------------------------------------------------------------
2168@ SXTAB16
2169@------------------------------------------------------------------------------
2170        sxtab16ge r0, r1, r4
2171        sxtab16 r6, r2, r7, ror #0
2172        sxtab16 r3, r5, r8, ror #8
2173        sxtab16 r3, r2, r1, ror #16
2174        sxtab16eq r1, r2, r3, ror #24
2175
2176@ CHECK: sxtab16ge	r0, r1, r4      @ encoding: [0x74,0x00,0x81,0xa6]
2177@ CHECK: sxtab16	r6, r2, r7      @ encoding: [0x77,0x60,0x82,0xe6]
2178@ CHECK: sxtab16 r3, r5, r8, ror #8     @ encoding: [0x78,0x34,0x85,0xe6]
2179@ CHECK: sxtab16 r3, r2, r1, ror #16    @ encoding: [0x71,0x38,0x82,0xe6]
2180@ CHECK: sxtab16eq r1, r2, r3, ror #24  @ encoding: [0x73,0x1c,0x82,0x06]
2181
2182@------------------------------------------------------------------------------
2183@ SXTAH
2184@------------------------------------------------------------------------------
2185        sxtah r1, r3, r9
2186        sxtahhi r6, r1, r6, ror #0
2187        sxtah r3, r8, r3, ror #8
2188        sxtahlo r2, r2, r4, ror #16
2189        sxtah r9, r3, r3, ror #24
2190
2191@ CHECK: sxtah	r1, r3, r9              @ encoding: [0x79,0x10,0xb3,0xe6]
2192@ CHECK: sxtahhi	r6, r1, r6      @ encoding: [0x76,0x60,0xb1,0x86]
2193@ CHECK: sxtah	r3, r8, r3, ror #8      @ encoding: [0x73,0x34,0xb8,0xe6]
2194@ CHECK: sxtahlo r2, r2, r4, ror #16    @ encoding: [0x74,0x28,0xb2,0x36]
2195@ CHECK: sxtah	r9, r3, r3, ror #24     @ encoding: [0x73,0x9c,0xb3,0xe6]
2196
2197@------------------------------------------------------------------------------
2198@ SXTB
2199@------------------------------------------------------------------------------
2200        sxtbge r2, r4
2201        sxtb r5, r6, ror #0
2202        sxtb r6, r9, ror #8
2203        sxtbcc r5, r1, ror #16
2204        sxtb r8, r3, ror #24
2205
2206@ CHECK: sxtbge	r2, r4                  @ encoding: [0x74,0x20,0xaf,0xa6]
2207@ CHECK: sxtb	r5, r6                  @ encoding: [0x76,0x50,0xaf,0xe6]
2208@ CHECK: sxtb	r6, r9, ror #8          @ encoding: [0x79,0x64,0xaf,0xe6]
2209@ CHECK: sxtblo	r5, r1, ror #16         @ encoding: [0x71,0x58,0xaf,0x36]
2210@ CHECK: sxtb	r8, r3, ror #24         @ encoding: [0x73,0x8c,0xaf,0xe6]
2211
2212
2213@------------------------------------------------------------------------------
2214@ SXTB16
2215@------------------------------------------------------------------------------
2216        sxtb16 r1, r4
2217        sxtb16 r6, r7, ror #0
2218        sxtb16cs r3, r5, ror #8
2219        sxtb16 r3, r1, ror #16
2220        sxtb16ge r2, r3, ror #24
2221
2222@ CHECK: sxtb16	r1, r4                  @ encoding: [0x74,0x10,0x8f,0xe6]
2223@ CHECK: sxtb16	r6, r7                  @ encoding: [0x77,0x60,0x8f,0xe6]
2224@ CHECK: sxtb16hs	r3, r5, ror #8  @ encoding: [0x75,0x34,0x8f,0x26]
2225@ CHECK: sxtb16	r3, r1, ror #16         @ encoding: [0x71,0x38,0x8f,0xe6]
2226@ CHECK: sxtb16ge	r2, r3, ror #24 @ encoding: [0x73,0x2c,0x8f,0xa6]
2227
2228
2229@------------------------------------------------------------------------------
2230@ SXTH
2231@------------------------------------------------------------------------------
2232        sxthne r3, r9
2233        sxth r1, r6, ror #0
2234        sxth r3, r8, ror #8
2235        sxthle r2, r2, ror #16
2236        sxth r9, r3, ror #24
2237
2238@ CHECK: sxthne	r3, r9                  @ encoding: [0x79,0x30,0xbf,0x16]
2239@ CHECK: sxth	r1, r6                  @ encoding: [0x76,0x10,0xbf,0xe6]
2240@ CHECK: sxth	r3, r8, ror #8          @ encoding: [0x78,0x34,0xbf,0xe6]
2241@ CHECK: sxthle	r2, r2, ror #16         @ encoding: [0x72,0x28,0xbf,0xd6]
2242@ CHECK: sxth	r9, r3, ror #24         @ encoding: [0x73,0x9c,0xbf,0xe6]
2243
2244
2245@------------------------------------------------------------------------------
2246@ TEQ
2247@------------------------------------------------------------------------------
2248        teq r5, #0xf000
2249        teq r4, r5
2250        teq r4, r5, lsl #5
2251        teq r4, r5, lsr #5
2252        teq r4, r5, lsr #5
2253        teq r4, r5, asr #5
2254        teq r4, r5, ror #5
2255        teq r6, r7, lsl r9
2256        teq r6, r7, lsr r9
2257        teq r6, r7, asr r9
2258        teq r6, r7, ror r9
2259
2260@ CHECK: teq	r5, #61440              @ encoding: [0x0f,0x0a,0x35,0xe3]
2261@ CHECK: teq	r4, r5                  @ encoding: [0x05,0x00,0x34,0xe1]
2262@ CHECK: teq	r4, r5, lsl #5          @ encoding: [0x85,0x02,0x34,0xe1]
2263@ CHECK: teq	r4, r5, lsr #5          @ encoding: [0xa5,0x02,0x34,0xe1]
2264@ CHECK: teq	r4, r5, lsr #5          @ encoding: [0xa5,0x02,0x34,0xe1]
2265@ CHECK: teq	r4, r5, asr #5          @ encoding: [0xc5,0x02,0x34,0xe1]
2266@ CHECK: teq	r4, r5, ror #5          @ encoding: [0xe5,0x02,0x34,0xe1]
2267@ CHECK: teq	r6, r7, lsl r9          @ encoding: [0x17,0x09,0x36,0xe1]
2268@ CHECK: teq	r6, r7, lsr r9          @ encoding: [0x37,0x09,0x36,0xe1]
2269@ CHECK: teq	r6, r7, asr r9          @ encoding: [0x57,0x09,0x36,0xe1]
2270@ CHECK: teq	r6, r7, ror r9          @ encoding: [0x77,0x09,0x36,0xe1]
2271
2272
2273@------------------------------------------------------------------------------
2274@ TST
2275@------------------------------------------------------------------------------
2276        tst r5, #0xf000
2277        tst r4, r5
2278        tst r4, r5, lsl #5
2279        tst r4, r5, lsr #5
2280        tst r4, r5, lsr #5
2281        tst r4, r5, asr #5
2282        tst r4, r5, ror #5
2283        tst r6, r7, lsl r9
2284        tst r6, r7, lsr r9
2285        tst r6, r7, asr r9
2286        tst r6, r7, ror r9
2287
2288@ CHECK: tst	r5, #61440              @ encoding: [0x0f,0x0a,0x15,0xe3]
2289@ CHECK: tst	r4, r5                  @ encoding: [0x05,0x00,0x14,0xe1]
2290@ CHECK: tst	r4, r5, lsl #5          @ encoding: [0x85,0x02,0x14,0xe1]
2291@ CHECK: tst	r4, r5, lsr #5          @ encoding: [0xa5,0x02,0x14,0xe1]
2292@ CHECK: tst	r4, r5, lsr #5          @ encoding: [0xa5,0x02,0x14,0xe1]
2293@ CHECK: tst	r4, r5, asr #5          @ encoding: [0xc5,0x02,0x14,0xe1]
2294@ CHECK: tst	r4, r5, ror #5          @ encoding: [0xe5,0x02,0x14,0xe1]
2295@ CHECK: tst	r6, r7, lsl r9          @ encoding: [0x17,0x09,0x16,0xe1]
2296@ CHECK: tst	r6, r7, lsr r9          @ encoding: [0x37,0x09,0x16,0xe1]
2297@ CHECK: tst	r6, r7, asr r9          @ encoding: [0x57,0x09,0x16,0xe1]
2298@ CHECK: tst	r6, r7, ror r9          @ encoding: [0x77,0x09,0x16,0xe1]
2299
2300
2301@------------------------------------------------------------------------------
2302@ UADD16/UADD8
2303@------------------------------------------------------------------------------
2304        uadd16 r1, r2, r3
2305        uadd16gt r1, r2, r3
2306        uadd8 r1, r2, r3
2307        uadd8le r1, r2, r3
2308
2309@ CHECK: uadd16	r1, r2, r3              @ encoding: [0x13,0x1f,0x52,0xe6]
2310@ CHECK: uadd16gt	r1, r2, r3      @ encoding: [0x13,0x1f,0x52,0xc6]
2311@ CHECK: uadd8	r1, r2, r3              @ encoding: [0x93,0x1f,0x52,0xe6]
2312@ CHECK: uadd8le r1, r2, r3             @ encoding: [0x93,0x1f,0x52,0xd6]
2313
2314
2315@------------------------------------------------------------------------------
2316@ UASX
2317@------------------------------------------------------------------------------
2318        uasx r9, r12, r0
2319        uasxeq r9, r12, r0
2320
2321@ CHECK: uasx	r9, r12, r0             @ encoding: [0x30,0x9f,0x5c,0xe6]
2322@ CHECK: uasxeq	r9, r12, r0             @ encoding: [0x30,0x9f,0x5c,0x06]
2323
2324
2325@------------------------------------------------------------------------------
2326@ UBFX
2327@------------------------------------------------------------------------------
2328        ubfx r4, r5, #16, #1
2329        ubfxgt r4, r5, #16, #16
2330
2331@ CHECK: ubfx	r4, r5, #16, #1         @ encoding: [0x55,0x48,0xe0,0xe7]
2332@ CHECK: ubfxgt	r4, r5, #16, #16        @ encoding: [0x55,0x48,0xef,0xc7]
2333
2334
2335@------------------------------------------------------------------------------
2336@ UHADD16/UHADD8
2337@------------------------------------------------------------------------------
2338        uhadd16 r4, r8, r2
2339        uhadd16gt r4, r8, r2
2340        uhadd8 r4, r8, r2
2341        uhadd8gt r4, r8, r2
2342
2343@ CHECK: uhadd16	r4, r8, r2      @ encoding: [0x12,0x4f,0x78,0xe6]
2344@ CHECK: uhadd16gt	r4, r8, r2      @ encoding: [0x12,0x4f,0x78,0xc6]
2345@ CHECK: uhadd8	r4, r8, r2              @ encoding: [0x92,0x4f,0x78,0xe6]
2346@ CHECK: uhadd8gt	r4, r8, r2      @ encoding: [0x92,0x4f,0x78,0xc6]
2347
2348
2349@------------------------------------------------------------------------------
2350@ UHASX
2351@------------------------------------------------------------------------------
2352        uhasx r4, r8, r2
2353        uhasxgt r4, r8, r2
2354
2355@ CHECK: uhasx	r4, r8, r2              @ encoding: [0x32,0x4f,0x78,0xe6]
2356@ CHECK: uhasxgt r4, r8, r2             @ encoding: [0x32,0x4f,0x78,0xc6]
2357
2358
2359@------------------------------------------------------------------------------
2360@ UHSUB16/UHSUB8
2361@------------------------------------------------------------------------------
2362        uhsub16 r4, r8, r2
2363        uhsub16gt r4, r8, r2
2364        uhsub8 r4, r8, r2
2365        uhsub8gt r4, r8, r2
2366
2367@ CHECK: uhsub16	r4, r8, r2      @ encoding: [0x72,0x4f,0x78,0xe6]
2368@ CHECK: uhsub16gt	r4, r8, r2      @ encoding: [0x72,0x4f,0x78,0xc6]
2369@ CHECK: uhsub8	r4, r8, r2              @ encoding: [0xf2,0x4f,0x78,0xe6]
2370@ CHECK: uhsub8gt	r4, r8, r2      @ encoding: [0xf2,0x4f,0x78,0xc6]
2371
2372
2373@------------------------------------------------------------------------------
2374@ UMAAL
2375@------------------------------------------------------------------------------
2376        umaal r3, r4, r5, r6
2377        umaallt r3, r4, r5, r6
2378
2379@ CHECK: umaal	r3, r4, r5, r6          @ encoding: [0x95,0x36,0x44,0xe0]
2380@ CHECK: umaallt	r3, r4, r5, r6  @ encoding: [0x95,0x36,0x44,0xb0]
2381
2382
2383@------------------------------------------------------------------------------
2384@ UMLAL
2385@------------------------------------------------------------------------------
2386        umlal r2, r4, r6, r8
2387        umlalgt r6, r1, r2, r6
2388        umlals r2, r9, r2, r3
2389        umlalseq r3, r5, r1, r2
2390
2391@ CHECK: umlal	r2, r4, r6, r8          @ encoding: [0x96,0x28,0xa4,0xe0]
2392@ CHECK: umlalgt	r6, r1, r2, r6  @ encoding: [0x92,0x66,0xa1,0xc0]
2393@ CHECK: umlals	r2, r9, r2, r3          @ encoding: [0x92,0x23,0xb9,0xe0]
2394@ CHECK: umlalseq	r3, r5, r1, r2  @ encoding: [0x91,0x32,0xb5,0x00]
2395
2396
2397@------------------------------------------------------------------------------
2398@ UMULL
2399@------------------------------------------------------------------------------
2400        umull r2, r4, r6, r8
2401        umullgt r6, r1, r2, r6
2402        umulls r2, r9, r2, r3
2403        umullseq r3, r5, r1, r2
2404
2405@ CHECK: umull	r2, r4, r6, r8          @ encoding: [0x96,0x28,0x84,0xe0]
2406@ CHECK: umullgt	r6, r1, r2, r6  @ encoding: [0x92,0x66,0x81,0xc0]
2407@ CHECK: umulls	r2, r9, r2, r3          @ encoding: [0x92,0x23,0x99,0xe0]
2408@ CHECK: umullseq	r3, r5, r1, r2  @ encoding: [0x91,0x32,0x95,0x00]
2409
2410
2411@------------------------------------------------------------------------------
2412@ UQADD16/UQADD8
2413@------------------------------------------------------------------------------
2414        uqadd16 r1, r2, r3
2415        uqadd16gt r4, r7, r9
2416        uqadd8 r3, r4, r8
2417        uqadd8le r8, r1, r2
2418
2419
2420@ CHECK: uqadd16	r1, r2, r3      @ encoding: [0x13,0x1f,0x62,0xe6]
2421@ CHECK: uqadd16gt	r4, r7, r9      @ encoding: [0x19,0x4f,0x67,0xc6]
2422@ CHECK: uqadd8	r3, r4, r8              @ encoding: [0x98,0x3f,0x64,0xe6]
2423@ CHECK: uqadd8le	r8, r1, r2      @ encoding: [0x92,0x8f,0x61,0xd6]
2424
2425
2426@------------------------------------------------------------------------------
2427@ UQASX
2428@------------------------------------------------------------------------------
2429        uqasx r2, r4, r1
2430        uqasxhi r5, r2, r9
2431
2432@ CHECK: uqasx	r2, r4, r1              @ encoding: [0x31,0x2f,0x64,0xe6]
2433@ CHECK: uqasxhi	r5, r2, r9      @ encoding: [0x39,0x5f,0x62,0x86]
2434
2435
2436@------------------------------------------------------------------------------
2437@ UQSAX
2438@------------------------------------------------------------------------------
2439        uqsax r1, r3, r7
2440        uqsaxal r3, r6, r2
2441
2442@ CHECK: uqsax	r1, r3, r7              @ encoding: [0x57,0x1f,0x63,0xe6]
2443@ CHECK: uqsax	r3, r6, r2              @ encoding: [0x52,0x3f,0x66,0xe6]
2444
2445
2446@------------------------------------------------------------------------------
2447@ UQSUB16/UQSUB8
2448@------------------------------------------------------------------------------
2449        uqsub16 r1, r5, r3
2450        uqsub16gt r3, r2, r5
2451        uqsub8 r2, r1, r4
2452        uqsub8le r4, r6, r9
2453
2454@ CHECK: uqsub16	r1, r5, r3      @ encoding: [0x73,0x1f,0x65,0xe6]
2455@ CHECK: uqsub16gt	r3, r2, r5      @ encoding: [0x75,0x3f,0x62,0xc6]
2456@ CHECK: uqsub8	r2, r1, r4              @ encoding: [0xf4,0x2f,0x61,0xe6]
2457@ CHECK: uqsub8le	r4, r6, r9      @ encoding: [0xf9,0x4f,0x66,0xd6]
2458
2459
2460@------------------------------------------------------------------------------
2461@ USADA8/USAD8
2462@------------------------------------------------------------------------------
2463        usad8 r2, r1, r4
2464        usad8le r4, r6, r9
2465        usada8 r1, r5, r3, r7
2466        usada8gt r3, r2, r5, r1
2467
2468@ CHECK: usad8	r2, r1, r4              @ encoding: [0x11,0xf4,0x82,0xe7]
2469@ CHECK: usad8le	r4, r6, r9      @ encoding: [0x16,0xf9,0x84,0xd7]
2470@ CHECK: usada8	r1, r5, r3, r7          @ encoding: [0x15,0x73,0x81,0xe7]
2471@ CHECK: usada8gt	r3, r2, r5, r1  @ encoding: [0x12,0x15,0x83,0xc7]
2472
2473
2474@------------------------------------------------------------------------------
2475@ USAT
2476@------------------------------------------------------------------------------
2477        usat	r8, #1, r10
2478        usat	r8, #4, r10, lsl #0
2479        usat	r8, #5, r10, lsl #31
2480        usat	r8, #31, r10, asr #32
2481        usat	r8, #16, r10, asr #1
2482
2483@ CHECK: usat	r8, #1, r10             @ encoding: [0x1a,0x80,0xe1,0xe6]
2484@ CHECK: usat	r8, #4, r10             @ encoding: [0x1a,0x80,0xe4,0xe6]
2485@ CHECK: usat	r8, #5, r10, lsl #31    @ encoding: [0x9a,0x8f,0xe5,0xe6]
2486@ CHECK: usat	r8, #31, r10, asr #32   @ encoding: [0x5a,0x80,0xff,0xe6]
2487@ CHECK: usat	r8, #16, r10, asr #1    @ encoding: [0xda,0x80,0xf0,0xe6]
2488
2489
2490@------------------------------------------------------------------------------
2491@ USAT16
2492@------------------------------------------------------------------------------
2493        usat16	r2, #2, r7
2494        usat16	r3, #15, r5
2495
2496@ CHECK: usat16	r2, #2, r7              @ encoding: [0x37,0x2f,0xe2,0xe6]
2497@ CHECK: usat16	r3, #15, r5             @ encoding: [0x35,0x3f,0xef,0xe6]
2498
2499
2500@------------------------------------------------------------------------------
2501@ USAX
2502@------------------------------------------------------------------------------
2503        usax r2, r3, r4
2504        usaxne r2, r3, r4
2505
2506@ CHECK: usax	r2, r3, r4              @ encoding: [0x54,0x2f,0x53,0xe6]
2507@ CHECK: usaxne	r2, r3, r4              @ encoding: [0x54,0x2f,0x53,0x16]
2508
2509@------------------------------------------------------------------------------
2510@ USUB16/USUB8
2511@------------------------------------------------------------------------------
2512        usub16 r4, r2, r7
2513        usub16hi r1, r1, r3
2514        usub8 r1, r8, r5
2515        usub8le r9, r2, r3
2516
2517@ CHECK: usub16	r4, r2, r7              @ encoding: [0x77,0x4f,0x52,0xe6]
2518@ CHECK: usub16hi	r1, r1, r3      @ encoding: [0x73,0x1f,0x51,0x86]
2519@ CHECK: usub8	r1, r8, r5              @ encoding: [0xf5,0x1f,0x58,0xe6]
2520@ CHECK: usub8le	r9, r2, r3      @ encoding: [0xf3,0x9f,0x52,0xd6]
2521
2522
2523@------------------------------------------------------------------------------
2524@ UXTAB
2525@------------------------------------------------------------------------------
2526        uxtab r2, r3, r4
2527        uxtab r4, r5, r6, ror #0
2528        uxtablt r6, r2, r9, ror #8
2529        uxtab r5, r1, r4, ror #16
2530        uxtab r7, r8, r3, ror #24
2531
2532@ CHECK: uxtab	r2, r3, r4              @ encoding: [0x74,0x20,0xe3,0xe6]
2533@ CHECK: uxtab	r4, r5, r6              @ encoding: [0x76,0x40,0xe5,0xe6]
2534@ CHECK: uxtablt r6, r2, r9, ror #8     @ encoding: [0x79,0x64,0xe2,0xb6]
2535@ CHECK: uxtab	r5, r1, r4, ror #16     @ encoding: [0x74,0x58,0xe1,0xe6]
2536@ CHECK: uxtab	r7, r8, r3, ror #24     @ encoding: [0x73,0x7c,0xe8,0xe6]
2537
2538
2539@------------------------------------------------------------------------------
2540@ UXTAB16
2541@------------------------------------------------------------------------------
2542        uxtab16ge r0, r1, r4
2543        uxtab16 r6, r2, r7, ror #0
2544        uxtab16 r3, r5, r8, ror #8
2545        uxtab16 r3, r2, r1, ror #16
2546        uxtab16eq r1, r2, r3, ror #24
2547
2548@ CHECK: uxtab16ge	r0, r1, r4      @ encoding: [0x74,0x00,0xc1,0xa6]
2549@ CHECK: uxtab16	r6, r2, r7      @ encoding: [0x77,0x60,0xc2,0xe6]
2550@ CHECK: uxtab16	r3, r5, r8, ror #8 @ encoding: [0x78,0x34,0xc5,0xe6]
2551@ CHECK: uxtab16	r3, r2, r1, ror #16 @ encoding: [0x71,0x38,0xc2,0xe6]
2552@ CHECK: uxtab16eq	r1, r2, r3, ror #24 @ encoding: [0x73,0x1c,0xc2,0x06]
2553
2554
2555@------------------------------------------------------------------------------
2556@ UXTAH
2557@------------------------------------------------------------------------------
2558        uxtah r1, r3, r9
2559        uxtahhi r6, r1, r6, ror #0
2560        uxtah r3, r8, r3, ror #8
2561        uxtahlo r2, r2, r4, ror #16
2562        uxtah r9, r3, r3, ror #24
2563
2564@ CHECK: uxtah	r1, r3, r9              @ encoding: [0x79,0x10,0xf3,0xe6]
2565@ CHECK: uxtahhi	r6, r1, r6      @ encoding: [0x76,0x60,0xf1,0x86]
2566@ CHECK: uxtah	r3, r8, r3, ror #8      @ encoding: [0x73,0x34,0xf8,0xe6]
2567@ CHECK: uxtahlo	r2, r2, r4, ror #16 @ encoding: [0x74,0x28,0xf2,0x36]
2568@ CHECK: uxtah	r9, r3, r3, ror #24     @ encoding: [0x73,0x9c,0xf3,0xe6]
2569
2570@------------------------------------------------------------------------------
2571@ UXTB
2572@------------------------------------------------------------------------------
2573        uxtbge r2, r4
2574        uxtb r5, r6, ror #0
2575        uxtb r6, r9, ror #8
2576        uxtbcc r5, r1, ror #16
2577        uxtb r8, r3, ror #24
2578
2579@ CHECK: uxtbge	r2, r4                  @ encoding: [0x74,0x20,0xef,0xa6]
2580@ CHECK: uxtb	r5, r6                  @ encoding: [0x76,0x50,0xef,0xe6]
2581@ CHECK: uxtb	r6, r9, ror #8          @ encoding: [0x79,0x64,0xef,0xe6]
2582@ CHECK: uxtblo	r5, r1, ror #16         @ encoding: [0x71,0x58,0xef,0x36]
2583@ CHECK: uxtb	r8, r3, ror #24         @ encoding: [0x73,0x8c,0xef,0xe6]
2584
2585
2586@------------------------------------------------------------------------------
2587@ UXTB16
2588@------------------------------------------------------------------------------
2589        uxtb16 r1, r4
2590        uxtb16 r6, r7, ror #0
2591        uxtb16cs r3, r5, ror #8
2592        uxtb16 r3, r1, ror #16
2593        uxtb16ge r2, r3, ror #24
2594
2595@ CHECK: uxtb16	r1, r4                  @ encoding: [0x74,0x10,0xcf,0xe6]
2596@ CHECK: uxtb16	r6, r7                  @ encoding: [0x77,0x60,0xcf,0xe6]
2597@ CHECK: uxtb16hs	r3, r5, ror #8  @ encoding: [0x75,0x34,0xcf,0x26]
2598@ CHECK: uxtb16	r3, r1, ror #16         @ encoding: [0x71,0x38,0xcf,0xe6]
2599@ CHECK: uxtb16ge	r2, r3, ror #24 @ encoding: [0x73,0x2c,0xcf,0xa6]
2600
2601
2602@------------------------------------------------------------------------------
2603@ UXTH
2604@------------------------------------------------------------------------------
2605        uxthne r3, r9
2606        uxth r1, r6, ror #0
2607        uxth r3, r8, ror #8
2608        uxthle r2, r2, ror #16
2609        uxth r9, r3, ror #24
2610
2611@ CHECK: uxthne	r3, r9                  @ encoding: [0x79,0x30,0xff,0x16]
2612@ CHECK: uxth	r1, r6                  @ encoding: [0x76,0x10,0xff,0xe6]
2613@ CHECK: uxth	r3, r8, ror #8          @ encoding: [0x78,0x34,0xff,0xe6]
2614@ CHECK: uxthle	r2, r2, ror #16         @ encoding: [0x72,0x28,0xff,0xd6]
2615@ CHECK: uxth	r9, r3, ror #24         @ encoding: [0x73,0x9c,0xff,0xe6]
2616
2617
2618@------------------------------------------------------------------------------
2619@ WFE/WFI/YIELD
2620@------------------------------------------------------------------------------
2621        wfe
2622        wfehi
2623        wfi
2624        wfilt
2625        yield
2626        yieldne
2627
2628@ CHECK: wfe @ encoding: [0x02,0xf0,0x20,0xe3]
2629@ CHECK: wfehi @ encoding: [0x02,0xf0,0x20,0x83]
2630@ CHECK: wfi @ encoding: [0x03,0xf0,0x20,0xe3]
2631@ CHECK: wfilt @ encoding: [0x03,0xf0,0x20,0xb3]
2632@ CHECK: yield @ encoding: [0x01,0xf0,0x20,0xe3]
2633@ CHECK: yieldne @ encoding: [0x01,0xf0,0x20,0x13]
2634