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