1 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.1a -show-encoding < %s 2> %t | FileCheck %s
2 // RUN: FileCheck --check-prefix=CHECK-ERROR <%t %s
11 //CHECK: casb w0, w1, [x2] // encoding: [0x41,0x7c,0xa0,0x08]
12 //CHECK: casab w0, w1, [x2] // encoding: [0x41,0x7c,0xe0,0x08]
13 //CHECK: caslb w0, w1, [x2] // encoding: [0x41,0xfc,0xa0,0x08]
14 //CHECK: casalb w0, w1, [x2] // encoding: [0x41,0xfc,0xe0,0x08]
18 //CHECK-ERROR: error: invalid operand for instruction
19 //CHECK-ERROR: casb w0, w1, [w2]
21 //CHECK-ERROR: error: invalid operand for instruction
22 //CHECK-ERROR: casalb x0, x1, [x2]
31 //CHECK: cash w0, w1, [x2] // encoding: [0x41,0x7c,0xa0,0x48]
32 //CHECK: casah w0, w1, [x2] // encoding: [0x41,0x7c,0xe0,0x48]
33 //CHECK: caslh w0, w1, [x2] // encoding: [0x41,0xfc,0xa0,0x48]
34 //CHECK: casalh w0, w1, [x2] // encoding: [0x41,0xfc,0xe0,0x48]
42 //CHECK: cas w0, w1, [x2] // encoding: [0x41,0x7c,0xa0,0x88]
43 //CHECK: casa w0, w1, [x2] // encoding: [0x41,0x7c,0xe0,0x88]
44 //CHECK: casl w0, w1, [x2] // encoding: [0x41,0xfc,0xa0,0x88]
45 //CHECK: casal w0, w1, [x2] // encoding: [0x41,0xfc,0xe0,0x88]
50 //CHECK-ERROR: error: invalid operand for instruction
51 //CHECK-ERROR: cas w0, w1, [w2]
53 //CHECK-ERROR: error: invalid operand for instruction
54 //CHECK-ERROR: casl w0, x1, [x2]
63 //CHECK: cas x0, x1, [x2] // encoding: [0x41,0x7c,0xa0,0xc8]
64 //CHECK: casa x0, x1, [x2] // encoding: [0x41,0x7c,0xe0,0xc8]
65 //CHECK: casl x0, x1, [x2] // encoding: [0x41,0xfc,0xa0,0xc8]
66 //CHECK: casal x0, x1, [x2] // encoding: [0x41,0xfc,0xe0,0xc8]
71 //CHECK-ERROR: error: invalid operand for instruction
72 //CHECK-ERROR: casa x0, x1, [w2]
74 //CHECK-ERROR: error: invalid operand for instruction
75 //CHECK-ERROR: casal x0, w1, [x2]
85 ldumaxalh w0, w1, [x2]
87 //CHECK: ldadda x0, x1, [x2] // encoding: [0x41,0x00,0xa0,0xf8]
88 //CHECK: ldclrl x0, x1, [x2] // encoding: [0x41,0x10,0x60,0xf8]
89 //CHECK: ldeoral x0, x1, [x2] // encoding: [0x41,0x20,0xe0,0xf8]
90 //CHECK: ldset x0, x1, [x2] // encoding: [0x41,0x30,0x20,0xf8]
91 //CHECK: ldsmaxa w0, w1, [x2] // encoding: [0x41,0x40,0xa0,0xb8]
92 //CHECK: ldsminlb w0, w1, [x2] // encoding: [0x41,0x50,0x60,0x38]
93 //CHECK: ldumaxalh w0, w1, [x2] // encoding: [0x41,0x60,0xe0,0x78]
94 //CHECK: ldumin w0, w1, [x2] // encoding: [0x41,0x70,0x20,0xb8]
96 // ST<OP> intructions: aliases to LD<OP>
105 //CHECK: staddlb w0, [x2] // encoding: [0x5f,0x00,0x60,0x38]
106 //CHECK: stclrlh w0, [x2] // encoding: [0x5f,0x10,0x60,0x78]
107 //CHECK: steorl w0, [x2] // encoding: [0x5f,0x20,0x60,0xb8]
108 //CHECK: stsetl x0, [x2] // encoding: [0x5f,0x30,0x60,0xf8]
109 //CHECK: stsmaxb w0, [x2] // encoding: [0x5f,0x40,0x20,0x38]
110 //CHECK: stsminh w0, [x2] // encoding: [0x5f,0x50,0x20,0x78]
111 //CHECK: stumax w0, [x2] // encoding: [0x5f,0x60,0x20,0xb8]
112 //CHECK: stumin x0, [x2] // encoding: [0x5f,0x70,0x20,0xf8]
116 //CHECK-ERROR: error: invalid operand for instruction
117 //CHECK-ERROR: ldsmax x0, x1, [w2]
119 //CHECK-ERROR: error: invalid operand for instruction
120 //CHECK-ERROR: ldeorl w0, w1, [w2]
128 //CHECK: swp x0, x1, [x2] // encoding: [0x41,0x80,0x20,0xf8]
129 //CHECK: swpb w0, w1, [x2] // encoding: [0x41,0x80,0x20,0x38]
130 //CHECK: swplh w0, w1, [x2] // encoding: [0x41,0x80,0x60,0x78]
131 //CHECK: swpal x0, x1, [sp] // encoding: [0xe1,0x83,0xe0,0xf8]
135 //CHECK-ERROR: error: invalid operand for instruction
136 //CHECK-ERROR: swp x0, x1, [w2]
138 //CHECK-ERROR: error: invalid operand for instruction
139 //CHECK-ERROR: swp x0, x1, [xzr]
143 casp x0, x1, x2, x3, [x4]
144 casp w0, w1, w2, w3, [x4]
145 //CHECK: casp x0, x1, x2, x3, [x4] // encoding: [0x82,0x7c,0x20,0x48]
146 //CHECK: casp w0, w1, w2, w3, [x4] // encoding: [0x82,0x7c,0x20,0x08]
148 casp x1, x2, x4, x5, [x6]
149 casp x0, x1, x3, x4, [x5]
150 casp x0, x2, x4, x5, [x6]
151 casp x0, x1, x2, x4, [x5]
152 casp x0, w1, x2, x3, [x5]
153 casp w0, x1, x2, x3, [x5]
154 casp w0, x1, w2, w3, [x5]
155 casp x0, x1, w2, w3, [x5]
156 //CHECK-ERROR: error: expected first even register of a consecutive same-size even/odd register pair
157 //CHECK-ERROR: casp x1, x2, x4, x5, [x6]
159 //CHECK-ERROR: error: expected first even register of a consecutive same-size even/odd register pair
160 //CHECK-ERROR: casp x0, x1, x3, x4, [x5]
162 //CHECK-ERROR: error: expected second odd register of a consecutive same-size even/odd register pair
163 //CHECK-ERROR: casp x0, x2, x4, x5, [x6]
165 //CHECK-ERROR: error: expected second odd register of a consecutive same-size even/odd register pair
166 //CHECK-ERROR: casp x0, x1, x2, x4, [x5]
168 //CHECK-ERROR: error: expected second odd register of a consecutive same-size even/odd register pair
169 //CHECK-ERROR: casp x0, w1, x2, x3, [x5]
171 //CHECK-ERROR: error: expected second odd register of a consecutive same-size even/odd register pair
172 //CHECK-ERROR: casp w0, x1, x2, x3, [x5]
174 //CHECK-ERROR: error: expected second odd register of a consecutive same-size even/odd register pair
175 //CHECK-ERROR: casp w0, x1, w2, w3, [x5]
177 //CHECK-ERROR: error: invalid operand for instruction
178 //CHECK-ERROR: casp x0, x1, w2, w3, [x5]