1 RUN: llvm-readobj -stackmap %p/Inputs/stackmap-test.macho-x86-64 | FileCheck %s
3 ; Note: the macho object file in this test was generated in the following way:
4 ; llc -mtriple=x86_64-apple-darwin %p/test/CodeGen/X86/stackmap.ll -o stackmap.s
5 ; clang -c stackmap.s -o %p/test/Object/Inputs/stackmap-test.macho-x86-64
7 CHECK: LLVM StackMap Version: 2
8 CHECK-NEXT: Num Functions: 16
9 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
10 CHECK-NEXT: Function address: 0, stack size: 24, callsite record count: 1
11 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
12 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
13 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
14 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
15 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
16 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
17 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
18 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
19 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
20 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
21 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 2
22 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 4
23 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
24 CHECK-NEXT: Function address: 0, stack size: 18446744073709551615, callsite record count: 1
25 CHECK-NEXT: Num Constants: 3
26 CHECK-NEXT: #1: 2147483648
27 CHECK-NEXT: #2: 4294967295
28 CHECK-NEXT: #3: 4294967296
29 CHECK-NEXT: Num Records: 20
30 CHECK-NEXT: Record ID: 1, instruction offset: 4
31 CHECK-NEXT: 12 locations:
32 CHECK-NEXT: #1: Constant 4294967295
33 CHECK-NEXT: #2: Constant 4294967295
34 CHECK-NEXT: #3: Constant 65536
35 CHECK-NEXT: #4: Constant 2000000000
36 CHECK-NEXT: #5: Constant 2147483647
37 CHECK-NEXT: #6: Constant 4294967295
38 CHECK-NEXT: #7: Constant 4294967295
39 CHECK-NEXT: #8: Constant 0
40 CHECK-NEXT: #9: ConstantIndex #0 (2147483648)
41 CHECK-NEXT: #10: ConstantIndex #1 (4294967295)
42 CHECK-NEXT: #11: ConstantIndex #2 (4294967296)
43 CHECK-NEXT: #12: Constant 4294967295
44 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
46 CHECK: Record ID: 3, instruction offset: 22
47 CHECK-NEXT: 2 locations:
48 CHECK-NEXT: #1: Register R#3
49 CHECK-NEXT: #2: Register R#14
50 CHECK-NEXT: 0 live-outs: [ ]
52 CHECK: Record ID: 4, instruction offset: 10
53 CHECK-NEXT: 2 locations:
54 CHECK-NEXT: #1: Register R#5
55 CHECK-NEXT: #2: Register R#4
56 CHECK-NEXT: 0 live-outs: [ ]
58 CHECK: Record ID: 5, instruction offset: 4
59 CHECK-NEXT: 2 locations:
60 CHECK-NEXT: #1: Register R#0
61 CHECK-NEXT: #2: Register R#5
62 CHECK-NEXT: 2 live-outs: [ R#0 (8-bytes) R#7 (8-bytes) ]
64 CHECK: Record ID: 6, instruction offset: 4
65 CHECK-NEXT: 2 locations:
66 CHECK-NEXT: #1: Register R#4
67 CHECK-NEXT: #2: Register R#2
68 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
70 CHECK: Record ID: 7, instruction offset: 10
71 CHECK-NEXT: 2 locations:
72 CHECK-NEXT: #1: Register R#2
73 CHECK-NEXT: #2: Register R#8
74 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
76 CHECK: Record ID: 8, instruction offset: 10
77 CHECK-NEXT: 2 locations:
78 CHECK-NEXT: #1: Register R#2
79 CHECK-NEXT: #2: Register R#8
80 CHECK-NEXT: 2 live-outs: [ R#0 (8-bytes) R#7 (8-bytes) ]
82 CHECK: Record ID: 11, instruction offset: 42
83 CHECK-NEXT: 17 locations:
84 CHECK-NEXT: #1: Register R#9
85 CHECK-NEXT: #2: Register R#14
86 CHECK-NEXT: #3: Register R#10
87 CHECK-NEXT: #4: Register R#3
88 CHECK-NEXT: #5: Register R#0
89 CHECK-NEXT: #6: Register R#13
90 CHECK-NEXT: #7: Register R#12
91 CHECK-NEXT: #8: Register R#15
92 CHECK-NEXT: #9: Indirect [R#6 + 72]
93 CHECK-NEXT: #10: Indirect [R#6 + 80]
94 CHECK-NEXT: #11: Indirect [R#6 + 88]
95 CHECK-NEXT: #12: Indirect [R#6 + 96]
96 CHECK-NEXT: #13: Indirect [R#6 + 104]
97 CHECK-NEXT: #14: Indirect [R#6 + 112]
98 CHECK-NEXT: #15: Indirect [R#6 + 120]
99 CHECK-NEXT: #16: Indirect [R#6 + 128]
100 CHECK-NEXT: #17: Indirect [R#6 + 136]
101 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
103 CHECK: Record ID: 12, instruction offset: 62
104 CHECK-NEXT: 17 locations:
105 CHECK-NEXT: #1: Register R#0
106 CHECK-NEXT: #2: Register R#14
107 CHECK-NEXT: #3: Register R#10
108 CHECK-NEXT: #4: Register R#9
109 CHECK-NEXT: #5: Register R#8
110 CHECK-NEXT: #6: Register R#4
111 CHECK-NEXT: #7: Register R#1
112 CHECK-NEXT: #8: Register R#2
113 CHECK-NEXT: #9: Register R#5
114 CHECK-NEXT: #10: Register R#3
115 CHECK-NEXT: #11: Register R#13
116 CHECK-NEXT: #12: Register R#12
117 CHECK-NEXT: #13: Register R#15
118 CHECK-NEXT: #14: Indirect [R#6 + 112]
119 CHECK-NEXT: #15: Indirect [R#6 + 120]
120 CHECK-NEXT: #16: Indirect [R#6 + 128]
121 CHECK-NEXT: #17: Indirect [R#6 + 136]
122 CHECK-NEXT: 0 live-outs: [ ]
124 CHECK: Record ID: 13, instruction offset: 50
125 CHECK-NEXT: 1 locations:
126 CHECK-NEXT: #1: Indirect [R#6 + -48]
127 CHECK-NEXT: 0 live-outs: [ ]
129 CHECK: Record ID: 14, instruction offset: 24
130 CHECK-NEXT: 2 locations:
131 CHECK-NEXT: #1: Register R#0
132 CHECK-NEXT: #2: Register R#3
133 CHECK-NEXT: 0 live-outs: [ ]
135 CHECK: Record ID: 15, instruction offset: 4
136 CHECK-NEXT: 1 locations:
137 CHECK-NEXT: #1: Constant 33
138 CHECK-NEXT: 0 live-outs: [ ]
140 CHECK: Record ID: 16, instruction offset: 32
141 CHECK-NEXT: 1 locations:
142 CHECK-NEXT: #1: Direct R#6 + -32
143 CHECK-NEXT: 0 live-outs: [ ]
145 CHECK: Record ID: 17, instruction offset: 32
146 CHECK-NEXT: 2 locations:
147 CHECK-NEXT: #1: Direct R#6 + -8
148 CHECK-NEXT: #2: Direct R#6 + -40
149 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
151 CHECK: Record ID: 4294967295, instruction offset: 4
152 CHECK-NEXT: 0 locations:
153 CHECK-NEXT: 0 live-outs: [ ]
155 CHECK: Record ID: 4294967296, instruction offset: 4
156 CHECK-NEXT: 0 locations:
157 CHECK-NEXT: 0 live-outs: [ ]
159 CHECK: Record ID: 9223372036854775807, instruction offset: 4
160 CHECK-NEXT: 0 locations:
161 CHECK-NEXT: 0 live-outs: [ ]
163 CHECK: Record ID: 18446744073709551615, instruction offset: 4
164 CHECK-NEXT: 0 locations:
165 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
167 CHECK: Record ID: 16, instruction offset: 18
168 CHECK-NEXT: 1 locations:
169 CHECK-NEXT: #1: Indirect [R#6 + -44]
170 CHECK-NEXT: 0 live-outs: [ ]
172 CHECK: Record ID: 0, instruction offset: 26
173 CHECK-NEXT: 0 locations:
174 CHECK-NEXT: 0 live-outs: [ ]