• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: llvm-mc -triple hexagon -filetype=obj -o - %s | llvm-objdump -d - | FileCheck %s
2# Hexagon Programmer's Reference Manual 11.5 LD
3
4# CHECK: 02 40 00 00
5# CHECK-NEXT: 10 c5 c0 49
6r17:16 = memd(##168)
7# CHECK: d0 c0 d5 91
8r17:16 = memd(r21 + #48)
9# CHECK: b0 e0 d5 99
10r17:16 = memd(r21 ++ #40:circ(m1))
11# CHECK: 10 e2 d5 99
12r17:16 = memd(r21 ++ I:circ(m1))
13# CHECK: 00 40 00 00
14# CHECK-NEXT: 70 d7 d5 9b
15r17:16 = memd(r21 = ##31)
16# CHECK: b0 c0 d5 9b
17r17:16 = memd(r21++#40)
18# CHECK: 10 e0 d5 9d
19r17:16 = memd(r21++m1)
20# CHECK: 10 e0 d5 9f
21r17:16 = memd(r21 ++ m1:brev)
22
23# Load doubleword conditionally
24# CHECK: f0 ff d5 30
25if (p3) r17:16 = memd(r21+r31<<#3)
26# CHECK: f0 ff d5 31
27if (!p3) r17:16 = memd(r21+r31<<#3)
28# CHECK: 03 40 45 85
29# CHECK-NEXT: f0 ff d5 32
30{ p3 = r5
31  if (p3.new) r17:16 = memd(r21+r31<<#3) }
32# CHECK: 03 40 45 85
33# CHECK-NEXT: f0 ff d5 33
34{ p3 = r5
35  if (!p3.new) r17:16 = memd(r21+r31<<#3) }
36# CHECK: 70 d8 d5 41
37if (p3) r17:16 = memd(r21 + #24)
38# CHECK: 03 40 45 85
39# CHECK-NEXT: 70 d8 d5 43
40{ p3 = r5
41  if (p3.new) r17:16 = memd(r21 + #24) }
42# CHECK: 70 d8 d5 45
43if (!p3) r17:16 = memd(r21 + #24)
44# CHECK: 03 40 45 85
45# CHECK-NEXT: 70 d8 d5 47
46{ p3 = r5
47  if (!p3.new) r17:16 = memd(r21 + #24) }
48# CHECK: b0 e6 d5 9b
49if (p3) r17:16 = memd(r21++#40)
50# CHECK: b0 ee d5 9b
51if (!p3) r17:16 = memd(r21++#40)
52# CHECK: 03 40 45 85
53# CHECK-NEXT: b0 f6 d5 9b
54{ p3 = r5
55  if (p3.new) r17:16 = memd(r21++#40) }
56# CHECK: 03 40 45 85
57# CHECK-NEXT: b0 fe d5 9b
58{ p3 = r5
59  if (!p3.new) r17:16 = memd(r21++#40) }
60
61# Load byte
62# CHECK: 91 ff 15 3a
63r17 = memb(r21 + r31<<#3)
64# CHECK: b1 c2 00 49
65r17 = memb(#21)
66# CHECK: 00 40 00 00
67# CHECK-NEXT: b1 c2 00 49
68r17 = memb(##21)
69# CHECK: f1 c3 15 91
70r17 = memb(r21 + #31)
71# CHECK: b1 e0 15 99
72r17 = memb(r21 ++ #5:circ(m1))
73# CHECK: 11 e2 15 99
74r17 = memb(r21 ++ I:circ(m1))
75# CHECK: 00 40 00 00
76# CHECK-NEXT: 71 d7 15 9b
77r17 = memb(r21 = ##31)
78# CHECK: b1 c0 15 9b
79r17 = memb(r21++#5)
80# CHECK: 11 e0 15 9d
81r17 = memb(r21++m1)
82# CHECK: 11 e0 15 9f
83r17 = memb(r21 ++ m1:brev)
84
85# Load byte conditionally
86# CHECK: f1 ff 15 30
87if (p3) r17 = memb(r21+r31<<#3)
88# CHECK: f1 ff 15 31
89if (!p3) r17 = memb(r21+r31<<#3)
90# CHECK: 03 40 45 85
91# CHECK-NEXT: f1 ff 15 32
92{ p3 = r5
93  if (p3.new) r17 = memb(r21+r31<<#3) }
94# CHECK: 03 40 45 85
95# CHECK-NEXT: f1 ff 15 33
96{ p3 = r5
97  if (!p3.new) r17 = memb(r21+r31<<#3) }
98# CHECK: 91 dd 15 41
99if (p3) r17 = memb(r21 + #44)
100# CHECK: 03 40 45 85
101# CHECK-NEXT: 91 dd 15 43
102{ p3 = r5
103  if (p3.new) r17 = memb(r21 + #44) }
104# CHECK: 91 dd 15 45
105if (!p3) r17 = memb(r21 + #44)
106# CHECK: 03 40 45 85
107# CHECK-NEXT: 91 dd 15 47
108{ p3 = r5
109  if (!p3.new) r17 = memb(r21 + #44) }
110# CHECK: b1 e6 15 9b
111if (p3) r17 = memb(r21++#5)
112# CHECK: b1 ee 15 9b
113if (!p3) r17 = memb(r21++#5)
114# CHECK: 03 40 45 85
115# CHECK-NEXT: b1 f6 15 9b
116{ p3 = r5
117  if (p3.new) r17 = memb(r21++#5) }
118# CHECK: 03 40 45 85
119# CHECK-NEXT: b1 fe 15 9b
120{ p3 = r5
121  if (!p3.new) r17 = memb(r21++#5) }
122
123# Load byte into shifted vector
124# CHECK: f0 c3 95 90
125r17:16 = memb_fifo(r21 + #31)
126# CHECK: b0 e0 95 98
127r17:16 = memb_fifo(r21 ++ #5:circ(m1))
128# CHECK: 10 e2 95 98
129r17:16 = memb_fifo(r21 ++ I:circ(m1))
130
131# Load half into shifted vector
132# CHECK: f0 c3 55 90
133r17:16 = memh_fifo(r21 + #62)
134# CHECK: b0 e0 55 98
135r17:16 = memh_fifo(r21 ++ #10:circ(m1))
136# CHECK: 10 e2 55 98
137r17:16 = memh_fifo(r21 ++ I:circ(m1))
138
139# Load halfword
140# CHECK: 91 ff 55 3a
141r17 = memh(r21 + r31<<#3)
142# CHECK: b1 c2 40 49
143r17 = memh(#42)
144# CHECK: 00 40 00 00
145# CHECK-NEXT: 51 c5 40 49
146r17 = memh(##42)
147# CHECK: f1 c3 55 91
148r17 = memh(r21 + #62)
149# CHECK: b1 e0 55 99
150r17 = memh(r21 ++ #10:circ(m1))
151# CHECK: 11 e2 55 99
152r17 = memh(r21 ++ I:circ(m1))
153# CHECK: 00 40 00 00
154# CHECK-NEXT: 71 d7 55 9b
155r17 = memh(r21 = ##31)
156# CHECK: b1 c0 55 9b
157r17 = memh(r21++#10)
158# CHECK: 11 e0 55 9d
159r17 = memh(r21++m1)
160# CHECK: 11 e0 55 9f
161r17 = memh(r21 ++ m1:brev)
162
163# Load halfword conditionally
164# CHECK: f1 ff 55 30
165if (p3) r17 = memh(r21+r31<<#3)
166# CHECK: f1 ff 55 31
167if (!p3) r17 = memh(r21+r31<<#3)
168# CHECK: 03 40 45 85
169# CHECK-NEXT: f1 ff 55 32
170{ p3 = r5
171  if (p3.new) r17 = memh(r21+r31<<#3) }
172# CHECK: 03 40 45 85
173# CHECK-NEXT: f1 ff 55 33
174{ p3 = r5
175  if (!p3.new) r17 = memh(r21+r31<<#3) }
176# CHECK: b1 e6 55 9b
177if (p3) r17 = memh(r21++#10)
178# CHECK: b1 ee 55 9b
179if (!p3) r17 = memh(r21++#10)
180# CHECK: 03 40 45 85
181# CHECK-NEXT: b1 f6 55 9b
182{ p3 = r5
183  if (p3.new) r17 = memh(r21++#10) }
184# CHECK: 03 40 45 85
185# CHECK-NEXT: b1 fe 55 9b
186{ p3 = r5
187  if (!p3.new) r17 = memh(r21++#10) }
188# CHECK: f1 db 55 41
189if (p3) r17 = memh(r21 + #62)
190# CHECK: f1 db 55 45
191if (!p3) r17 = memh(r21 + #62)
192# CHECK: 03 40 45 85
193# CHECK-NEXT: f1 db 55 43
194{ p3 = r5
195  if (p3.new) r17 = memh(r21 + #62) }
196# CHECK: 03 40 45 85
197# CHECK-NEXT: f1 db 55 47
198{ p3 = r5
199  if (!p3.new) r17 = memh(r21 + #62) }
200
201# Load unsigned byte
202# CHECK: 91 ff 35 3a
203r17 = memub(r21 + r31<<#3)
204# CHECK: b1 c2 20 49
205r17 = memub(#21)
206# CHECK: 00 40 00 00
207# CHECK-NEXT: b1 c2 20 49
208r17 = memub(##21)
209# CHECK: f1 c3 35 91
210r17 = memub(r21 + #31)
211# CHECK: b1 e0 35 99
212r17 = memub(r21 ++ #5:circ(m1))
213# CHECK: 11 e2 35 99
214r17 = memub(r21 ++ I:circ(m1))
215# CHECK: 00 40 00 00
216# CHECK-NEXT: 71 d7 35 9b
217r17 = memub(r21 = ##31)
218# CHECK: b1 c0 35 9b
219r17 = memub(r21++#5)
220# CHECK: 11 e0 35 9d
221r17 = memub(r21++m1)
222# CHECK: 11 e0 35 9f
223r17 = memub(r21 ++ m1:brev)
224
225# Load unsigned byte conditionally
226# CHECK: f1 ff 35 30
227if (p3) r17 = memub(r21+r31<<#3)
228# CHECK: f1 ff 35 31
229if (!p3) r17 = memub(r21+r31<<#3)
230# CHECK: 03 40 45 85
231# CHECK-NEXT: f1 ff 35 32
232{ p3 = r5
233  if (p3.new) r17 = memub(r21+r31<<#3) }
234# CHECK: 03 40 45 85
235# CHECK-NEXT: f1 ff 35 33
236{ p3 = r5
237  if (!p3.new) r17 = memub(r21+r31<<#3) }
238# CHECK: f1 db 35 41
239if (p3) r17 = memub(r21 + #31)
240# CHECK: 03 40 45 85
241# CHECK-NEXT: f1 db 35 43
242{ p3 = r5
243  if (p3.new) r17 = memub(r21 + #31) }
244# CHECK: f1 db 35 45
245if (!p3) r17 = memub(r21 + #31)
246# CHECK: 03 40 45 85
247# CHECK-NEXT: f1 db 35 47
248{ p3 = r5
249  if (!p3.new) r17 = memub(r21 + #31) }
250# CHECK: b1 e6 35 9b
251if (p3) r17 = memub(r21++#5)
252# CHECK: b1 ee 35 9b
253if (!p3) r17 = memub(r21++#5)
254# CHECK: 03 40 45 85
255# CHECK-NEXT: b1 f6 35 9b
256{ p3 = r5
257  if (p3.new) r17 = memub(r21++#5) }
258# CHECK: 03 40 45 85
259# CHECK-NEXT: b1 fe 35 9b
260{ p3 = r5
261  if (!p3.new) r17 = memub(r21++#5) }
262
263# Load unsigned halfword
264# CHECK: 91 ff 75 3a
265r17 = memuh(r21 + r31<<#3)
266# CHECK: b1 c2 60 49
267r17 = memuh(#42)
268# CHECK: 00 40 00 00
269# CHECK-NEXT: 51 c5 60 49
270r17 = memuh(##42)
271# CHECK: b1 c2 75 91
272r17 = memuh(r21 + #42)
273# CHECK: b1 e0 75 99
274r17 = memuh(r21 ++ #10:circ(m1))
275# CHECK: 11 e2 75 99
276r17 = memuh(r21 ++ I:circ(m1))
277# CHECK: 00 40 00 00
278# CHECK-NEXT: 71 d7 75 9b
279r17 = memuh(r21 = ##31)
280# CHECK: b1 c0 75 9b
281r17 = memuh(r21++#10)
282# CHECK: 11 e0 75 9d
283r17 = memuh(r21++m1)
284# CHECK: 11 e0 75 9f
285r17 = memuh(r21 ++ m1:brev)
286
287# Load unsigned halfword conditionally
288# CHECK: f1 ff 75 30
289if (p3) r17 = memuh(r21+r31<<#3)
290# CHECK: f1 ff 75 31
291if (!p3) r17 = memuh(r21+r31<<#3)
292# CHECK: 03 40 45 85
293# CHECK-NEXT: f1 ff 75 32
294{ p3 = r5
295  if (p3.new) r17 = memuh(r21+r31<<#3) }
296# CHECK: 03 40 45 85
297# CHECK-NEXT: f1 ff 75 33
298{ p3 = r5
299  if (!p3.new) r17 = memuh(r21+r31<<#3) }
300# CHECK: b1 da 75 41
301if (p3) r17 = memuh(r21 + #42)
302# CHECK: b1 da 75 45
303if (!p3) r17 = memuh(r21 + #42)
304# CHECK: 03 40 45 85
305# CHECK-NEXT: b1 da 75 43
306{ p3 = r5
307  if (p3.new) r17 = memuh(r21 + #42) }
308# CHECK: 03 40 45 85
309# CHECK-NEXT: b1 da 75 47
310{ p3 = r5
311  if (!p3.new) r17 = memuh(r21 + #42) }
312# CHECK: b1 e6 75 9b
313if (p3) r17 = memuh(r21++#10)
314# CHECK: b1 ee 75 9b
315if (!p3) r17 = memuh(r21++#10)
316# CHECK: 03 40 45 85
317# CHECK-NEXT: b1 f6 75 9b
318{ p3 = r5
319  if (p3.new) r17 = memuh(r21++#10) }
320# CHECK: 03 40 45 85
321# CHECK-NEXT: b1 fe 75 9b
322{ p3 = r5
323  if (!p3.new) r17 = memuh(r21++#10) }
324
325# Load word
326# CHECK: 91 ff 95 3a
327r17 = memw(r21 + r31<<#3)
328# CHECK: b1 c2 80 49
329r17 = memw(#84)
330# CHECK: 01 40 00 00
331# CHECK-NEXT: 91 c2 80 49
332r17 = memw(##84)
333# CHECK: b1 c2 95 91
334r17 = memw(r21 + #84)
335# CHECK: b1 e0 95 99
336r17 = memw(r21 ++ #20:circ(m1))
337# CHECK: 11 e2 95 99
338r17 = memw(r21 ++ I:circ(m1))
339# CHECK: 00 40 00 00
340# CHECK-NEXT: 71 d7 95 9b
341r17 = memw(r21 = ##31)
342# CHECK: b1 c0 95 9b
343r17 = memw(r21++#20)
344# CHECK: 11 e0 95 9d
345r17 = memw(r21++m1)
346# CHECK: 11 e0 95 9f
347r17 = memw(r21 ++ m1:brev)
348
349# Load word conditionally
350# CHECK: f1 ff 95 30
351if (p3) r17 = memw(r21+r31<<#3)
352# CHECK: f1 ff 95 31
353if (!p3) r17 = memw(r21+r31<<#3)
354# CHECK: 03 40 45 85
355# CHECK-NEXT: f1 ff 95 32
356{ p3 = r5
357  if (p3.new) r17 = memw(r21+r31<<#3) }
358# CHECK: 03 40 45 85
359# CHECK-NEXT: f1 ff 95 33
360{ p3 = r5
361  if (!p3.new) r17 = memw(r21+r31<<#3) }
362# CHECK: b1 da 95 41
363if (p3) r17 = memw(r21 + #84)
364# CHECK: b1 da 95 45
365if (!p3) r17 = memw(r21 + #84)
366# CHECK: 03 40 45 85
367# CHECK-NEXT: b1 da 95 43
368{ p3 = r5
369  if (p3.new) r17 = memw(r21 + #84) }
370# CHECK: 03 40 45 85
371# CHECK-NEXT: b1 da 95 47
372{ p3 = r5
373  if (!p3.new) r17 = memw(r21 + #84) }
374# CHECK: b1 e6 95 9b
375if (p3) r17 = memw(r21++#20)
376# CHECK: b1 ee 95 9b
377if (!p3) r17 = memw(r21++#20)
378# CHECK: 03 40 45 85
379# CHECK-NEXT: b1 f6 95 9b
380{ p3 = r5
381  if (p3.new) r17 = memw(r21++#20) }
382# CHECK: 03 40 45 85
383# CHECK-NEXT: b1 fe 95 9b
384{ p3 = r5
385  if (!p3.new) r17 = memw(r21++#20) }
386
387# Deallocate stack frame
388# CHECK: 1e c0 1e 90
389deallocframe
390
391# Deallocate stack frame and return
392# CHECK: 1e c0 1e 96
393dealloc_return
394# CHECK: 03 40 45 85
395# CHECK-NEXT: 1e cb 1e 96
396{ p3 = r5
397  if (p3.new) dealloc_return:nt }
398# CHECK: 1e d3 1e 96
399if (p3) dealloc_return
400# CHECK: 03 40 45 85
401# CHECK-NEXT: 1e db 1e 96
402{ p3 = r5
403  if (p3.new) dealloc_return:t }
404# CHECK: 03 40 45 85
405# CHECK-NEXT: 1e eb 1e 96
406{ p3 = r5
407  if (!p3.new) dealloc_return:nt }
408# CHECK: 1e f3 1e 96
409if (!p3) dealloc_return
410# CHECK: 03 40 45 85
411# CHECK-NEXT: 1e fb 1e 96
412{ p3 = r5
413  if (!p3.new) dealloc_return:t }
414
415# Load and unpack bytes to halfwords
416# CHECK: f1 c3 35 90
417r17 = membh(r21 + #62)
418# CHECK: f1 c3 75 90
419r17 = memubh(r21 + #62)
420# CHECK: f0 c3 b5 90
421r17:16 = memubh(r21 + #124)
422# CHECK: f0 c3 f5 90
423r17:16 = membh(r21 + #124)
424# CHECK: b1 e0 35 98
425r17 = membh(r21 ++ #10:circ(m1))
426# CHECK: 11 e2 35 98
427r17 = membh(r21 ++ I:circ(m1))
428# CHECK: b1 e0 75 98
429r17 = memubh(r21 ++ #10:circ(m1))
430# CHECK: 11 e2 75 98
431r17 = memubh(r21 ++ I:circ(m1))
432# CHECK: b0 e0 f5 98
433r17:16 = membh(r21 ++ #20:circ(m1))
434# CHECK: 10 e2 f5 98
435r17:16 = membh(r21 ++ I:circ(m1))
436# CHECK: b0 e0 b5 98
437r17:16 = memubh(r21 ++ #20:circ(m1))
438# CHECK: 10 e2 b5 98
439r17:16 = memubh(r21 ++ I:circ(m1))
440# CHECK: 00 40 00 00
441# CHECK-NEXT: 71 d7 35 9a
442r17 = membh(r21 = ##31)
443# CHECK: b1 c0 35 9a
444r17 = membh(r21++#10)
445# CHECK: 00 40 00 00
446# CHECK-NEXT: 71 d7 75 9a
447r17 = memubh(r21 = ##31)
448# CHECK: b1 c0 75 9a
449r17 = memubh(r21++#10)
450# CHECK: 00 40 00 00
451# CHECK-NEXT: 70 d7 b5 9a
452r17:16 = memubh(r21 = ##31)
453# CHECK: b0 c0 b5 9a
454r17:16 = memubh(r21++#20)
455# CHECK: 00 40 00 00
456# CHECK-NEXT: 70 d7 f5 9a
457r17:16 = membh(r21 = ##31)
458# CHECK: b0 c0 f5 9a
459r17:16 = membh(r21++#20)
460# CHECK: 00 40 00 00
461# CHECK-NEXT: f1 f7 35 9c
462r17 = membh(r21<<#3 + ##31)
463# CHECK: 11 e0 35 9c
464r17 = membh(r21++m1)
465# CHECK: 00 40 00 00
466# CHECK-NEXT: f1 f7 75 9c
467r17 = memubh(r21<<#3 + ##31)
468# CHECK: 11 e0 75 9c
469r17 = memubh(r21++m1)
470# CHECK: 00 40 00 00
471# CHECK-NEXT: f0 f7 f5 9c
472r17:16 = membh(r21<<#3 + ##31)
473# CHECK: 10 e0 f5 9c
474r17:16 = membh(r21++m1)
475# CHECK: 00 40 00 00
476# CHECK-NEXT: f0 f7 b5 9c
477r17:16 = memubh(r21<<#3 + ##31)
478# CHECK: 11 e0 35 9c
479r17 = membh(r21++m1)
480# CHECK: 11 e0 75 9c
481r17 = memubh(r21++m1)
482# CHECK: 10 e0 f5 9c
483r17:16 = membh(r21++m1)
484# CHECK: 10 e0 b5 9c
485r17:16 = memubh(r21++m1)
486# CHECK: 11 e0 35 9e
487r17 = membh(r21 ++ m1:brev)
488# CHECK: 11 e0 75 9e
489r17 = memubh(r21 ++ m1:brev)
490# CHECK: 10 e0 b5 9e
491r17:16 = memubh(r21 ++ m1:brev)
492# CHECK: 10 e0 f5 9e
493r17:16 = membh(r21 ++ m1:brev)
494