1 # RUN: llvm-mc -triple=hexagon -disassemble < %s | FileCheck %s
2 # Hexagon Programmer's Reference Manual 11.8 ST
6 # CHECK: memd(r17+r21<<#3) = r31:30
8 # CHECK: memd(gp+#320) = r21:20
9 0x02 0x40 0x00 0x00 0x28 0xd4 0xc0 0x48
10 # CHECK: memd(##168) = r21:20
12 # CHECK: memd(r17+#168) = r21:20
14 # CHECK: memd(r17++I:circ(m1)) = r21:20
16 # CHECK: memd(r17++#40:circ(m1)) = r21:20
18 # CHECK: memd(r17++#40) = r21:20
19 0x00 0x40 0x00 0x00 0xd5 0xfe 0xd1 0xad
20 # CHECK: memd(r17<<#3+##21) = r31:30
22 # CHECK: memd(r17++m1) = r21:20
24 # CHECK: memd(r17++m1:brev) = r21:20
26 # Store doubleword conditionally
28 # CHECK: if (p3) memd(r17+r21<<#3) = r31:30
30 # CHECK: if (!p3) memd(r17+r21<<#3) = r31:30
31 0x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x36
33 # CHECK-NEXT: if (p3.new) memd(r17+r21<<#3) = r31:30
34 0x03 0x40 0x45 0x85 0xfe 0xf5 0xd1 0x37
36 # CHECK-NEXT: if (!p3.new) memd(r17+r21<<#3) = r31:30
38 # CHECK: if (p3) memd(r17+#168) = r31:30
40 # CHECK: if (!p3) memd(r17+#168) = r31:30
41 0x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x42
43 # CHECK-NEXT: if (p3.new) memd(r17+#168) = r31:30
44 0x03 0x40 0x45 0x85 0xab 0xde 0xd1 0x46
46 # CHECK-NEXT: if (!p3.new) memd(r17+#168) = r31:30
48 # CHECK: if (p3) memd(r17++#40) = r21:20
50 # CHECK: if (!p3) memd(r17++#40) = r21:20
51 0x03 0x40 0x45 0x85 0xab 0xf4 0xd1 0xab
53 # CHECK-NEXT: if (p3.new) memd(r17++#40) = r21:20
54 0x03 0x40 0x45 0x85 0xaf 0xf4 0xd1 0xab
56 # CHECK-NEXT: if (!p3.new) memd(r17++#40) = r21:20
57 0x02 0x40 0x00 0x00 0xc3 0xd4 0xc2 0xaf
58 # CHECK: if (p3) memd(##168) = r21:20
59 0x02 0x40 0x00 0x00 0xc7 0xd4 0xc2 0xaf
60 # CHECK: if (!p3) memd(##168) = r21:20
61 0x03 0x40 0x45 0x85 0x02 0x40 0x00 0x00 0xc3 0xf4 0xc2 0xaf
63 # CHECK-NEXT: if (p3.new) memd(##168) = r21:20
64 0x03 0x40 0x45 0x85 0x02 0x40 0x00 0x00 0xc7 0xf4 0xc2 0xaf
66 # CHECK-NEXT: if (!p3.new) memd(##168) = r21:20
70 # CHECK: memb(r17+r21<<#3) = r31
72 # CHECK: memb(r17+#21) = #31
74 # CHECK: memb(gp+#21) = r21
75 0x00 0x40 0x00 0x00 0x15 0xd5 0x00 0x48
76 # CHECK: memb(##21) = r21
78 # CHECK: memb(r17+#21) = r21
80 # CHECK: memb(r17++I:circ(m1)) = r21
82 # CHECK: memb(r17++#5:circ(m1)) = r21
84 # CHECK: memb(r17++#5) = r21
85 0x00 0x40 0x00 0x00 0xd5 0xff 0x11 0xad
86 # CHECK: memb(r17<<#3+##21) = r31
88 # CHECK: memb(r17++m1) = r21
90 # CHECK: memb(r17++m1:brev) = r21
92 # Store byte conditionally
94 # CHECK: if (p3) memb(r17+r21<<#3) = r31
96 # CHECK: if (!p3) memb(r17+r21<<#3) = r31
97 0x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x36
99 # CHECK-NEXT: if (p3.new) memb(r17+r21<<#3) = r31
100 0x03 0x40 0x45 0x85 0xff 0xf5 0x11 0x37
102 # CHECK-NEXT: if (!p3.new) memb(r17+r21<<#3) = r31
104 # CHECK: if (p3) memb(r17+#21) = #31
106 # CHECK: if (!p3) memb(r17+#21) = #31
107 0x03 0x40 0x45 0x85 0xff 0xca 0x11 0x39
109 # CHECK-NEXT: if (p3.new) memb(r17+#21) = #31
110 0x03 0x40 0x45 0x85 0xff 0xca 0x91 0x39
112 # CHECK-NEXT: if (!p3.new) memb(r17+#21) = #31
114 # CHECK: if (p3) memb(r17+#21) = r31
116 # CHECK: if (!p3) memb(r17+#21) = r31
117 0x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x42
119 # CHECK-NEXT: if (p3.new) memb(r17+#21) = r31
120 0x03 0x40 0x45 0x85 0xab 0xdf 0x11 0x46
122 # CHECK-NEXT: if (!p3.new) memb(r17+#21) = r31
124 # CHECK: if (p3) memb(r17++#5) = r21
126 # CHECK: if (!p3) memb(r17++#5) = r21
127 0x03 0x40 0x45 0x85 0xab 0xf5 0x11 0xab
129 # CHECK-NEXT: if (p3.new) memb(r17++#5) = r21
130 0x03 0x40 0x45 0x85 0xaf 0xf5 0x11 0xab
132 # CHECK-NEXT: if (!p3.new) memb(r17++#5) = r21
133 0x00 0x40 0x00 0x00 0xab 0xd5 0x01 0xaf
134 # CHECK: if (p3) memb(##21) = r21
135 0x00 0x40 0x00 0x00 0xaf 0xd5 0x01 0xaf
136 # CHECK: if (!p3) memb(##21) = r21
137 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xab 0xf5 0x01 0xaf
139 # CHECK-NEXT: if (p3.new) memb(##21) = r21
140 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xaf 0xf5 0x01 0xaf
142 # CHECK-NEXT: if (!p3.new) memb(##21) = r21
146 # CHECK: memh(r17+r21<<#3) = r31
148 # CHECK: memh(r17+r21<<#3) = r31.h
150 # CHECK: memh(r17+#62) = #21
151 0x00 0x40 0x00 0x00 0x2a 0xd5 0x40 0x48
152 # CHECK: memh(##42) = r21
153 0x00 0x40 0x00 0x00 0x2a 0xd5 0x60 0x48
154 # CHECK: memh(##42) = r21.h
156 # CHECK: memh(gp+#84) = r21
158 # CHECK: memh(gp+#84) = r21.h
160 # CHECK: memh(r17+#42) = r31
162 # CHECK: memh(r17+#42) = r31.h
164 # CHECK: memh(r17++I:circ(m1)) = r21
166 # CHECK: memh(r17++#10:circ(m1)) = r21
168 # CHECK: memh(r17++I:circ(m1)) = r21.h
170 # CHECK: memh(r17++#10:circ(m1)) = r21.h
172 # CHECK: memh(r17++#10) = r21
173 0x00 0x40 0x00 0x00 0xd5 0xff 0x51 0xad
174 # CHECK: memh(r17<<#3+##21) = r31
176 # CHECK: memh(r17++#10) = r21.h
177 0x00 0x40 0x00 0x00 0xd5 0xff 0x71 0xad
178 # CHECK: memh(r17<<#3+##21) = r31.h
180 # CHECK: memh(r17++m1) = r21
182 # CHECK: memh(r17++m1) = r21.h
184 # CHECK: memh(r17++m1:brev) = r21
186 # CHECK: memh(r17++m1:brev) = r21.h
188 # Store halfword conditionally
190 # CHECK: if (p3) memh(r17+r21<<#3) = r31
192 # CHECK: if (p3) memh(r17+r21<<#3) = r31.h
194 # CHECK: if (!p3) memh(r17+r21<<#3) = r31
196 # CHECK: if (!p3) memh(r17+r21<<#3) = r31.h
197 0x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x36
199 # CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31
200 0x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x36
202 # CHECK-NEXT: if (p3.new) memh(r17+r21<<#3) = r31.h
203 0x03 0x40 0x45 0x85 0xff 0xf5 0x51 0x37
205 # CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31
206 0x03 0x40 0x45 0x85 0xff 0xf5 0x71 0x37
208 # CHECK-NEXT: if (!p3.new) memh(r17+r21<<#3) = r31.h
210 # CHECK: if (p3) memh(r17+#62) = #21
212 # CHECK: if (!p3) memh(r17+#62) = #21
213 0x03 0x40 0x45 0x85 0xf5 0xcf 0x31 0x39
215 # CHECK-NEXT: if (p3.new) memh(r17+#62) = #21
216 0x03 0x40 0x45 0x85 0xf5 0xcf 0xb1 0x39
218 # CHECK-NEXT: if (!p3.new) memh(r17+#62) = #21
220 # CHECK: if (p3) memh(r17+#62) = r21
222 # CHECK: if (p3) memh(r17+#62) = r21.h
224 # CHECK: if (!p3) memh(r17+#62) = r21
226 # CHECK: if (!p3) memh(r17+#62) = r21.h
227 0x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x42
229 # CHECK-NEXT: if (p3.new) memh(r17+#62) = r21
230 0x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x42
232 # CHECK-NEXT: if (p3.new) memh(r17+#62) = r21.h
233 0x03 0x40 0x45 0x85 0xfb 0xd5 0x51 0x46
235 # CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21
236 0x03 0x40 0x45 0x85 0xfb 0xd5 0x71 0x46
238 # CHECK-NEXT: if (!p3.new) memh(r17+#62) = r21.h
240 # CHECK: if (p3) memh(r17++#10) = r21
242 # CHECK: if (!p3) memh(r17++#10) = r21
243 0x03 0x40 0x45 0x85 0xab 0xf5 0x51 0xab
245 # CHECK-NEXT: if (p3.new) memh(r17++#10) = r21
246 0x03 0x40 0x45 0x85 0xaf 0xf5 0x51 0xab
248 # CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21
250 # CHECK: if (p3) memh(r17++#10) = r21.h
252 # CHECK: if (!p3) memh(r17++#10) = r21.h
253 0x03 0x40 0x45 0x85 0xab 0xf5 0x71 0xab
255 # CHECK-NEXT: if (p3.new) memh(r17++#10) = r21.h
256 0x03 0x40 0x45 0x85 0xaf 0xf5 0x71 0xab
258 # CHECK-NEXT: if (!p3.new) memh(r17++#10) = r21.h
259 0x00 0x40 0x00 0x00 0xd3 0xd5 0x42 0xaf
260 # CHECK: if (p3) memh(##42) = r21
261 0x00 0x40 0x00 0x00 0xd3 0xd5 0x62 0xaf
262 # CHECK: if (p3) memh(##42) = r21.h
263 0x00 0x40 0x00 0x00 0xd7 0xd5 0x42 0xaf
264 # CHECK: if (!p3) memh(##42) = r21
265 0x00 0x40 0x00 0x00 0xd7 0xd5 0x62 0xaf
266 # CHECK: if (!p3) memh(##42) = r21.h
267 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd3 0xf5 0x42 0xaf
269 # CHECK-NEXT: if (p3.new) memh(##42) = r21
270 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd3 0xf5 0x62 0xaf
272 # CHECK-NEXT: if (p3.new) memh(##42) = r21.h
273 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd7 0xf5 0x42 0xaf
275 # CHECK-NEXT: if (!p3.new) memh(##42) = r21
276 0x03 0x40 0x45 0x85 0x00 0x40 0x00 0x00 0xd7 0xf5 0x62 0xaf
278 # CHECK-NEXT: if (!p3.new) memh(##42) = r21.h
282 # CHECK: memw(r17+r21<<#3) = r31
284 # CHECK: memw(r17+#84) = #31
286 # CHECK: memw(gp+#84) = r31
287 0x01 0x40 0x00 0x00 0x14 0xd5 0x80 0x48
288 # CHECK: memw(##84) = r21
290 # CHECK: memw(r17+#84) = #31
292 # CHECK: memw(r17+#84) = r31
294 # CHECK: memw(r17++I:circ(m1)) = r21
296 # CHECK: memw(r17++#20:circ(m1)) = r21
298 # CHECK: memw(r17++#20) = r21
299 0x00 0x40 0x00 0x00 0xd5 0xff 0x91 0xad
300 # CHECK: memw(r17<<#3+##21) = r31
302 # CHECK: memw(r17++m1) = r21
304 # CHECK: memw(r17++m1:brev) = r21
306 # Store word conditionally
308 # CHECK: if (p3) memw(r17+r21<<#3) = r31
310 # CHECK: if (!p3) memw(r17+r21<<#3) = r31
311 0x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x36
313 # CHECK-NEXT: if (p3.new) memw(r17+r21<<#3) = r31
314 0x03 0x40 0x45 0x85 0xff 0xf5 0x91 0x37
316 # CHECK-NEXT: if (!p3.new) memw(r17+r21<<#3) = r31
318 # CHECK: if (p3) memw(r17+#84) = #31
320 # CHECK: if (!p3) memw(r17+#84) = #31
321 0x03 0x40 0x45 0x85 0xff 0xca 0x51 0x39
323 # CHECK-NEXT: if (p3.new) memw(r17+#84) = #31
324 0x03 0x40 0x45 0x85 0xff 0xca 0xd1 0x39
326 # CHECK-NEXT: if (!p3.new) memw(r17+#84) = #31
328 # CHECK: if (p3) memw(r17+#84) = r31
330 # CHECK: if (!p3) memw(r17+#84) = r31
331 0x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x42
333 # CHECK-NEXT: if (p3.new) memw(r17+#84) = r31
334 0x03 0x40 0x45 0x85 0xab 0xdf 0x91 0x46
336 # CHECK-NEXT: if (!p3.new) memw(r17+#84) = r31
338 # CHECK: if (p3) memw(r17++#20) = r21
340 # CHECK: if (!p3) memw(r17++#20) = r21
341 0x03 0x40 0x45 0x85 0xaf 0xf5 0x91 0xab
343 # CHECK-NEXT: if (!p3.new) memw(r17++#20) = r21
344 0x03 0x40 0x45 0x85 0xab 0xf5 0x91 0xab
346 # CHECK-NEXT: if (p3.new) memw(r17++#20) = r21
347 0x01 0x40 0x00 0x00 0xa3 0xd5 0x81 0xaf
348 # CHECK: if (p3) memw(##84) = r21
349 0x01 0x40 0x00 0x00 0xa7 0xd5 0x81 0xaf
350 # CHECK: if (!p3) memw(##84) = r21
351 0x03 0x40 0x45 0x85 0x01 0x40 0x00 0x00 0xa3 0xf5 0x81 0xaf
353 # CHECK-NEXT: if (p3.new) memw(##84) = r21
354 0x03 0x40 0x45 0x85 0x01 0x40 0x00 0x00 0xa7 0xf5 0x81 0xaf
356 # CHECK-NEXT: if (!p3.new) memw(##84) = r21
358 # Allocate stack frame
360 # CHECK: allocframe(#248)