• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
2
3; CHECK-LABEL:	.section	__LLVM_STACKMAPS,__llvm_stackmaps
4; CHECK-NEXT: __LLVM_StackMaps:
5; version
6; CHECK-NEXT: 	.byte	3
7; reserved
8; CHECK-NEXT: 	.byte	0
9; reserved
10; CHECK-NEXT: 	.short	0
11; # functions
12; CHECK-NEXT: 	.long	2
13; # constants
14; CHECK-NEXT: 	.long	2
15; # records
16; CHECK-NEXT: 	.long	2
17; function address & stack size
18; CHECK-NEXT: 	.quad	_foo
19; CHECK-NEXT: 	.quad	8
20; CHECK-NEXT:   .quad	1
21; function address & stack size
22; CHECK-NEXT: 	.quad	_bar
23; CHECK-NEXT: 	.quad	8
24; CHECK-NEXT:   .quad	1
25
26; Constants Array:
27; CHECK-NEXT: 	.quad	9223372036854775807
28; CHECK-NEXT: 	.quad	-9223372036854775808
29
30; Patchpoint ID
31; CHECK-NEXT: 	.quad	0
32; Instruction offset
33; CHECK-NEXT: 	.long	L{{.*}}-_foo
34; reserved
35; CHECK-NEXT: 	.short	0
36; # locations
37; CHECK-NEXT: 	.short	1
38; ConstantIndex
39; CHECK-NEXT: 	.byte	5
40; reserved
41; CHECK-NEXT:   .byte	0
42; size
43; CHECK-NEXT: 	.short	8
44; Dwarf RegNum
45; CHECK-NEXT: 	.short	0
46; reserved
47; CHECK-NEXT:   .short  0
48; Offset
49; CHECK-NEXT: 	.long	0
50; padding
51; CHECK-NEXT: 	.p2align 3
52; CHECK-NEXT: 	.short	0
53; NumLiveOuts
54; CHECK-NEXT: 	.short	0
55
56; CHECK-NEXT: 	.p2align	3
57
58declare void @llvm.experimental.stackmap(i64, i32, ...)
59
60define void @foo() {
61  tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 0, i32 0, i64 9223372036854775807)
62  ret void
63}
64
65; Patchpoint ID
66; CHECK-NEXT: 	.quad	0
67; Instruction Offset
68; CHECK-NEXT: 	.long	L{{.*}}-_bar
69; reserved
70; CHECK-NEXT: 	.short	0
71; # locations
72; CHECK-NEXT: 	.short	1
73; ConstantIndex
74; CHECK-NEXT: 	.byte	5
75; reserved
76; CHECK-NEXT:   .byte	0
77; size
78; CHECK-NEXT: 	.short	8
79; Dwarf RegNum
80; CHECK-NEXT: 	.short	0
81; reserved
82; CHECK-NEXT:    .short 0
83; Offset
84; CHECK-NEXT: 	.long	1
85; padding
86; CHECK-NEXT:  .p2align 3
87; CHECK-NEXT: 	.short	0
88; NumLiveOuts
89; CHECK-NEXT: 	.short	0
90
91
92define void @bar() {
93  tail call void (i64, i32, ...) @llvm.experimental.stackmap(i64 0, i32 0, i64 -9223372036854775808)
94  ret void
95}
96