xref: /llvm-project/llvm/test/tools/llvm-objdump/ELF/ARM/literal-vldr-arm.s (revision a657440bc695a98c54cd95bb7cc4cec5ab811d17)
1@@ Check that PC-relative memory addressing is annotated
2
3@ RUN: llvm-mc %s -triple=armv8a --mattr=+fullfp16 -filetype=obj | \
4@ RUN:   llvm-objdump -d --no-show-raw-insn --triple=armv8a --mattr=+fullfp16 - | \
5@ RUN:   FileCheck %s
6
7.text
8foo:
9@ CHECK:      00000000 <foo>:
10  .short 0x0102
11foo2:
12@ CHECK:      00000002 <foo2>:
13  .short 0x0304
14
15_start:
16@ CHECK:      00000004 <_start>:
17@@ Check AddrMode5 instructions, with positive and negative immediates
18  vldr d0, foo
19  vldr s0, bar
20@ CHECK-NEXT:    4: vldr    d0, [pc, #-12]          @ 0x0 <foo>
21@ CHECK-NEXT:    8: vldr    s0, [pc, #20]           @ 0x24 <bar>
22
23@@ Check that AddrMode5 instructions which do not use PC-relative addressing are
24@@ not annotated
25  vldr d0, [r1, #8]
26@ CHECK-NEXT:    c: vldr    d0, [r1, #8]{{$}}
27
28@@ Check AddrMode5FP16 instructions, with positive and negative immediates
29  vldr.16 s0, foo
30  vldr.16 s0, foo2
31  vldr.16 s1, bar
32  vldr.16 s1, bar2
33@ CHECK-NEXT:   10: vldr.16 s0, [pc, #-24]          @ 0x0 <foo>
34@ CHECK-NEXT:   14: vldr.16 s0, [pc, #-26]          @ 0x2 <foo2>
35@ CHECK-NEXT:   18: vldr.16 s1, [pc, #4]            @ 0x24 <bar>
36@ CHECK-NEXT:   1c: vldr.16 s1, [pc, #2]            @ 0x26 <bar2>
37
38@@ Check that AddrMode5FP16 instructions which do not use PC-relative addressing
39@@ are not annotated
40  vldr.16 s0, [r1, #8]
41@ CHECK-NEXT:   20: vldr.16 s0, [r1, #8]{{$}}
42
43bar:
44@ CHECK:      00000024 <bar>:
45  .short 0x0102
46bar2:
47@ CHECK:      00000026 <bar2>:
48  .short 0x0304
49