File: literal-vldr-thumb2.s

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (66 lines) | stat: -rw-r--r-- 2,196 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@@ Check that PC-relative memory addressing is annotated

@ RUN: llvm-mc %s -triple=thumbv8a --mattr=+fullfp16 -filetype=obj | \
@ RUN:   llvm-objdump -d --no-show-raw-insn --triple=thumbv8a --mattr=+fullfp16 - | \
@ RUN:   FileCheck %s

.text
foo:
@ CHECK:      00000000 <foo>:
  .short 0x0102
foo2:
@ CHECK:      00000002 <foo2>:
  .short 0x0304

_start:
@@ Check AddrMode5 instructions, with positive and negative immediates
  .balign 4
  vldr d0, foo
  vldr s0, bar
@ CHECK:         4: vldr      d0, [pc, #-8]           @ 0x0 <foo>
@ CHECK-NEXT:    8: vldr      s0, [pc, #56]           @ 0x44 <bar>

@@ Same instructions, but the addresses are not 4-byte aligned
  nop
  vldr d0, foo
  vldr s0, bar
@ CHECK:          e: vldr     d0, [pc, #-16]          @ 0x0 <foo>
@ CHECK-NEXT:    12: vldr     s0, [pc, #48]           @ 0x44 <bar>

@@ Check that AddrMode5 instructions which do not use PC-relative addressing are not annotated
  vldr d0, [r1, #8]
@ CHECK:         16: vldr     d0, [r1, #8]{{$}}

@@ Check AddrMode5FP16 instructions, with positive and negative immediates
  .balign 4
  vldr.16 s0, foo
  vldr.16 s0, foo2
  vldr.16 s1, bar
  vldr.16 s1, bar2
@ CHECK:         1c: vldr.16  s0, [pc, #-32]          @ 0x0 <foo>
@ CHECK-NEXT:    20: vldr.16  s0, [pc, #-34]          @ 0x2 <foo2>
@ CHECK-NEXT:    24: vldr.16  s1, [pc, #28]           @ 0x44 <bar>
@ CHECK-NEXT:    28: vldr.16  s1, [pc, #26]           @ 0x46 <bar2>

@@ Same instructions, but the addresses are not 4-byte aligned
  nop
  vldr.16 s0, foo
  vldr.16 s0, foo2
  vldr.16 s1, bar
  vldr.16 s1, bar2
@ CHECK:         2e: vldr.16  s0, [pc, #-48]          @ 0x0 <foo>
@ CHECK-NEXT:    32: vldr.16  s0, [pc, #-50]          @ 0x2 <foo2>
@ CHECK-NEXT:    36: vldr.16  s1, [pc, #12]           @ 0x44 <bar>
@ CHECK-NEXT:    3a: vldr.16  s1, [pc, #10]           @ 0x46 <bar2>

@@ Check that AddrMode5FP16 instructions which do not use PC-relative addressing are not annotated
  vldr.16 s0, [r1, #8]
@ CHECK:         3e: vldr.16  s0, [r1, #8]{{$}}

  .balign 4
bar:
@ CHECK:      00000044 <bar>:
  .short 0x0102
bar2:
@ CHECK:      00000046 <bar2>:
  .short 0x0304