xref: /llvm-project/llvm/test/MC/ARM/load-store-acquire-release-v8.s (revision 375ddd677c08fa32ed188ba20097c1cb0949d846)
1@ RUN: not llvm-mc -triple=armv8 -show-encoding < %s 2> %t | FileCheck %s
2@ RUN: FileCheck %s < %t --check-prefix=CHECK-ERROR
3@ RUN: not llvm-mc -triple=armv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
4        ldaexb  r3, [r4]
5        ldaexh  r2, [r5]
6        ldaex  r1, [r7]
7        ldaexd  r6, r7, [r8]
8
9@ CHECK: ldaexb r3, [r4]                @ encoding: [0x9f,0x3e,0xd4,0xe1]
10@ CHECK: ldaexh r2, [r5]                @ encoding: [0x9f,0x2e,0xf5,0xe1]
11@ CHECK: ldaex r1, [r7]                @ encoding: [0x9f,0x1e,0x97,0xe1]
12@ CHECK: ldaexd r6, r7, [r8]            @ encoding: [0x9f,0x6e,0xb8,0xe1]
13@ CHECK-V7: instruction requires: acquire/release
14@ CHECK-V7: instruction requires: acquire/release
15@ CHECK-V7: instruction requires: acquire/release
16@ CHECK-V7: instruction requires: acquire/release
17
18        ldaexd  r2, r4, [r8]
19@ CHECK-ERROR: error: destination operands must be sequential
20
21@ GNU alias
22        ldaexd  r6, [r8]
23@ CHECK:  ldaexd	r6, r7, [r8]            @ encoding: [0x9f,0x6e,0xb8,0xe1]
24
25        stlexb  r1, r3, [r4]
26        stlexh  r4, r2, [r5]
27        stlex  r2, r1, [r7]
28        stlexd  r6, r2, r3, [r8]
29@ CHECK: stlexb r1, r3, [r4]            @ encoding: [0x93,0x1e,0xc4,0xe1]
30@ CHECK: stlexh r4, r2, [r5]            @ encoding: [0x92,0x4e,0xe5,0xe1]
31@ CHECK: stlex r2, r1, [r7]            @ encoding: [0x91,0x2e,0x87,0xe1]
32@ CHECK: stlexd r6, r2, r3, [r8]        @ encoding: [0x92,0x6e,0xa8,0xe1]
33@ CHECK-V7: instruction requires: acquire/release
34@ CHECK-V7: instruction requires: acquire/release
35@ CHECK-V7: instruction requires: acquire/release
36@ CHECK-V7: instruction requires: acquire/release
37
38        stlexd  r6, r2, r4, [r8]
39@ CHECK-ERROR: error: source operands must be sequential
40
41@ GNU alias
42        stlexd  r6, r2, [r8]
43@ CHECK: stlexd r6, r2, r3, [r8]        @ encoding: [0x92,0x6e,0xa8,0xe1]
44
45         lda r5, [r6]
46         ldab r5, [r6]
47         ldah r12, [r9]
48@ CHECK: lda r5, [r6]                   @ encoding: [0x9f,0x5c,0x96,0xe1]
49@ CHECK: ldab r5, [r6]                  @ encoding: [0x9f,0x5c,0xd6,0xe1]
50@ CHECK: ldah r12, [r9]                 @ encoding: [0x9f,0xcc,0xf9,0xe1]
51@ CHECK-V7: instruction requires: acquire/release
52@ CHECK-V7: instruction requires: acquire/release
53@ CHECK-V7: instruction requires: acquire/release
54
55         stl r3, [r0]
56         stlb r2, [r1]
57         stlh r2, [r3]
58@ CHECK: stl r3, [r0]                   @ encoding: [0x93,0xfc,0x80,0xe1]
59@ CHECK: stlb r2, [r1]                  @ encoding: [0x92,0xfc,0xc1,0xe1]
60@ CHECK: stlh r2, [r3]                  @ encoding: [0x92,0xfc,0xe3,0xe1]
61@ CHECK-V7: instruction requires: acquire/release
62@ CHECK-V7: instruction requires: acquire/release
63@ CHECK-V7: instruction requires: acquire/release
64