1 # RUN: llvm-mc -triple hexagon -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s
2 # Hexagon Programmer's Reference Manual 11.5 LD
6 r17:16 = memd
(r21 + r31<<#3)
10 # CHECK-NEXT: 10 c5 c0 49
13 r17:16 = memd
(r21 + #48)
15 r17:16 = memd
(r21 ++ #40:circ(m1))
17 r17:16 = memd
(r21 ++ I
:circ
(m1
))
19 # CHECK-NEXT: 70 d7 d5 9b
20 r17:16 = memd
(r21 = ##31)
22 r17:16 = memd
(r21+
+#40)
24 r17:16 = memd
(r21+
+m1
)
26 r17:16 = memd
(r21 ++ m1
:brev
)
28 # Load doubleword conditionally
30 if
(p3
) r17:16 = memd
(r21+
r31<<#3)
32 if
(!p3
) r17:16 = memd
(r21+
r31<<#3)
34 # CHECK-NEXT: f0 ff d5 32
36 if
(p3.new
) r17:16 = memd
(r21+
r31<<#3) }
38 # CHECK-NEXT: f0 ff d5 33
40 if
(!p3.new
) r17:16 = memd
(r21+
r31<<#3) }
42 if
(p3
) r17:16 = memd
(r21 + #24)
44 # CHECK-NEXT: 70 d8 d5 43
46 if
(p3.new
) r17:16 = memd
(r21 + #24) }
48 if
(!p3
) r17:16 = memd
(r21 + #24)
50 # CHECK-NEXT: 70 d8 d5 47
52 if
(!p3.new
) r17:16 = memd
(r21 + #24) }
54 if
(p3
) r17:16 = memd
(r21+
+#40)
56 if
(!p3
) r17:16 = memd
(r21+
+#40)
58 # CHECK-NEXT: b0 f6 d5 9b
60 if
(p3.new
) r17:16 = memd
(r21+
+#40) }
62 # CHECK-NEXT: b0 fe d5 9b
64 if
(!p3.new
) r17:16 = memd
(r21+
+#40) }
68 r17 = memb
(r21 + r31<<#3)
72 # CHECK-NEXT: b1 c2 00 49
77 r17 = memb
(r21 ++ #5:circ(m1))
79 r17 = memb
(r21 ++ I
:circ
(m1
))
81 # CHECK-NEXT: 71 d7 15 9b
82 r17 = memb
(r21 = ##31)
88 r17 = memb
(r21 ++ m1
:brev
)
90 # Load byte conditionally
92 if
(p3
) r17 = memb
(r21+
r31<<#3)
94 if
(!p3
) r17 = memb
(r21+
r31<<#3)
96 # CHECK-NEXT: f1 ff 15 32
98 if
(p3.new
) r17 = memb
(r21+
r31<<#3) }
100 # CHECK-NEXT: f1 ff 15 33
102 if
(!p3.new
) r17 = memb
(r21+
r31<<#3) }
104 if
(p3
) r17 = memb
(r21 + #44)
106 # CHECK-NEXT: 91 dd 15 43
108 if
(p3.new
) r17 = memb
(r21 + #44) }
110 if
(!p3
) r17 = memb
(r21 + #44)
112 # CHECK-NEXT: 91 dd 15 47
114 if
(!p3.new
) r17 = memb
(r21 + #44) }
116 if
(p3
) r17 = memb
(r21+
+#5)
118 if
(!p3
) r17 = memb
(r21+
+#5)
120 # CHECK-NEXT: b1 f6 15 9b
122 if
(p3.new
) r17 = memb
(r21+
+#5) }
124 # CHECK-NEXT: b1 fe 15 9b
126 if
(!p3.new
) r17 = memb
(r21+
+#5) }
128 # Load byte into shifted vector
130 r17:16 = memb_fifo
(r21 + #31)
132 r17:16 = memb_fifo
(r21 ++ #5:circ(m1))
134 r17:16 = memb_fifo
(r21 ++ I
:circ
(m1
))
136 # Load half into shifted vector
138 r17:16 = memh_fifo
(r21 + #62)
140 r17:16 = memh_fifo
(r21 ++ #10:circ(m1))
142 r17:16 = memh_fifo
(r21 ++ I
:circ
(m1
))
146 r17 = memh
(r21 + r31<<#3)
150 # CHECK-NEXT: 51 c5 40 49
153 r17 = memh
(r21 + #62)
155 r17 = memh
(r21 ++ #10:circ(m1))
157 r17 = memh
(r21 ++ I
:circ
(m1
))
159 # CHECK-NEXT: 71 d7 55 9b
160 r17 = memh
(r21 = ##31)
166 r17 = memh
(r21 ++ m1
:brev
)
168 # Load halfword conditionally
170 if
(p3
) r17 = memh
(r21+
r31<<#3)
172 if
(!p3
) r17 = memh
(r21+
r31<<#3)
174 # CHECK-NEXT: f1 ff 55 32
176 if
(p3.new
) r17 = memh
(r21+
r31<<#3) }
178 # CHECK-NEXT: f1 ff 55 33
180 if
(!p3.new
) r17 = memh
(r21+
r31<<#3) }
182 if
(p3
) r17 = memh
(r21+
+#10)
184 if
(!p3
) r17 = memh
(r21+
+#10)
186 # CHECK-NEXT: b1 f6 55 9b
188 if
(p3.new
) r17 = memh
(r21+
+#10) }
190 # CHECK-NEXT: b1 fe 55 9b
192 if
(!p3.new
) r17 = memh
(r21+
+#10) }
194 if
(p3
) r17 = memh
(r21 + #62)
196 if
(!p3
) r17 = memh
(r21 + #62)
198 # CHECK-NEXT: f1 db 55 43
200 if
(p3.new
) r17 = memh
(r21 + #62) }
202 # CHECK-NEXT: f1 db 55 47
204 if
(!p3.new
) r17 = memh
(r21 + #62) }
208 r17 = memub
(r21 + r31<<#3)
212 # CHECK-NEXT: b1 c2 20 49
215 r17 = memub
(r21 + #31)
217 r17 = memub
(r21 ++ #5:circ(m1))
219 r17 = memub
(r21 ++ I
:circ
(m1
))
221 # CHECK-NEXT: 71 d7 35 9b
222 r17 = memub
(r21 = ##31)
228 r17 = memub
(r21 ++ m1
:brev
)
230 # Load unsigned byte conditionally
232 if
(p3
) r17 = memub
(r21+
r31<<#3)
234 if
(!p3
) r17 = memub
(r21+
r31<<#3)
236 # CHECK-NEXT: f1 ff 35 32
238 if
(p3.new
) r17 = memub
(r21+
r31<<#3) }
240 # CHECK-NEXT: f1 ff 35 33
242 if
(!p3.new
) r17 = memub
(r21+
r31<<#3) }
244 if
(p3
) r17 = memub
(r21 + #31)
246 # CHECK-NEXT: f1 db 35 43
248 if
(p3.new
) r17 = memub
(r21 + #31) }
250 if
(!p3
) r17 = memub
(r21 + #31)
252 # CHECK-NEXT: f1 db 35 47
254 if
(!p3.new
) r17 = memub
(r21 + #31) }
256 if
(p3
) r17 = memub
(r21+
+#5)
258 if
(!p3
) r17 = memub
(r21+
+#5)
260 # CHECK-NEXT: b1 f6 35 9b
262 if
(p3.new
) r17 = memub
(r21+
+#5) }
264 # CHECK-NEXT: b1 fe 35 9b
266 if
(!p3.new
) r17 = memub
(r21+
+#5) }
268 # Load unsigned halfword
270 r17 = memuh
(r21 + r31<<#3)
274 # CHECK-NEXT: 51 c5 60 49
277 r17 = memuh
(r21 + #42)
279 r17 = memuh
(r21 ++ #10:circ(m1))
281 r17 = memuh
(r21 ++ I
:circ
(m1
))
283 # CHECK-NEXT: 71 d7 75 9b
284 r17 = memuh
(r21 = ##31)
286 r17 = memuh
(r21+
+#10)
290 r17 = memuh
(r21 ++ m1
:brev
)
292 # Load unsigned halfword conditionally
294 if
(p3
) r17 = memuh
(r21+
r31<<#3)
296 if
(!p3
) r17 = memuh
(r21+
r31<<#3)
298 # CHECK-NEXT: f1 ff 75 32
300 if
(p3.new
) r17 = memuh
(r21+
r31<<#3) }
302 # CHECK-NEXT: f1 ff 75 33
304 if
(!p3.new
) r17 = memuh
(r21+
r31<<#3) }
306 if
(p3
) r17 = memuh
(r21 + #42)
308 if
(!p3
) r17 = memuh
(r21 + #42)
310 # CHECK-NEXT: b1 da 75 43
312 if
(p3.new
) r17 = memuh
(r21 + #42) }
314 # CHECK-NEXT: b1 da 75 47
316 if
(!p3.new
) r17 = memuh
(r21 + #42) }
318 if
(p3
) r17 = memuh
(r21+
+#10)
320 if
(!p3
) r17 = memuh
(r21+
+#10)
322 # CHECK-NEXT: b1 f6 75 9b
324 if
(p3.new
) r17 = memuh
(r21+
+#10) }
326 # CHECK-NEXT: b1 fe 75 9b
328 if
(!p3.new
) r17 = memuh
(r21+
+#10) }
332 r17 = memw
(r21 + r31<<#3)
336 # CHECK-NEXT: 91 c2 80 49
339 r17 = memw
(r21 + #84)
341 r17 = memw
(r21 ++ #20:circ(m1))
343 r17 = memw
(r21 ++ I
:circ
(m1
))
345 # CHECK-NEXT: 71 d7 95 9b
346 r17 = memw
(r21 = ##31)
352 r17 = memw
(r21 ++ m1
:brev
)
354 # Load word conditionally
356 if
(p3
) r17 = memw
(r21+
r31<<#3)
358 if
(!p3
) r17 = memw
(r21+
r31<<#3)
360 # CHECK-NEXT: f1 ff 95 32
362 if
(p3.new
) r17 = memw
(r21+
r31<<#3) }
364 # CHECK-NEXT: f1 ff 95 33
366 if
(!p3.new
) r17 = memw
(r21+
r31<<#3) }
368 if
(p3
) r17 = memw
(r21 + #84)
370 if
(!p3
) r17 = memw
(r21 + #84)
372 # CHECK-NEXT: b1 da 95 43
374 if
(p3.new
) r17 = memw
(r21 + #84) }
376 # CHECK-NEXT: b1 da 95 47
378 if
(!p3.new
) r17 = memw
(r21 + #84) }
380 if
(p3
) r17 = memw
(r21+
+#20)
382 if
(!p3
) r17 = memw
(r21+
+#20)
384 # CHECK-NEXT: b1 f6 95 9b
386 if
(p3.new
) r17 = memw
(r21+
+#20) }
388 # CHECK-NEXT: b1 fe 95 9b
390 if
(!p3.new
) r17 = memw
(r21+
+#20) }
392 # Deallocate stack frame
396 # Deallocate stack frame and return
400 # CHECK-NEXT: 1e cb 1e 96
402 if
(p3.new
) dealloc_return
:nt
}
404 if
(p3
) dealloc_return
406 # CHECK-NEXT: 1e db 1e 96
408 if
(p3.new
) dealloc_return
:t }
410 # CHECK-NEXT: 1e eb 1e 96
412 if
(!p3.new
) dealloc_return
:nt
}
414 if
(!p3
) dealloc_return
416 # CHECK-NEXT: 1e fb 1e 96
418 if
(!p3.new
) dealloc_return
:t }
420 # Load and unpack bytes to halfwords
422 r17 = membh
(r21 + #62)
424 r17 = memubh
(r21 + #62)
426 r17:16 = memubh
(r21 + #124)
428 r17:16 = membh
(r21 + #124)
430 r17 = membh
(r21 ++ #10:circ(m1))
432 r17 = membh
(r21 ++ I
:circ
(m1
))
434 r17 = memubh
(r21 ++ #10:circ(m1))
436 r17 = memubh
(r21 ++ I
:circ
(m1
))
438 r17:16 = membh
(r21 ++ #20:circ(m1))
440 r17:16 = membh
(r21 ++ I
:circ
(m1
))
442 r17:16 = memubh
(r21 ++ #20:circ(m1))
444 r17:16 = memubh
(r21 ++ I
:circ
(m1
))
446 # CHECK-NEXT: 71 d7 35 9a
447 r17 = membh
(r21 = ##31)
449 r17 = membh
(r21+
+#10)
451 # CHECK-NEXT: 71 d7 75 9a
452 r17 = memubh
(r21 = ##31)
454 r17 = memubh
(r21+
+#10)
456 # CHECK-NEXT: 70 d7 b5 9a
457 r17:16 = memubh
(r21 = ##31)
459 r17:16 = memubh
(r21+
+#20)
461 # CHECK-NEXT: 70 d7 f5 9a
462 r17:16 = membh
(r21 = ##31)
464 r17:16 = membh
(r21+
+#20)
466 # CHECK-NEXT: f1 f7 35 9c
467 r17 = membh
(r21<<#3 + ##31)
471 # CHECK-NEXT: f1 f7 75 9c
472 r17 = memubh
(r21<<#3 + ##31)
474 r17 = memubh
(r21+
+m1
)
476 # CHECK-NEXT: f0 f7 f5 9c
477 r17:16 = membh
(r21<<#3 + ##31)
479 r17:16 = membh
(r21+
+m1
)
481 # CHECK-NEXT: f0 f7 b5 9c
482 r17:16 = memubh
(r21<<#3 + ##31)
486 r17 = memubh
(r21+
+m1
)
488 r17:16 = membh
(r21+
+m1
)
490 r17:16 = memubh
(r21+
+m1
)
492 r17 = membh
(r21 ++ m1
:brev
)
494 r17 = memubh
(r21 ++ m1
:brev
)
496 r17:16 = memubh
(r21 ++ m1
:brev
)
498 r17:16 = membh
(r21 ++ m1
:brev
)