166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@---
266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ Run these test in both Thumb1 and Thumb2 modes, as all of the encodings
366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ should be valid, and parse the same, in both.
466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@---
566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ RUN: llvm-mc -triple=thumbv6-apple-darwin -show-encoding < %s | FileCheck %s
666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ RUN: llvm-mc -triple=thumbv7-apple-darwin -show-encoding < %s | FileCheck %s
766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  .syntax unified
866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman  .globl _func
966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ Check that the assembler can handle the documented syntax from the ARM ARM.
1166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ For complex constructs like shifter operands, check more thoroughly for them
1266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ once then spot check that following instructions accept the form generally.
1366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ This gives us good coverage while keeping the overall size of the test
1466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ more reasonable.
1566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ FIXME: Some 3-operand instructions have a 2-operand assembly syntax.
1866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
1966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman_func:
2066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: _func
2166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
2366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADC (register)
2466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
2566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adcs r4, r6
2666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adcs	r4, r6                  @ encoding: [0x74,0x41]
2866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
2966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
3166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADD (immediate)
3266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
3366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adds r1, r2, #3
3466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ When Rd is not explicitly specified, encoding T2 is preferred even though
3566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ the literal is in the range [0,7] which would allow encoding T1.
3666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adds r2, #3
3766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adds r2, #8
3866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
3966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adds	r1, r2, #3              @ encoding: [0xd1,0x1c]
4066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adds	r2, #3                  @ encoding: [0x03,0x32]
4166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adds	r2, #8                  @ encoding: [0x08,0x32]
4266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
4366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
4466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
4566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADD (register)
4666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
4766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adds r1, r2, r3
4866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add r2, r8
4966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adds	r1, r2, r3              @ encoding: [0xd1,0x18]
5166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	r2, r8                  @ encoding: [0x42,0x44]
5266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
5466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
5566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADD (SP plus immediate)
5666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
5766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add sp, #4
5866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add sp, #508
5966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add sp, sp, #4
6066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add r2, sp, #8
6166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add r2, sp, #1020
6266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
6366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	sp, #4                  @ encoding: [0x01,0xb0]
6466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	sp, #508                @ encoding: [0x7f,0xb0]
6566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	sp, #4                  @ encoding: [0x01,0xb0]
6666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	r2, sp, #8              @ encoding: [0x02,0xaa]
6766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	r2, sp, #1020           @ encoding: [0xff,0xaa]
6866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
6966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
7066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
7166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADD (SP plus register)
7266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
7366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add sp, r3
7466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        add r2, sp, r2
7566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
7666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	sp, r3                  @ encoding: [0x9d,0x44]
7766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: add	r2, sp, r2              @ encoding: [0x6a,0x44]
7866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
7966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
8066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
8166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ADR
8266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
8366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adr r2, _baz
8466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        adr	r2, #3
8566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
8666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adr	r2, _baz                @ encoding: [A,0xa2]
8766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman            @   fixup A - offset: 0, value: _baz, kind: fixup_thumb_adr_pcrel_10
8866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: adr	r2, #3                  @ encoding: [0x03,0xa2]
8966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
9066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
9166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ASR (immediate)
9266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
9366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        asrs r2, r3, #32
9466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        asrs r2, r3, #5
9566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        asrs r2, r3, #1
9666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
9766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: asrs	r2, r3, #32             @ encoding: [0x1a,0x10]
9866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: asrs	r2, r3, #5              @ encoding: [0x5a,0x11]
9966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: asrs	r2, r3, #1              @ encoding: [0x5a,0x10]
10066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
10366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ASR (register)
10466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
10566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        asrs r5, r2
10666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: asrs	r5, r2                  @ encoding: [0x15,0x41]
10866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
10966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
11066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
11166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ B
11266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
11366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        b _baz
11466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        beq _bar
11566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        b       #1838
11666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        b       #-420
11766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        beq     #336
11866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        beq     #160
11966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
12066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: b	_baz                    @ encoding: [A,0xe0'A']
12166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman             @   fixup A - offset: 0, value: _baz, kind: fixup_arm_thumb_br
12266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: beq	_bar                    @ encoding: [A,0xd0]
12366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman             @   fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_bcc
12466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: b       #1838                   @ encoding: [0x97,0xe3]
12566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: b       #-420                   @ encoding: [0x2e,0xe7]
12666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: beq     #336                    @ encoding: [0xa8,0xd0]
12766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: beq     #160                    @ encoding: [0x50,0xd0]
12866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
12966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
13066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BL/BLX
13166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
13266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        blx     #884800
13366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        blx     #1769600
13466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
13566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: blx     #884800                 @ encoding: [0xd8,0xf0,0x20,0xe8]
13666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: blx     #1769600                @ encoding: [0xb0,0xf1,0x40,0xe8]
13766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
13866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
13966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BICS
14066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
14166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        bics r1, r6
14266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
14366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bics	r1, r6                  @ encoding: [0xb1,0x43]
14466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
14566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
14666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
14766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BKPT
14866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
14966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        bkpt #0
15066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        bkpt #255
15166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
15266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bkpt	#0                      @ encoding: [0x00,0xbe]
15366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bkpt	#255                    @ encoding: [0xff,0xbe]
15466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
15566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
15666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
15766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BL/BLX (immediate)
15866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
15966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        bl _bar
16066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        blx _baz
16166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
16266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bl	_bar                    @ encoding: [A,0xf0'A',A,0xf8'A']
16366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman             @   fixup A - offset: 0, value: _bar, kind: fixup_arm_thumb_bl
16466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: blx	_baz                    @ encoding: [A,0xf0'A',A,0xe8'A']
16566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman             @   fixup A - offset: 0, value: _baz, kind: fixup_arm_thumb_blx
16666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
16766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
16866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
16966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BLX (register)
17066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
17166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        blx r4
17266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
17366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: blx	r4                      @ encoding: [0xa0,0x47]
17466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
17566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
17666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
17766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ BX
17866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
17966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        bx r2
18066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
18166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: bx	r2                      @ encoding: [0x10,0x47]
18266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
18366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
18466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
18566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CMN
18666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
18766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
18866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        cmn r5, r1
18966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
19066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: cmn	r5, r1                  @ encoding: [0xcd,0x42]
19166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
19266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
19366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
19466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CMP
19566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
19666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        cmp r6, #32
19766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        cmp r3, r4
19866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        cmp r8, r1
19966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
20066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: cmp	r6, #32                 @ encoding: [0x20,0x2e]
20166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: cmp	r3, r4                  @ encoding: [0xa3,0x42]
20266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: cmp	r8, r1                  @ encoding: [0x88,0x45]
20366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
20466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
20566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ EOR
20666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
20766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        eors r4, r5
20866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
20966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: eors	r4, r5                  @ encoding: [0x6c,0x40]
21066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
21166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
21266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
21366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDM
21466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
21566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldm r3, {r0, r1, r2, r3, r4, r5, r6, r7}
21666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldm r2!, {r1, r3, r4, r5, r7}
21766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldm r1, {r1}
21866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
21966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldm	r3, {r0, r1, r2, r3, r4, r5, r6, r7} @ encoding: [0xff,0xcb]
22066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldm	r2!, {r1, r3, r4, r5, r7} @ encoding: [0xba,0xca]
22166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldm	r1, {r1}                @ encoding: [0x02,0xc9]
22266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
22366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
22466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
22566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDR (immediate)
22666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
22766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r1, [r5]
22866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r2, [r6, #32]
22966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r3, [r7, #124]
23066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r1, [sp]
23166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r2, [sp, #24]
23266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r3, [sp, #1020]
23366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
23466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
23566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r1, [r5]                @ encoding: [0x29,0x68]
23666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r2, [r6, #32]           @ encoding: [0x32,0x6a]
23766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r3, [r7, #124]          @ encoding: [0xfb,0x6f]
23866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r1, [sp]                @ encoding: [0x00,0x99]
23966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r2, [sp, #24]           @ encoding: [0x06,0x9a]
24066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r3, [sp, #1020]         @ encoding: [0xff,0x9b]
24166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
24266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
24366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
24466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDR (literal)
24566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
24666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r1, _foo
24766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr     r3, #604
24866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr     r3, #368
24966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
25066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r1, _foo                @ encoding: [A,0x49]
25166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman             @   fixup A - offset: 0, value: _foo, kind: fixup_arm_thumb_cp
25266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr     r3, #604                @ encoding: [0x97,0x4b]
25366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr     r3, #368                @ encoding: [0x5c,0x4b]
25466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
25566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
25666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDR (register)
25766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
25866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldr r1, [r2, r3]
25966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
26066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldr	r1, [r2, r3]            @ encoding: [0xd1,0x58]
26166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
26266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
26366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
26466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDRB (immediate)
26566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
26666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrb r4, [r3]
26766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrb r5, [r6, #0]
26866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrb r6, [r7, #31]
26966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
27066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrb	r4, [r3]                @ encoding: [0x1c,0x78]
27166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrb	r5, [r6]                @ encoding: [0x35,0x78]
27266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrb	r6, [r7, #31]           @ encoding: [0xfe,0x7f]
27366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
27466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
27566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
27666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDRB (register)
27766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
27866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrb r6, [r4, r5]
27966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
28066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrb	r6, [r4, r5]            @ encoding: [0x66,0x5d]
28166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
28266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
28366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
28466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDRH (immediate)
28566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
28666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrh r3, [r3]
28766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrh r4, [r6, #2]
28866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrh r5, [r7, #62]
28966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
29066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrh	r3, [r3]                @ encoding: [0x1b,0x88]
29166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrh	r4, [r6, #2]            @ encoding: [0x74,0x88]
29266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrh	r5, [r7, #62]           @ encoding: [0xfd,0x8f]
29366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
29466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
29566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
29666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDRH (register)
29766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
29866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrh r6, [r2, r6]
29966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
30066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrh	r6, [r2, r6]            @ encoding: [0x96,0x5b]
30166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
30266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
30366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
30466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LDRSB/LDRSH
30566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
30666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrsb r6, [r2, r6]
30766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        ldrsh r3, [r7, r1]
30866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
30966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrsb	r6, [r2, r6]            @ encoding: [0x96,0x57]
31066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: ldrsh	r3, [r7, r1]            @ encoding: [0x7b,0x5e]
31166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
31266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
31366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
31466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LSL (immediate)
31566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
31666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsls r4, r5, #0
31766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsls r4, r5, #4
31866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
31966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsls	r4, r5, #0              @ encoding: [0x2c,0x00]
32066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsls	r4, r5, #4              @ encoding: [0x2c,0x01]
32166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
32266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
32366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
32466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LSL (register)
32566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
32666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsls r2, r6
32766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
32866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsls	r2, r6                  @ encoding: [0xb2,0x40]
32966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
33066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
33166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
33266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LSR (immediate)
33366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
33466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsrs r1, r3, #1
33566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsrs r1, r3, #32
33666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
33766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsrs	r1, r3, #1              @ encoding: [0x59,0x08]
33866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsrs	r1, r3, #32             @ encoding: [0x19,0x08]
33966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
34066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
34166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
34266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ LSR (register)
34366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
34466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        lsrs r2, r6
34566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
34666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: lsrs	r2, r6                  @ encoding: [0xf2,0x40]
34766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
34866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
34966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
35066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ MOV (immediate)
35166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
35266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        movs r2, #0
35366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        movs r2, #255
35466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        movs r2, #23
35566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
35666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: movs	r2, #0                  @ encoding: [0x00,0x22]
35766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: movs	r2, #255                @ encoding: [0xff,0x22]
35866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: movs	r2, #23                 @ encoding: [0x17,0x22]
35966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
36066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
36166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
36266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ MOV (register)
36366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
36466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        mov r3, r4
36566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        movs r1, r3
36666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
36766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: mov	r3, r4                  @ encoding: [0x23,0x46]
36866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: movs	r1, r3                  @ encoding: [0x19,0x00]
36966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
37066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
37166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
37266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ MUL
37366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
37466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        muls r1, r2, r1
37566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        muls r3, r4
37666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
37766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: muls	r1, r2, r1              @ encoding: [0x51,0x43]
37866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: muls	r3, r4, r3              @ encoding: [0x63,0x43]
37966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
38066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
38166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
38266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ MVN
38366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
38466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        mvns r6, r3
38566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
38666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: mvns	r6, r3                  @ encoding: [0xde,0x43]
38766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
38866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
38966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
39066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ NEG
39166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
39266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        negs r3, r4
39366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
39466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: rsbs	r3, r4, #0              @ encoding: [0x63,0x42]
39566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
39666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
39766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ORR
39866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
39966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        orrs  r3, r4
40066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
40166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK-ERRORS: 	orrs	r3, r4                  @ encoding: [0x23,0x43]
40266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
40366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
40466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
40566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ POP
40666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
40766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        pop {r2, r3, r6}
40866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
40966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: pop	{r2, r3, r6}            @ encoding: [0x4c,0xbc]
41066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
41166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
41266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
41366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ PUSH
41466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
41566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        push {r1, r2, r7}
41666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
41766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: push	{r1, r2, r7}            @ encoding: [0x86,0xb4]
41866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
41966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
42066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
42166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ REV/REV16/REVSH
42266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
42366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        rev r6, r3
42466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        rev16 r7, r2
42566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        revsh r5, r1
42666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
42766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: rev	r6, r3                  @ encoding: [0x1e,0xba]
42866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: rev16	r7, r2                  @ encoding: [0x57,0xba]
42966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: revsh	r5, r1                  @ encoding: [0xcd,0xba]
43066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
43166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
43266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
43366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ ROR
43466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
43566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        rors r2, r7
43666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
43766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: rors	r2, r7                  @ encoding: [0xfa,0x41]
43866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
43966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
44066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
44166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ RSB
44266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
44366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        rsbs r1, r3, #0
44466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
44566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: rsbs	r1, r3, #0              @ encoding: [0x59,0x42]
44666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
44766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
44866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
44966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SBC
45066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
45166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        sbcs r4, r3
45266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
45366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sbcs	r4, r3                  @ encoding: [0x9c,0x41]
45466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
45566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
45666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
45766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SETEND
45866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
45966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        setend be
46066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        setend le
46166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
46266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: setend	be                      @ encoding: [0x58,0xb6]
46366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: setend	le                      @ encoding: [0x50,0xb6]
46466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
46566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
46666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
46766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STM
46866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
46966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        stm r1!, {r2, r6}
47066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        stm r1!, {r1, r2, r3, r7}
47166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
47266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: stm	r1!, {r2, r6}           @ encoding: [0x44,0xc1]
47366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: stm	r1!, {r1, r2, r3, r7}   @ encoding: [0x8e,0xc1]
47466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
47566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
47666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
47766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STR (immediate)
47866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
47966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r2, [r7]
48066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r2, [r7, #0]
48166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r5, [r1, #4]
48266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r3, [r7, #124]
48366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r2, [sp]
48466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r3, [sp, #0]
48566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r4, [sp, #20]
48666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r5, [sp, #1020]
48766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
48866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r2, [r7]                @ encoding: [0x3a,0x60]
48966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r2, [r7]                @ encoding: [0x3a,0x60]
49066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r5, [r1, #4]            @ encoding: [0x4d,0x60]
49166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r3, [r7, #124]          @ encoding: [0xfb,0x67]
49266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r2, [sp]                @ encoding: [0x00,0x92]
49366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r3, [sp]                @ encoding: [0x00,0x93]
49466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r4, [sp, #20]           @ encoding: [0x05,0x94]
49566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r5, [sp, #1020]         @ encoding: [0xff,0x95]
49666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
49766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
49866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
49966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STR (register)
50066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
50166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        str r2, [r7, r3]
50266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
50366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: str	r2, [r7, r3]            @ encoding: [0xfa,0x50]
50466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
50566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
50666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
50766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STRB (immediate)
50866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
50966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strb r4, [r3]
51066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strb r5, [r6, #0]
51166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strb r6, [r7, #31]
51266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
51366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strb	r4, [r3]                @ encoding: [0x1c,0x70]
51466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strb	r5, [r6]                @ encoding: [0x35,0x70]
51566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strb	r6, [r7, #31]           @ encoding: [0xfe,0x77]
51666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
51766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
51866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
51966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STRB (register)
52066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
52166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strb r6, [r4, r5]
52266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
52366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strb	r6, [r4, r5]            @ encoding: [0x66,0x55]
52466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
52566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
52666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
52766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STRH (immediate)
52866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
52966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strh r3, [r3]
53066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strh r4, [r6, #2]
53166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strh r5, [r7, #62]
53266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
53366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strh	r3, [r3]                @ encoding: [0x1b,0x80]
53466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strh	r4, [r6, #2]            @ encoding: [0x74,0x80]
53566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strh	r5, [r7, #62]           @ encoding: [0xfd,0x87]
53666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
53766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
53866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
53966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ STRH (register)
54066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
54166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        strh r6, [r2, r6]
54266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
54366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: strh	r6, [r2, r6]            @ encoding: [0x96,0x53]
54466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
54566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
54666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
54766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SUB (immediate)
54866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
54966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        subs r1, r2, #3
55066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        subs r2, #3
55166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        subs r2, #8
55266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
55366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subs	r1, r2, #3              @ encoding: [0xd1,0x1e]
55466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subs	r2, #3                  @ encoding: [0x03,0x3a]
55566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subs	r2, #8                  @ encoding: [0x08,0x3a]
55666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
55766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
55866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
55966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SUB (SP minus immediate)
56066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
56166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        sub sp, #12
56266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        sub sp, sp, #508
56366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
56466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub	sp, #12                 @ encoding: [0x83,0xb0]
56566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sub	sp, #508                @ encoding: [0xff,0xb0]
56666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
56766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
56866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
56966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SUB (register)
57066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
57166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        subs r1, r2, r3
57266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
57366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: subs	r1, r2, r3              @ encoding: [0xd1,0x1a]
57466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
57566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
57666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
57766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SVC
57866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
57966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        svc #0
58066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        svc #255
58166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
58266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: svc	#0                      @ encoding: [0x00,0xdf]
58366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: svc	#255                    @ encoding: [0xff,0xdf]
58466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
58566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
58666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
58766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ SXTB/SXTH
58866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
58966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        sxtb r3, r5
59066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        sxth r3, r5
59166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
59266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sxtb	r3, r5                  @ encoding: [0x6b,0xb2]
59366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: sxth	r3, r5                  @ encoding: [0x2b,0xb2]
59466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
59566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
59666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
59766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ TST
59866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
59966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        tst r6, r1
60066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
60166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: tst	r6, r1                  @ encoding: [0x0e,0x42]
60266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
60366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
60466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
60566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ UXTB/UXTH
60666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
60766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        uxtb  r7, r2
60866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        uxth  r1, r4
60966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
61066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: uxtb	r7, r2                  @ encoding: [0xd7,0xb2]
61166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: uxth	r1, r4                  @ encoding: [0xa1,0xb2]
61266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
61366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
61466b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
61566b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ WFE/WFI/YIELD
61666b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@------------------------------------------------------------------------------
61766b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        wfe
61866b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        wfi
61966b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman        yield
62066b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman
62166b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: wfe                             @ encoding: [0x20,0xbf]
62266b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: wfi                             @ encoding: [0x30,0xbf]
62366b8ab22586debccb1f787d4d52b7f042d4ddeb8John Bauman@ CHECK: yield                           @ encoding: [0x10,0xbf]
624