Home | History | Annotate | Download | only in ARM
      1 @ RUN: llvm-mc -triple=armv7-apple-darwin -show-encoding < %s | FileCheck %s
      2   .syntax unified
      3   .globl _func
      4 
      5 @ Check that the assembler can handle the documented syntax from the ARM ARM.
      6 @ For complex constructs like shifter operands, check more thoroughly for them
      7 @ once then spot check that following instructions accept the form generally.
      8 @ This gives us good coverage while keeping the overall size of the test
      9 @ more reasonable.
     10 
     11 _func:
     12 @ CHECK: _func
     13 
     14 @------------------------------------------------------------------------------
     15 @ ADC (immediate)
     16 @------------------------------------------------------------------------------
     17   adc r1, r2, #0xf
     18   adc r1, r2, #0xf0
     19   adc r1, r2, #0xf00
     20   adc r1, r2, #0xf000
     21   adc r1, r2, #0xf0000
     22   adc r1, r2, #0xf00000
     23   adc r1, r2, #0xf000000
     24   adc r1, r2, #0xf0000000
     25   adc r1, r2, #0xf000000f
     26   adcs r1, r2, #0xf00
     27   adcseq r1, r2, #0xf00
     28   adceq r1, r2, #0xf00
     29 
     30 @ CHECK: adc	r1, r2, #15             @ encoding: [0x0f,0x10,0xa2,0xe2]
     31 @ CHECK: adc	r1, r2, #240            @ encoding: [0xf0,0x10,0xa2,0xe2]
     32 @ CHECK: adc	r1, r2, #3840           @ encoding: [0x0f,0x1c,0xa2,0xe2]
     33 @ CHECK: adc	r1, r2, #61440          @ encoding: [0x0f,0x1a,0xa2,0xe2]
     34 @ CHECK: adc	r1, r2, #983040         @ encoding: [0x0f,0x18,0xa2,0xe2]
     35 @ CHECK: adc	r1, r2, #15728640       @ encoding: [0x0f,0x16,0xa2,0xe2]
     36 @ CHECK: adc	r1, r2, #251658240      @ encoding: [0x0f,0x14,0xa2,0xe2]
     37 @ CHECK: adc	r1, r2, #4026531840     @ encoding: [0x0f,0x12,0xa2,0xe2]
     38 @ CHECK: adc	r1, r2, #4026531855     @ encoding: [0xff,0x12,0xa2,0xe2]
     39 
     40 @ CHECK: adcs	r1, r2, #3840           @ encoding: [0x0f,0x1c,0xb2,0xe2]
     41 @ CHECK: adcseq	r1, r2, #3840           @ encoding: [0x0f,0x1c,0xb2,0x02]
     42 @ CHECK: adceq	r1, r2, #3840           @ encoding: [0x0f,0x1c,0xa2,0x02]
     43 
     44 @------------------------------------------------------------------------------
     45 @ ADC (register)
     46 @ ADC (shifted register)
     47 @------------------------------------------------------------------------------
     48   adc r4, r5, r6
     49   @ Constant shifts
     50   adc r4, r5, r6, lsl #1
     51   adc r4, r5, r6, lsl #31
     52   adc r4, r5, r6, lsr #1
     53   adc r4, r5, r6, lsr #31
     54   adc r4, r5, r6, lsr #32
     55   adc r4, r5, r6, asr #1
     56   adc r4, r5, r6, asr #31
     57   adc r4, r5, r6, asr #32
     58   adc r4, r5, r6, ror #1
     59   adc r4, r5, r6, ror #31
     60 
     61   @ Register shifts
     62   adc r6, r7, r8, lsl r9
     63   adc r6, r7, r8, lsr r9
     64   adc r6, r7, r8, asr r9
     65   adc r6, r7, r8, ror r9
     66   adc r4, r5, r6, rrx
     67 
     68   @ Destination register is optional
     69   adc r5, r6
     70   adc r4, r5, lsl #1
     71   adc r4, r5, lsl #31
     72   adc r4, r5, lsr #1
     73   adc r4, r5, lsr #31
     74   adc r4, r5, lsr #32
     75   adc r4, r5, asr #1
     76   adc r4, r5, asr #31
     77   adc r4, r5, asr #32
     78   adc r4, r5, ror #1
     79   adc r4, r5, ror #31
     80   adc r4, r5, rrx
     81   adc r6, r7, lsl r9
     82   adc r6, r7, lsr r9
     83   adc r6, r7, asr r9
     84   adc r6, r7, ror r9
     85   adc r4, r5, rrx
     86 
     87 @ CHECK: adc	r4, r5, r6              @ encoding: [0x06,0x40,0xa5,0xe0]
     88 
     89 @ CHECK: adc	r4, r5, r6, lsl #1      @ encoding: [0x86,0x40,0xa5,0xe0]
     90 @ CHECK: adc	r4, r5, r6, lsl #31     @ encoding: [0x86,0x4f,0xa5,0xe0]
     91 @ CHECK: adc	r4, r5, r6, lsr #1      @ encoding: [0xa6,0x40,0xa5,0xe0]
     92 @ CHECK: adc	r4, r5, r6, lsr #31     @ encoding: [0xa6,0x4f,0xa5,0xe0]
     93 @ CHECK: adc	r4, r5, r6, lsr #32     @ encoding: [0x26,0x40,0xa5,0xe0]
     94 @ CHECK: adc	r4, r5, r6, asr #1      @ encoding: [0xc6,0x40,0xa5,0xe0]
     95 @ CHECK: adc	r4, r5, r6, asr #31     @ encoding: [0xc6,0x4f,0xa5,0xe0]
     96 @ CHECK: adc	r4, r5, r6, asr #32     @ encoding: [0x46,0x40,0xa5,0xe0]
     97 @ CHECK: adc	r4, r5, r6, ror #1      @ encoding: [0xe6,0x40,0xa5,0xe0]
     98 @ CHECK: adc	r4, r5, r6, ror #31     @ encoding: [0xe6,0x4f,0xa5,0xe0]
     99 
    100 @ CHECK: adc	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0xa7,0xe0]
    101 @ CHECK: adc	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0xa7,0xe0]
    102 @ CHECK: adc	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0xa7,0xe0]
    103 @ CHECK: adc	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0xa7,0xe0]
    104 @ CHECK: adc	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0xa5,0xe0]
    105 
    106 @ CHECK: adc	r5, r5, r6              @ encoding: [0x06,0x50,0xa5,0xe0]
    107 @ CHECK: adc	r4, r4, r5, lsl #1      @ encoding: [0x85,0x40,0xa4,0xe0]
    108 @ CHECK: adc	r4, r4, r5, lsl #31     @ encoding: [0x85,0x4f,0xa4,0xe0]
    109 @ CHECK: adc	r4, r4, r5, lsr #1      @ encoding: [0xa5,0x40,0xa4,0xe0]
    110 @ CHECK: adc	r4, r4, r5, lsr #31     @ encoding: [0xa5,0x4f,0xa4,0xe0]
    111 @ CHECK: adc	r4, r4, r5, lsr #32     @ encoding: [0x25,0x40,0xa4,0xe0]
    112 @ CHECK: adc	r4, r4, r5, asr #1      @ encoding: [0xc5,0x40,0xa4,0xe0]
    113 @ CHECK: adc	r4, r4, r5, asr #31     @ encoding: [0xc5,0x4f,0xa4,0xe0]
    114 @ CHECK: adc	r4, r4, r5, asr #32     @ encoding: [0x45,0x40,0xa4,0xe0]
    115 @ CHECK: adc	r4, r4, r5, ror #1      @ encoding: [0xe5,0x40,0xa4,0xe0]
    116 @ CHECK: adc	r4, r4, r5, ror #31     @ encoding: [0xe5,0x4f,0xa4,0xe0]
    117 @ CHECK: adc	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0xa4,0xe0]
    118 @ CHECK: adc	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0xa6,0xe0]
    119 @ CHECK: adc	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0xa6,0xe0]
    120 @ CHECK: adc	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0xa6,0xe0]
    121 @ CHECK: adc	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0xa6,0xe0]
    122 @ CHECK: adc	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0xa4,0xe0]
    123 
    124 
    125 @------------------------------------------------------------------------------
    126 @ FIXME: ADR
    127 @------------------------------------------------------------------------------
    128 
    129 @------------------------------------------------------------------------------
    130 @ ADD
    131 @------------------------------------------------------------------------------
    132   add r4, r5, #0xf000
    133   add r4, r5, r6
    134   add r4, r5, r6, lsl #5
    135   add r4, r5, r6, lsr #5
    136   add r4, r5, r6, lsr #5
    137   add r4, r5, r6, asr #5
    138   add r4, r5, r6, ror #5
    139   add r6, r7, r8, lsl r9
    140   add r6, r7, r8, lsr r9
    141   add r6, r7, r8, asr r9
    142   add r6, r7, r8, ror r9
    143   add r4, r5, r6, rrx
    144 
    145   @ destination register is optional
    146   add r5, #0xf000
    147   add r4, r5
    148   add r4, r5, lsl #5
    149   add r4, r5, lsr #5
    150   add r4, r5, lsr #5
    151   add r4, r5, asr #5
    152   add r4, r5, ror #5
    153   add r6, r7, lsl r9
    154   add r6, r7, lsr r9
    155   add r6, r7, asr r9
    156   add r6, r7, ror r9
    157   add r4, r5, rrx
    158 
    159 @ CHECK: add	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x85,0xe2]
    160 @ CHECK: add	r4, r5, r6              @ encoding: [0x06,0x40,0x85,0xe0]
    161 @ CHECK: add	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x85,0xe0]
    162 @ CHECK: add	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe0]
    163 @ CHECK: add	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x85,0xe0]
    164 @ CHECK: add	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x85,0xe0]
    165 @ CHECK: add	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x85,0xe0]
    166 @ CHECK: add	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x87,0xe0]
    167 @ CHECK: add	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x87,0xe0]
    168 @ CHECK: add	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x87,0xe0]
    169 @ CHECK: add	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x87,0xe0]
    170 @ CHECK: add	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x85,0xe0]
    171 
    172 
    173 @ CHECK: add	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x85,0xe2]
    174 @ CHECK: add	r4, r4, r5              @ encoding: [0x05,0x40,0x84,0xe0]
    175 @ CHECK: add	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x84,0xe0]
    176 @ CHECK: add	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe0]
    177 @ CHECK: add	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x84,0xe0]
    178 @ CHECK: add	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x84,0xe0]
    179 @ CHECK: add	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x84,0xe0]
    180 @ CHECK: add	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x86,0xe0]
    181 @ CHECK: add	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x86,0xe0]
    182 @ CHECK: add	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x86,0xe0]
    183 @ CHECK: add	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x86,0xe0]
    184 @ CHECK: add	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x84,0xe0]
    185 
    186 
    187 @------------------------------------------------------------------------------
    188 @ AND
    189 @------------------------------------------------------------------------------
    190   and r10, r1, #0xf
    191   and r10, r1, r6
    192   and r10, r1, r6, lsl #10
    193   and r10, r1, r6, lsr #10
    194   and r10, r1, r6, lsr #10
    195   and r10, r1, r6, asr #10
    196   and r10, r1, r6, ror #10
    197   and r6, r7, r8, lsl r2
    198   and r6, r7, r8, lsr r2
    199   and r6, r7, r8, asr r2
    200   and r6, r7, r8, ror r2
    201   and r10, r1, r6, rrx
    202 
    203   @ destination register is optional
    204   and r1, #0xf
    205   and r10, r1
    206   and r10, r1, lsl #10
    207   and r10, r1, lsr #10
    208   and r10, r1, lsr #10
    209   and r10, r1, asr #10
    210   and r10, r1, ror #10
    211   and r6, r7, lsl r2
    212   and r6, r7, lsr r2
    213   and r6, r7, asr r2
    214   and r6, r7, ror r2
    215   and r10, r1, rrx
    216 
    217 @ CHECK: and	r10, r1, #15            @ encoding: [0x0f,0xa0,0x01,0xe2]
    218 @ CHECK: and	r10, r1, r6             @ encoding: [0x06,0xa0,0x01,0xe0]
    219 @ CHECK: and	r10, r1, r6, lsl #10    @ encoding: [0x06,0xa5,0x01,0xe0]
    220 @ CHECK: and	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0x01,0xe0]
    221 @ CHECK: and	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0x01,0xe0]
    222 @ CHECK: and	r10, r1, r6, asr #10    @ encoding: [0x46,0xa5,0x01,0xe0]
    223 @ CHECK: and	r10, r1, r6, ror #10    @ encoding: [0x66,0xa5,0x01,0xe0]
    224 @ CHECK: and	r6, r7, r8, lsl r2      @ encoding: [0x18,0x62,0x07,0xe0]
    225 @ CHECK: and	r6, r7, r8, lsr r2      @ encoding: [0x38,0x62,0x07,0xe0]
    226 @ CHECK: and	r6, r7, r8, asr r2      @ encoding: [0x58,0x62,0x07,0xe0]
    227 @ CHECK: and	r6, r7, r8, ror r2      @ encoding: [0x78,0x62,0x07,0xe0]
    228 @ CHECK: and	r10, r1, r6, rrx        @ encoding: [0x66,0xa0,0x01,0xe0]
    229 
    230 @ CHECK: and	r1, r1, #15             @ encoding: [0x0f,0x10,0x01,0xe2]
    231 @ CHECK: and	r10, r10, r1            @ encoding: [0x01,0xa0,0x0a,0xe0]
    232 @ CHECK: and	r10, r10, r1, lsl #10   @ encoding: [0x01,0xa5,0x0a,0xe0]
    233 @ CHECK: and	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0x0a,0xe0]
    234 @ CHECK: and	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0x0a,0xe0]
    235 @ CHECK: and	r10, r10, r1, asr #10   @ encoding: [0x41,0xa5,0x0a,0xe0]
    236 @ CHECK: and	r10, r10, r1, ror #10   @ encoding: [0x61,0xa5,0x0a,0xe0]
    237 @ CHECK: and	r6, r6, r7, lsl r2      @ encoding: [0x17,0x62,0x06,0xe0]
    238 @ CHECK: and	r6, r6, r7, lsr r2      @ encoding: [0x37,0x62,0x06,0xe0]
    239 @ CHECK: and	r6, r6, r7, asr r2      @ encoding: [0x57,0x62,0x06,0xe0]
    240 @ CHECK: and	r6, r6, r7, ror r2      @ encoding: [0x77,0x62,0x06,0xe0]
    241 @ CHECK: and	r10, r10, r1, rrx       @ encoding: [0x61,0xa0,0x0a,0xe0]
    242 
    243 @------------------------------------------------------------------------------
    244 @ FIXME: ASR
    245 @------------------------------------------------------------------------------
    246 @------------------------------------------------------------------------------
    247 @ FIXME: B
    248 @------------------------------------------------------------------------------
    249 @------------------------------------------------------------------------------
    250 @ FIXME: BFC
    251 @------------------------------------------------------------------------------
    252 @------------------------------------------------------------------------------
    253 @ FIXME: BFI
    254 @------------------------------------------------------------------------------
    255 
    256 @------------------------------------------------------------------------------
    257 @ BIC
    258 @------------------------------------------------------------------------------
    259   bic r10, r1, #0xf
    260   bic r10, r1, r6
    261   bic r10, r1, r6, lsl #10
    262   bic r10, r1, r6, lsr #10
    263   bic r10, r1, r6, lsr #10
    264   bic r10, r1, r6, asr #10
    265   bic r10, r1, r6, ror #10
    266   bic r6, r7, r8, lsl r2
    267   bic r6, r7, r8, lsr r2
    268   bic r6, r7, r8, asr r2
    269   bic r6, r7, r8, ror r2
    270   bic r10, r1, r6, rrx
    271 
    272   @ destination register is optional
    273   bic r1, #0xf
    274   bic r10, r1
    275   bic r10, r1, lsl #10
    276   bic r10, r1, lsr #10
    277   bic r10, r1, lsr #10
    278   bic r10, r1, asr #10
    279   bic r10, r1, ror #10
    280   bic r6, r7, lsl r2
    281   bic r6, r7, lsr r2
    282   bic r6, r7, asr r2
    283   bic r6, r7, ror r2
    284   bic r10, r1, rrx
    285 
    286 @ CHECK: bic	r10, r1, #15            @ encoding: [0x0f,0xa0,0xc1,0xe3]
    287 @ CHECK: bic	r10, r1, r6             @ encoding: [0x06,0xa0,0xc1,0xe1]
    288 @ CHECK: bic	r10, r1, r6, lsl #10    @ encoding: [0x06,0xa5,0xc1,0xe1]
    289 @ CHECK: bic	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0xc1,0xe1]
    290 @ CHECK: bic	r10, r1, r6, lsr #10    @ encoding: [0x26,0xa5,0xc1,0xe1]
    291 @ CHECK: bic	r10, r1, r6, asr #10    @ encoding: [0x46,0xa5,0xc1,0xe1]
    292 @ CHECK: bic	r10, r1, r6, ror #10    @ encoding: [0x66,0xa5,0xc1,0xe1]
    293 @ CHECK: bic	r6, r7, r8, lsl r2      @ encoding: [0x18,0x62,0xc7,0xe1]
    294 @ CHECK: bic	r6, r7, r8, lsr r2      @ encoding: [0x38,0x62,0xc7,0xe1]
    295 @ CHECK: bic	r6, r7, r8, asr r2      @ encoding: [0x58,0x62,0xc7,0xe1]
    296 @ CHECK: bic	r6, r7, r8, ror r2      @ encoding: [0x78,0x62,0xc7,0xe1]
    297 @ CHECK: bic	r10, r1, r6, rrx        @ encoding: [0x66,0xa0,0xc1,0xe1]
    298 
    299 
    300 @ CHECK: bic	r1, r1, #15             @ encoding: [0x0f,0x10,0xc1,0xe3]
    301 @ CHECK: bic	r10, r10, r1            @ encoding: [0x01,0xa0,0xca,0xe1]
    302 @ CHECK: bic	r10, r10, r1, lsl #10   @ encoding: [0x01,0xa5,0xca,0xe1]
    303 @ CHECK: bic	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0xca,0xe1]
    304 @ CHECK: bic	r10, r10, r1, lsr #10   @ encoding: [0x21,0xa5,0xca,0xe1]
    305 @ CHECK: bic	r10, r10, r1, asr #10   @ encoding: [0x41,0xa5,0xca,0xe1]
    306 @ CHECK: bic	r10, r10, r1, ror #10   @ encoding: [0x61,0xa5,0xca,0xe1]
    307 @ CHECK: bic	r6, r6, r7, lsl r2      @ encoding: [0x17,0x62,0xc6,0xe1]
    308 @ CHECK: bic	r6, r6, r7, lsr r2      @ encoding: [0x37,0x62,0xc6,0xe1]
    309 @ CHECK: bic	r6, r6, r7, asr r2      @ encoding: [0x57,0x62,0xc6,0xe1]
    310 @ CHECK: bic	r6, r6, r7, ror r2      @ encoding: [0x77,0x62,0xc6,0xe1]
    311 @ CHECK: bic	r10, r10, r1, rrx       @ encoding: [0x61,0xa0,0xca,0xe1]
    312 
    313 @------------------------------------------------------------------------------
    314 @ BKPT
    315 @------------------------------------------------------------------------------
    316   bkpt #10
    317   bkpt #65535
    318 
    319 @ CHECK: bkpt  #10                      @ encoding: [0x7a,0x00,0x20,0xe1]
    320 @ CHECK: bkpt  #65535                   @ encoding: [0x7f,0xff,0x2f,0xe1]
    321 
    322 @------------------------------------------------------------------------------
    323 @ BL/BLX (immediate)
    324 @------------------------------------------------------------------------------
    325 
    326   bl _bar
    327   @ FIXME: blx _bar
    328 
    329 @ CHECK: bl  _bar @ encoding: [A,A,A,0xeb]
    330 @ CHECK:   @   fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch
    331 
    332 @------------------------------------------------------------------------------
    333 @ BLX (register)
    334 @------------------------------------------------------------------------------
    335   blx r2
    336   blxne r2
    337 
    338 @ CHECK: blx r2                         @ encoding: [0x32,0xff,0x2f,0xe1]
    339 @ CHECK: blxne r2                       @ encoding: [0x32,0xff,0x2f,0x11]
    340 
    341 @------------------------------------------------------------------------------
    342 @ BX
    343 @------------------------------------------------------------------------------
    344 
    345   bx r2
    346   bxne r2
    347 
    348 @ CHECK: bx	r2                      @ encoding: [0x12,0xff,0x2f,0xe1]
    349 @ CHECK: bxne	r2                      @ encoding: [0x12,0xff,0x2f,0x11]
    350 
    351 @------------------------------------------------------------------------------
    352 @ BXJ
    353 @------------------------------------------------------------------------------
    354 
    355   bxj r2
    356   bxjne r2
    357 
    358 @ CHECK: bxj	r2                      @ encoding: [0x22,0xff,0x2f,0xe1]
    359 @ CHECK: bxjne	r2                      @ encoding: [0x22,0xff,0x2f,0x11]
    360 
    361 @------------------------------------------------------------------------------
    362 @ FIXME: CBNZ/CBZ
    363 @------------------------------------------------------------------------------
    364 
    365 
    366 @------------------------------------------------------------------------------
    367 @ CDP/CDP2
    368 @------------------------------------------------------------------------------
    369   cdp  p7, #1, c1, c1, c1, #4
    370   cdp2  p7, #1, c1, c1, c1, #4
    371 
    372 @ CHECK: cdp  p7, #1, c1, c1, c1, #4     @ encoding: [0x81,0x17,0x11,0xee]
    373 @ CHECK: cdp2  p7, #1, c1, c1, c1, #4    @ encoding: [0x81,0x17,0x11,0xfe]
    374 
    375 
    376 @------------------------------------------------------------------------------
    377 @ CLREX
    378 @------------------------------------------------------------------------------
    379   clrex
    380 
    381 @ CHECK: clrex                           @ encoding: [0x1f,0xf0,0x7f,0xf5]
    382 
    383 
    384 @------------------------------------------------------------------------------
    385 @ CLZ
    386 @------------------------------------------------------------------------------
    387   clz r1, r2
    388   clzeq r1, r2
    389 
    390 @ CHECK: clz r1, r2                      @ encoding: [0x12,0x1f,0x6f,0xe1]
    391 @ CHECK: clzeq r1, r2                    @ encoding: [0x12,0x1f,0x6f,0x01]
    392 
    393 @------------------------------------------------------------------------------
    394 @ CMN
    395 @------------------------------------------------------------------------------
    396   cmn r1, #0xf
    397   cmn r1, r6
    398   cmn r1, r6, lsl #10
    399   cmn r1, r6, lsr #10
    400   cmn sp, r6, lsr #10
    401   cmn r1, r6, asr #10
    402   cmn r1, r6, ror #10
    403   cmn r7, r8, lsl r2
    404   cmn sp, r8, lsr r2
    405   cmn r7, r8, asr r2
    406   cmn r7, r8, ror r2
    407   cmn r1, r6, rrx
    408 
    409 @ CHECK: cmn	r1, #15                 @ encoding: [0x0f,0x00,0x71,0xe3]
    410 @ CHECK: cmn	r1, r6                  @ encoding: [0x06,0x00,0x71,0xe1]
    411 @ CHECK: cmn	r1, r6, lsl #10         @ encoding: [0x06,0x05,0x71,0xe1]
    412 @ CHECK: cmn	r1, r6, lsr #10         @ encoding: [0x26,0x05,0x71,0xe1]
    413 @ CHECK: cmn	sp, r6, lsr #10         @ encoding: [0x26,0x05,0x7d,0xe1]
    414 @ CHECK: cmn	r1, r6, asr #10         @ encoding: [0x46,0x05,0x71,0xe1]
    415 @ CHECK: cmn	r1, r6, ror #10         @ encoding: [0x66,0x05,0x71,0xe1]
    416 @ CHECK: cmn	r7, r8, lsl r2          @ encoding: [0x18,0x02,0x77,0xe1]
    417 @ CHECK: cmn	sp, r8, lsr r2          @ encoding: [0x38,0x02,0x7d,0xe1]
    418 @ CHECK: cmn	r7, r8, asr r2          @ encoding: [0x58,0x02,0x77,0xe1]
    419 @ CHECK: cmn	r7, r8, ror r2          @ encoding: [0x78,0x02,0x77,0xe1]
    420 @ CHECK: cmn	r1, r6, rrx             @ encoding: [0x66,0x00,0x71,0xe1]
    421 
    422 @------------------------------------------------------------------------------
    423 @ CMP
    424 @------------------------------------------------------------------------------
    425   cmp r1, #0xf
    426   cmp r1, r6
    427   cmp r1, r6, lsl #10
    428   cmp r1, r6, lsr #10
    429   cmp sp, r6, lsr #10
    430   cmp r1, r6, asr #10
    431   cmp r1, r6, ror #10
    432   cmp r7, r8, lsl r2
    433   cmp sp, r8, lsr r2
    434   cmp r7, r8, asr r2
    435   cmp r7, r8, ror r2
    436   cmp r1, r6, rrx
    437 
    438 @ CHECK: cmp	r1, #15                 @ encoding: [0x0f,0x00,0x51,0xe3]
    439 @ CHECK: cmp	r1, r6                  @ encoding: [0x06,0x00,0x51,0xe1]
    440 @ CHECK: cmp	r1, r6, lsl #10         @ encoding: [0x06,0x05,0x51,0xe1]
    441 @ CHECK: cmp	r1, r6, lsr #10         @ encoding: [0x26,0x05,0x51,0xe1]
    442 @ CHECK: cmp	sp, r6, lsr #10         @ encoding: [0x26,0x05,0x5d,0xe1]
    443 @ CHECK: cmp	r1, r6, asr #10         @ encoding: [0x46,0x05,0x51,0xe1]
    444 @ CHECK: cmp	r1, r6, ror #10         @ encoding: [0x66,0x05,0x51,0xe1]
    445 @ CHECK: cmp	r7, r8, lsl r2          @ encoding: [0x18,0x02,0x57,0xe1]
    446 @ CHECK: cmp	sp, r8, lsr r2          @ encoding: [0x38,0x02,0x5d,0xe1]
    447 @ CHECK: cmp	r7, r8, asr r2          @ encoding: [0x58,0x02,0x57,0xe1]
    448 @ CHECK: cmp	r7, r8, ror r2          @ encoding: [0x78,0x02,0x57,0xe1]
    449 @ CHECK: cmp	r1, r6, rrx             @ encoding: [0x66,0x00,0x51,0xe1]
    450 
    451 @------------------------------------------------------------------------------
    452 @ DBG
    453 @------------------------------------------------------------------------------
    454   dbg #0
    455   dbg #5
    456   dbg #15
    457 
    458 @ CHECK: dbg #0                         @ encoding: [0xf0,0xf0,0x20,0xe3]
    459 @ CHECK: dbg #5                         @ encoding: [0xf5,0xf0,0x20,0xe3]
    460 @ CHECK: dbg #15                        @ encoding: [0xff,0xf0,0x20,0xe3]
    461 
    462 
    463 @------------------------------------------------------------------------------
    464 @ DMB
    465 @------------------------------------------------------------------------------
    466   dmb sy
    467   dmb st
    468   dmb sh
    469   dmb ish
    470   dmb shst
    471   dmb ishst
    472   dmb un
    473   dmb nsh
    474   dmb unst
    475   dmb nshst
    476   dmb osh
    477   dmb oshst
    478   dmb
    479 
    480 @ CHECK: dmb	sy                      @ encoding: [0x5f,0xf0,0x7f,0xf5]
    481 @ CHECK: dmb	st                      @ encoding: [0x5e,0xf0,0x7f,0xf5]
    482 @ CHECK: dmb	ish                     @ encoding: [0x5b,0xf0,0x7f,0xf5]
    483 @ CHECK: dmb	ish                     @ encoding: [0x5b,0xf0,0x7f,0xf5]
    484 @ CHECK: dmb	ishst                   @ encoding: [0x5a,0xf0,0x7f,0xf5]
    485 @ CHECK: dmb	ishst                   @ encoding: [0x5a,0xf0,0x7f,0xf5]
    486 @ CHECK: dmb	nsh                     @ encoding: [0x57,0xf0,0x7f,0xf5]
    487 @ CHECK: dmb	nsh                     @ encoding: [0x57,0xf0,0x7f,0xf5]
    488 @ CHECK: dmb	nshst                   @ encoding: [0x56,0xf0,0x7f,0xf5]
    489 @ CHECK: dmb	nshst                   @ encoding: [0x56,0xf0,0x7f,0xf5]
    490 @ CHECK: dmb	osh                     @ encoding: [0x53,0xf0,0x7f,0xf5]
    491 @ CHECK: dmb	oshst                   @ encoding: [0x52,0xf0,0x7f,0xf5]
    492 @ CHECK: dmb	sy                      @ encoding: [0x5f,0xf0,0x7f,0xf5]
    493 
    494 @------------------------------------------------------------------------------
    495 @ DSB
    496 @------------------------------------------------------------------------------
    497   dsb sy
    498   dsb st
    499   dsb sh
    500   dsb ish
    501   dsb shst
    502   dsb ishst
    503   dsb un
    504   dsb nsh
    505   dsb unst
    506   dsb nshst
    507   dsb osh
    508   dsb oshst
    509   dsb
    510 
    511 @ CHECK: dsb	sy                      @ encoding: [0x4f,0xf0,0x7f,0xf5]
    512 @ CHECK: dsb	st                      @ encoding: [0x4e,0xf0,0x7f,0xf5]
    513 @ CHECK: dsb	ish                     @ encoding: [0x4b,0xf0,0x7f,0xf5]
    514 @ CHECK: dsb	ish                     @ encoding: [0x4b,0xf0,0x7f,0xf5]
    515 @ CHECK: dsb	ishst                   @ encoding: [0x4a,0xf0,0x7f,0xf5]
    516 @ CHECK: dsb	ishst                   @ encoding: [0x4a,0xf0,0x7f,0xf5]
    517 @ CHECK: dsb	nsh                     @ encoding: [0x47,0xf0,0x7f,0xf5]
    518 @ CHECK: dsb	nsh                     @ encoding: [0x47,0xf0,0x7f,0xf5]
    519 @ CHECK: dsb	nshst                   @ encoding: [0x46,0xf0,0x7f,0xf5]
    520 @ CHECK: dsb	nshst                   @ encoding: [0x46,0xf0,0x7f,0xf5]
    521 @ CHECK: dsb	osh                     @ encoding: [0x43,0xf0,0x7f,0xf5]
    522 @ CHECK: dsb	oshst                   @ encoding: [0x42,0xf0,0x7f,0xf5]
    523 @ CHECK: dsb	sy                      @ encoding: [0x4f,0xf0,0x7f,0xf5]
    524 
    525 @------------------------------------------------------------------------------
    526 @ EOR
    527 @------------------------------------------------------------------------------
    528   eor r4, r5, #0xf000
    529   eor r4, r5, r6
    530   eor r4, r5, r6, lsl #5
    531   eor r4, r5, r6, lsr #5
    532   eor r4, r5, r6, lsr #5
    533   eor r4, r5, r6, asr #5
    534   eor r4, r5, r6, ror #5
    535   eor r6, r7, r8, lsl r9
    536   eor r6, r7, r8, lsr r9
    537   eor r6, r7, r8, asr r9
    538   eor r6, r7, r8, ror r9
    539   eor r4, r5, r6, rrx
    540 
    541   @ destination register is optional
    542   eor r5, #0xf000
    543   eor r4, r5
    544   eor r4, r5, lsl #5
    545   eor r4, r5, lsr #5
    546   eor r4, r5, lsr #5
    547   eor r4, r5, asr #5
    548   eor r4, r5, ror #5
    549   eor r6, r7, lsl r9
    550   eor r6, r7, lsr r9
    551   eor r6, r7, asr r9
    552   eor r6, r7, ror r9
    553   eor r4, r5, rrx
    554 
    555 @ CHECK: eor	r4, r5, #61440          @ encoding: [0x0f,0x4a,0x25,0xe2]
    556 @ CHECK: eor	r4, r5, r6              @ encoding: [0x06,0x40,0x25,0xe0]
    557 @ CHECK: eor	r4, r5, r6, lsl #5      @ encoding: [0x86,0x42,0x25,0xe0]
    558 @ CHECK: eor	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x25,0xe0]
    559 @ CHECK: eor	r4, r5, r6, lsr #5      @ encoding: [0xa6,0x42,0x25,0xe0]
    560 @ CHECK: eor	r4, r5, r6, asr #5      @ encoding: [0xc6,0x42,0x25,0xe0]
    561 @ CHECK: eor	r4, r5, r6, ror #5      @ encoding: [0xe6,0x42,0x25,0xe0]
    562 @ CHECK: eor	r6, r7, r8, lsl r9      @ encoding: [0x18,0x69,0x27,0xe0]
    563 @ CHECK: eor	r6, r7, r8, lsr r9      @ encoding: [0x38,0x69,0x27,0xe0]
    564 @ CHECK: eor	r6, r7, r8, asr r9      @ encoding: [0x58,0x69,0x27,0xe0]
    565 @ CHECK: eor	r6, r7, r8, ror r9      @ encoding: [0x78,0x69,0x27,0xe0]
    566 @ CHECK: eor	r4, r5, r6, rrx         @ encoding: [0x66,0x40,0x25,0xe0]
    567 
    568 
    569 @ CHECK: eor	r5, r5, #61440          @ encoding: [0x0f,0x5a,0x25,0xe2]
    570 @ CHECK: eor	r4, r4, r5              @ encoding: [0x05,0x40,0x24,0xe0]
    571 @ CHECK: eor	r4, r4, r5, lsl #5      @ encoding: [0x85,0x42,0x24,0xe0]
    572 @ CHECK: eor	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x24,0xe0]
    573 @ CHECK: eor	r4, r4, r5, lsr #5      @ encoding: [0xa5,0x42,0x24,0xe0]
    574 @ CHECK: eor	r4, r4, r5, asr #5      @ encoding: [0xc5,0x42,0x24,0xe0]
    575 @ CHECK: eor	r4, r4, r5, ror #5      @ encoding: [0xe5,0x42,0x24,0xe0]
    576 @ CHECK: eor	r6, r6, r7, lsl r9      @ encoding: [0x17,0x69,0x26,0xe0]
    577 @ CHECK: eor	r6, r6, r7, lsr r9      @ encoding: [0x37,0x69,0x26,0xe0]
    578 @ CHECK: eor	r6, r6, r7, asr r9      @ encoding: [0x57,0x69,0x26,0xe0]
    579 @ CHECK: eor	r6, r6, r7, ror r9      @ encoding: [0x77,0x69,0x26,0xe0]
    580 @ CHECK: eor	r4, r4, r5, rrx         @ encoding: [0x65,0x40,0x24,0xe0]
    581 
    582 
    583 @------------------------------------------------------------------------------
    584 @ ISB
    585 @------------------------------------------------------------------------------
    586         isb sy
    587         isb
    588 
    589 @ CHECK: isb sy                         @ encoding: [0x6f,0xf0,0x7f,0xf5]
    590 @ CHECK: isb sy                         @ encoding: [0x6f,0xf0,0x7f,0xf5]
    591 
    592 
    593 
    594 @------------------------------------------------------------------------------
    595 @ LDM*
    596 @------------------------------------------------------------------------------
    597         ldm       r2, {r1,r3-r6,sp}
    598         ldmia     r2, {r1,r3-r6,sp}
    599         ldmib     r2, {r1,r3-r6,sp}
    600         ldmda     r2, {r1,r3-r6,sp}
    601         ldmdb     r2, {r1,r3-r6,sp}
    602         ldmfd     r2, {r1,r3-r6,sp}
    603 
    604         @ with update
    605         ldm       r2!, {r1,r3-r6,sp}
    606         ldmib     r2!, {r1,r3-r6,sp}
    607         ldmda     r2!, {r1,r3-r6,sp}
    608         ldmdb     r2!, {r1,r3-r6,sp}
    609 
    610 @ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
    611 @ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
    612 @ CHECK: ldmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe9]
    613 @ CHECK: ldmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe8]
    614 @ CHECK: ldmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x12,0xe9]
    615 @ CHECK: ldm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x92,0xe8]
    616 
    617 @ CHECK: ldm   r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe8]
    618 @ CHECK: ldmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xb2,0xe9]
    619 @ CHECK: ldmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe8]
    620 @ CHECK: ldmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x32,0xe9]
    621 
    622 @------------------------------------------------------------------------------
    623 @ FIXME: LDR*
    624 @------------------------------------------------------------------------------
    625 @------------------------------------------------------------------------------
    626 @ FIXME: LSL
    627 @------------------------------------------------------------------------------
    628 @------------------------------------------------------------------------------
    629 @ FIXME: LSR
    630 @------------------------------------------------------------------------------
    631 
    632 @------------------------------------------------------------------------------
    633 @ MCR/MCR2
    634 @------------------------------------------------------------------------------
    635         mcr  p7, #1, r5, c1, c1, #4
    636         mcr2  p7, #1, r5, c1, c1, #4
    637 
    638 @ CHECK: mcr  p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xee]
    639 @ CHECK: mcr2  p7, #1, r5, c1, c1, #4 @ encoding: [0x91,0x57,0x21,0xfe]
    640 
    641 @------------------------------------------------------------------------------
    642 @ MCRR/MCRR2
    643 @------------------------------------------------------------------------------
    644         mcrr  p7, #15, r5, r4, c1
    645         mcrr2  p7, #15, r5, r4, c1
    646 
    647 @ CHECK: mcrr  p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xec]
    648 @ CHECK: mcrr2  p7, #15, r5, r4, c1 @ encoding: [0xf1,0x57,0x44,0xfc]
    649 
    650 
    651 @------------------------------------------------------------------------------
    652 @ MLA
    653 @------------------------------------------------------------------------------
    654         mla  r1,r2,r3,r4
    655         mlas r1,r2,r3,r4
    656         mlane  r1,r2,r3,r4
    657         mlasne r1,r2,r3,r4
    658 
    659 @ CHECK: mla 	r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0xe0]
    660 @ CHECK: mlas	r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0xe0]
    661 @ CHECK: mlane 	r1, r2, r3, r4 @ encoding: [0x92,0x43,0x21,0x10]
    662 @ CHECK: mlasne	r1, r2, r3, r4 @ encoding: [0x92,0x43,0x31,0x10]
    663 
    664 @------------------------------------------------------------------------------
    665 @ MLS
    666 @------------------------------------------------------------------------------
    667         mls  r2,r5,r6,r3
    668         mlsne  r2,r5,r6,r3
    669 
    670 @ CHECK: mls	r2, r5, r6, r3          @ encoding: [0x95,0x36,0x62,0xe0]
    671 @ CHECK: mlsne	r2, r5, r6, r3          @ encoding: [0x95,0x36,0x62,0x10]
    672 
    673 @------------------------------------------------------------------------------
    674 @ MOV (immediate)
    675 @------------------------------------------------------------------------------
    676     mov r3, #7
    677     mov r4, #0xff0
    678     mov r5, #0xff0000
    679     mov r6, #0xffff
    680     movw r9, #0xffff
    681     movs r3, #7
    682     moveq r4, #0xff0
    683     movseq r5, #0xff0000
    684 
    685 @ CHECK: mov	r3, #7                  @ encoding: [0x07,0x30,0xa0,0xe3]
    686 @ CHECK: mov	r4, #4080               @ encoding: [0xff,0x4e,0xa0,0xe3]
    687 @ CHECK: mov	r5, #16711680           @ encoding: [0xff,0x58,0xa0,0xe3]
    688 @ CHECK: movw	r6, #65535              @ encoding: [0xff,0x6f,0x0f,0xe3]
    689 @ CHECK: movw	r9, #65535              @ encoding: [0xff,0x9f,0x0f,0xe3]
    690 @ CHECK: movs	r3, #7                  @ encoding: [0x07,0x30,0xb0,0xe3]
    691 @ CHECK: moveq	r4, #4080               @ encoding: [0xff,0x4e,0xa0,0x03]
    692 @ CHECK: movseq	r5, #16711680           @ encoding: [0xff,0x58,0xb0,0x03]
    693 
    694 @------------------------------------------------------------------------------
    695 @ MOV (register)
    696 @------------------------------------------------------------------------------
    697         mov r2, r3
    698         movs r2, r3
    699         moveq r2, r3
    700         movseq r2, r3
    701 
    702 @ CHECK: mov	r2, r3                  @ encoding: [0x03,0x20,0xa0,0xe1]
    703 @ CHECK: movs	r2, r3                  @ encoding: [0x03,0x20,0xb0,0xe1]
    704 @ CHECK: moveq	r2, r3                  @ encoding: [0x03,0x20,0xa0,0x01]
    705 @ CHECK: movseq	r2, r3                  @ encoding: [0x03,0x20,0xb0,0x01]
    706 
    707 @------------------------------------------------------------------------------
    708 @ MOVT
    709 @------------------------------------------------------------------------------
    710     movt r3, #7
    711     movt r6, #0xffff
    712     movteq r4, #0xff0
    713 
    714 @ CHECK: movt	r3, #7                  @ encoding: [0x07,0x30,0x40,0xe3]
    715 @ CHECK: movt	r6, #65535              @ encoding: [0xff,0x6f,0x4f,0xe3]
    716 @ CHECK: movteq	r4, #4080               @ encoding: [0xf0,0x4f,0x40,0x03]
    717 
    718 
    719 @------------------------------------------------------------------------------
    720 @ MRC/MRC2
    721 @------------------------------------------------------------------------------
    722         mrc  p14, #0, r1, c1, c2, #4
    723         mrc2  p14, #0, r1, c1, c2, #4
    724 
    725 @ CHECK: mrc  p14, #0, r1, c1, c2, #4   @ encoding: [0x92,0x1e,0x11,0xee]
    726 @ CHECK: mrc2  p14, #0, r1, c1, c2, #4  @ encoding: [0x92,0x1e,0x11,0xfe]
    727 
    728 @------------------------------------------------------------------------------
    729 @ MRRC/MRRC2
    730 @------------------------------------------------------------------------------
    731         mrrc  p7, #1, r5, r4, c1
    732         mrrc2  p7, #1, r5, r4, c1
    733 
    734 @ CHECK: mrrc  p7, #1, r5, r4, c1       @ encoding: [0x11,0x57,0x54,0xec]
    735 @ CHECK: mrrc2  p7, #1, r5, r4, c1      @ encoding: [0x11,0x57,0x54,0xfc]
    736 
    737 
    738 @------------------------------------------------------------------------------
    739 @ MRS
    740 @------------------------------------------------------------------------------
    741         mrs  r8, apsr
    742         mrs  r8, cpsr
    743         mrs  r8, spsr
    744 @ CHECK: mrs  r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1]
    745 @ CHECK: mrs  r8, apsr @ encoding: [0x00,0x80,0x0f,0xe1]
    746 @ CHECK: mrs  r8, spsr @ encoding: [0x00,0x80,0x4f,0xe1]
    747 
    748 
    749 
    750 @------------------------------------------------------------------------------
    751 @ MSR
    752 @------------------------------------------------------------------------------
    753 
    754         msr  apsr, #5
    755         msr  apsr_g, #5
    756         msr  apsr_nzcvq, #5
    757         msr  APSR_nzcvq, #5
    758         msr  apsr_nzcvqg, #5
    759         msr  cpsr_fc, #5
    760         msr  cpsr_c, #5
    761         msr  cpsr_x, #5
    762         msr  cpsr_fc, #5
    763         msr  cpsr_all, #5
    764         msr  cpsr_fsx, #5
    765         msr  spsr_fc, #5
    766         msr  SPSR_fsxc, #5
    767         msr  cpsr_fsxc, #5
    768 
    769 @ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
    770 @ CHECK: msr	APSR_g, #5              @ encoding: [0x05,0xf0,0x24,0xe3]
    771 @ CHECK: msr	APSR_nzcvq, #5          @ encoding: [0x05,0xf0,0x28,0xe3]
    772 @ CHECK: msr	APSR_nzcvq, #5          @ encoding: [0x05,0xf0,0x28,0xe3]
    773 @ CHECK: msr	APSR_nzcvqg, #5         @ encoding: [0x05,0xf0,0x2c,0xe3]
    774 @ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
    775 @ CHECK: msr	CPSR_c, #5              @ encoding: [0x05,0xf0,0x21,0xe3]
    776 @ CHECK: msr	CPSR_x, #5              @ encoding: [0x05,0xf0,0x22,0xe3]
    777 @ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
    778 @ CHECK: msr	CPSR_fc, #5             @ encoding: [0x05,0xf0,0x29,0xe3]
    779 @ CHECK: msr	CPSR_fsx, #5            @ encoding: [0x05,0xf0,0x2e,0xe3]
    780 @ CHECK: msr	SPSR_fc, #5             @ encoding: [0x05,0xf0,0x69,0xe3]
    781 @ CHECK: msr	SPSR_fsxc, #5           @ encoding: [0x05,0xf0,0x6f,0xe3]
    782 @ CHECK: msr	CPSR_fsxc, #5           @ encoding: [0x05,0xf0,0x2f,0xe3]
    783 
    784         msr  apsr, r0
    785         msr  apsr_g, r0
    786         msr  apsr_nzcvq, r0
    787         msr  APSR_nzcvq, r0
    788         msr  apsr_nzcvqg, r0
    789         msr  cpsr_fc, r0
    790         msr  cpsr_c, r0
    791         msr  cpsr_x, r0
    792         msr  cpsr_fc, r0
    793         msr  cpsr_all, r0
    794         msr  cpsr_fsx, r0
    795         msr  spsr_fc, r0
    796         msr  SPSR_fsxc, r0
    797         msr  cpsr_fsxc, r0
    798 
    799 @ CHECK: msr  CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
    800 @ CHECK: msr  APSR_g, r0 @ encoding: [0x00,0xf0,0x24,0xe1]
    801 @ CHECK: msr  APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1]
    802 @ CHECK: msr  APSR_nzcvq, r0 @ encoding: [0x00,0xf0,0x28,0xe1]
    803 @ CHECK: msr  APSR_nzcvqg, r0 @ encoding: [0x00,0xf0,0x2c,0xe1]
    804 @ CHECK: msr  CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
    805 @ CHECK: msr  CPSR_c, r0 @ encoding: [0x00,0xf0,0x21,0xe1]
    806 @ CHECK: msr  CPSR_x, r0 @ encoding: [0x00,0xf0,0x22,0xe1]
    807 @ CHECK: msr  CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
    808 @ CHECK: msr  CPSR_fc, r0 @ encoding: [0x00,0xf0,0x29,0xe1]
    809 @ CHECK: msr  CPSR_fsx, r0 @ encoding: [0x00,0xf0,0x2e,0xe1]
    810 @ CHECK: msr  SPSR_fc, r0 @ encoding: [0x00,0xf0,0x69,0xe1]
    811 @ CHECK: msr  SPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x6f,0xe1]
    812 @ CHECK: msr  CPSR_fsxc, r0 @ encoding: [0x00,0xf0,0x2f,0xe1]
    813 
    814 @------------------------------------------------------------------------------
    815 @ STM*
    816 @------------------------------------------------------------------------------
    817         stm       r2, {r1,r3-r6,sp}
    818         stmia     r2, {r1,r3-r6,sp}
    819         stmib     r2, {r1,r3-r6,sp}
    820         stmda     r2, {r1,r3-r6,sp}
    821         stmdb     r2, {r1,r3-r6,sp}
    822         stmfd     r2, {r1,r3-r6,sp}
    823 
    824         @ with update
    825         stmia     r2!, {r1,r3-r6,sp}
    826         stmib     r2!, {r1,r3-r6,sp}
    827         stmda     r2!, {r1,r3-r6,sp}
    828         stmdb     r2!, {r1,r3-r6,sp}
    829 @ CHECK: stm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8]
    830 @ CHECK: stm   r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe8]
    831 @ CHECK: stmib r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x82,0xe9]
    832 @ CHECK: stmda r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe8]
    833 @ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9]
    834 @ CHECK: stmdb r2, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x02,0xe9]
    835 
    836 @ CHECK: stm   r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe8]
    837 @ CHECK: stmib r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0xa2,0xe9]
    838 @ CHECK: stmda r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe8]
    839 @ CHECK: stmdb r2!, {r1, r3, r4, r5, r6, sp} @ encoding: [0x7a,0x20,0x22,0xe9]
    840