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 test/CodeGen/X86/stackmap.ll -o test/Object/Inputs/stackmap-test.macho-x86-64 -filetype=obj
6 CHECK: LLVM StackMap Version: 3
7 CHECK-NEXT: Num Functions: 16
8 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 1
9 CHECK-NEXT: Function address: 0, stack size: 24, callsite record count: 1
10 CHECK-NEXT: Function address: 0, stack size: 8, 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: 8, 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: 8, callsite record count: 1
20 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 2
21 CHECK-NEXT: Function address: 0, stack size: 8, callsite record count: 4
22 CHECK-NEXT: Function address: 0, stack size: 56, callsite record count: 1
23 CHECK-NEXT: Function address: 0, stack size: 18446744073709551615, callsite record count: 1
24 CHECK-NEXT: Num Constants: 3
25 CHECK-NEXT: #1: 2147483648
26 CHECK-NEXT: #2: 4294967295
27 CHECK-NEXT: #3: 4294967296
28 CHECK-NEXT: Num Records: 20
29 CHECK-NEXT: Record ID: 1, instruction offset: 4
30 CHECK-NEXT: 12 locations:
31 CHECK-NEXT: #1: Constant 4294967295, size: 8
32 CHECK-NEXT: #2: Constant 4294967295, size: 8
33 CHECK-NEXT: #3: Constant 65536, size: 8
34 CHECK-NEXT: #4: Constant 2000000000, size: 8
35 CHECK-NEXT: #5: Constant 2147483647, size: 8
36 CHECK-NEXT: #6: Constant 4294967295, size: 8
37 CHECK-NEXT: #7: Constant 4294967295, size: 8
38 CHECK-NEXT: #8: Constant 0, size: 8
39 CHECK-NEXT: #9: ConstantIndex #0 (2147483648), size: 8
40 CHECK-NEXT: #10: ConstantIndex #1 (4294967295), size: 8
41 CHECK-NEXT: #11: ConstantIndex #2 (4294967296), size: 8
42 CHECK-NEXT: #12: Constant 4294967295, size: 8
43 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
45 CHECK: Record ID: 3, instruction offset: 22
46 CHECK-NEXT: 2 locations:
47 CHECK-NEXT: #1: Register R#3, size: 8
48 CHECK-NEXT: #2: Register R#14, size: 8
49 CHECK-NEXT: 0 live-outs: [ ]
51 CHECK: Record ID: 4, instruction offset: 10
52 CHECK-NEXT: 2 locations:
53 CHECK-NEXT: #1: Register R#5, size: 8
54 CHECK-NEXT: #2: Register R#4, size: 8
55 CHECK-NEXT: 0 live-outs: [ ]
57 CHECK: Record ID: 5, instruction offset: 4
58 CHECK-NEXT: 2 locations:
59 CHECK-NEXT: #1: Register R#0, size: 8
60 CHECK-NEXT: #2: Register R#5, size: 8
61 CHECK-NEXT: 2 live-outs: [ R#0 (8-bytes) R#7 (8-bytes) ]
63 CHECK: Record ID: 6, instruction offset: 4
64 CHECK-NEXT: 2 locations:
65 CHECK-NEXT: #1: Register R#4, size: 8
66 CHECK-NEXT: #2: Register R#2, size: 8
67 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
69 CHECK: Record ID: 7, instruction offset: 10
70 CHECK-NEXT: 2 locations:
71 CHECK-NEXT: #1: Register R#2, size: 8
72 CHECK-NEXT: #2: Register R#8, size: 8
73 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
75 CHECK: Record ID: 8, instruction offset: 10
76 CHECK-NEXT: 2 locations:
77 CHECK-NEXT: #1: Register R#2, size: 8
78 CHECK-NEXT: #2: Register R#8, size: 8
79 CHECK-NEXT: 2 live-outs: [ R#0 (8-bytes) R#7 (8-bytes) ]
81 CHECK: Record ID: 11, instruction offset: 4
82 CHECK-NEXT: 17 locations:
83 CHECK-NEXT: #1: Register R#9, size: 8
84 CHECK-NEXT: #2: Indirect [R#6 + 16], size: 8
85 CHECK-NEXT: #3: Indirect [R#6 + 24], size: 8
86 CHECK-NEXT: #4: Indirect [R#6 + 32], size: 8
87 CHECK-NEXT: #5: Indirect [R#6 + 40], size: 8
88 CHECK-NEXT: #6: Indirect [R#6 + 48], size: 8
89 CHECK-NEXT: #7: Indirect [R#6 + 56], size: 8
90 CHECK-NEXT: #8: Indirect [R#6 + 64], size: 8
91 CHECK-NEXT: #9: Indirect [R#6 + 72], size: 8
92 CHECK-NEXT: #10: Indirect [R#6 + 80], size: 8
93 CHECK-NEXT: #11: Indirect [R#6 + 88], size: 8
94 CHECK-NEXT: #12: Indirect [R#6 + 96], size: 8
95 CHECK-NEXT: #13: Indirect [R#6 + 104], size: 8
96 CHECK-NEXT: #14: Indirect [R#6 + 112], size: 8
97 CHECK-NEXT: #15: Indirect [R#6 + 120], size: 8
98 CHECK-NEXT: #16: Indirect [R#6 + 128], size: 8
99 CHECK-NEXT: #17: Indirect [R#6 + 136], size: 8
100 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
102 CHECK: Record ID: 12, instruction offset: 4
103 CHECK-NEXT: 17 locations:
104 CHECK-NEXT: #1: Register R#0, size: 8
105 CHECK-NEXT: #2: Indirect [R#6 + 16], size: 8
106 CHECK-NEXT: #3: Indirect [R#6 + 24], size: 8
107 CHECK-NEXT: #4: Indirect [R#6 + 32], size: 8
108 CHECK-NEXT: #5: Indirect [R#6 + 40], size: 8
109 CHECK-NEXT: #6: Indirect [R#6 + 48], size: 8
110 CHECK-NEXT: #7: Indirect [R#6 + 56], size: 8
111 CHECK-NEXT: #8: Indirect [R#6 + 64], size: 8
112 CHECK-NEXT: #9: Indirect [R#6 + 72], size: 8
113 CHECK-NEXT: #10: Indirect [R#6 + 80], size: 8
114 CHECK-NEXT: #11: Indirect [R#6 + 88], size: 8
115 CHECK-NEXT: #12: Indirect [R#6 + 96], size: 8
116 CHECK-NEXT: #13: Indirect [R#6 + 104], size: 8
117 CHECK-NEXT: #14: Indirect [R#6 + 112], size: 8
118 CHECK-NEXT: #15: Indirect [R#6 + 120], size: 8
119 CHECK-NEXT: #16: Indirect [R#6 + 128], size: 8
120 CHECK-NEXT: #17: Indirect [R#6 + 136], size: 8
121 CHECK-NEXT: 0 live-outs: [ ]
123 CHECK: Record ID: 13, instruction offset: 50
124 CHECK-NEXT: 1 locations:
125 CHECK-NEXT: #1: Indirect [R#6 + -48], size: 4
126 CHECK-NEXT: 0 live-outs: [ ]
128 CHECK: Record ID: 14, instruction offset: 24
129 CHECK-NEXT: 2 locations:
130 CHECK-NEXT: #1: Register R#0, size: 1
131 CHECK-NEXT: #2: Register R#3, size: 1
132 CHECK-NEXT: 0 live-outs: [ ]
134 CHECK: Record ID: 15, instruction offset: 4
135 CHECK-NEXT: 1 locations:
136 CHECK-NEXT: #1: Constant 33, size: 8
137 CHECK-NEXT: 0 live-outs: [ ]
139 CHECK: Record ID: 16, instruction offset: 16
140 CHECK-NEXT: 1 locations:
141 CHECK-NEXT: #1: Direct R#6 + -40, size: 8
142 CHECK-NEXT: 0 live-outs: [ ]
144 CHECK: Record ID: 17, instruction offset: 16
145 CHECK-NEXT: 2 locations:
146 CHECK-NEXT: #1: Direct R#6 + -8, size: 8
147 CHECK-NEXT: #2: Direct R#6 + -16, size: 8
148 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
150 CHECK: Record ID: 4294967295, instruction offset: 4
151 CHECK-NEXT: 0 locations:
152 CHECK-NEXT: 0 live-outs: [ ]
154 CHECK: Record ID: 4294967296, instruction offset: 4
155 CHECK-NEXT: 0 locations:
156 CHECK-NEXT: 0 live-outs: [ ]
158 CHECK: Record ID: 9223372036854775807, instruction offset: 4
159 CHECK-NEXT: 0 locations:
160 CHECK-NEXT: 0 live-outs: [ ]
162 CHECK: Record ID: 18446744073709551615, instruction offset: 4
163 CHECK-NEXT: 0 locations:
164 CHECK-NEXT: 1 live-outs: [ R#7 (8-bytes) ]
166 CHECK: Record ID: 16, instruction offset: 18
167 CHECK-NEXT: 1 locations:
168 CHECK-NEXT: #1: Indirect [R#6 + -44], size: 4
169 CHECK-NEXT: 0 live-outs: [ ]
171 CHECK: Record ID: 0, instruction offset: 25
172 CHECK-NEXT: 0 locations:
173 CHECK-NEXT: 0 live-outs: [ ]