summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC/COFF/cv-def-range-align.s
blob: 2b6c18ad346b06e1b24c0108a614b4d27035e0ee (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.o
# RUN: llvm-pdbutil dump -symbols %t.o | FileCheck %s

# We used to have a label flushing bug down below by the "BUG" comments that
# would cause the S_DEFRANGE_FRAMEPOINTER_REL records to appear missing. In
# practice, the label would extend past the def range, so it would appear that
# every local was optimized out or had no def ranges.

# CHECK: S_GPROC32_ID {{.*}} `max`
# CHECK: S_LOCAL [size = {{.*}}] `a`
# CHECK: S_DEFRANGE_FRAMEPOINTER_REL
# CHECK: S_LOCAL [size = {{.*}}] `b`
# CHECK: S_DEFRANGE_FRAMEPOINTER_REL

	.text
	.def	 @feat.00;
	.scl	3;
	.type	0;
	.endef
	.globl	@feat.00
.set @feat.00, 0
	.def	 max;
	.scl	2;
	.type	32;
	.endef
	.globl	max                     # -- Begin function max
	.p2align	4, 0x90
max:                                    # @max
.Lfunc_begin0:
	.cv_func_id 0
	.cv_file	1 "C:\\src\\llvm-project\\build\\t.c" "44649E6EBC4FC8880991A1AF1F2D2990" 1
	.cv_loc	0 1 1 0                 # t.c:1:0
.seh_proc max
# %bb.0:                                # %entry
	pushq	%rax
	.seh_stackalloc 8
	.seh_endprologue
	movl	%edx, 4(%rsp)
	movl	%ecx, (%rsp)
.Ltmp0:
	.cv_loc	0 1 2 0                 # t.c:2:0
	movl	(%rsp), %eax
	cmpl	4(%rsp), %eax
	jle	.LBB0_2
# %bb.1:                                # %cond.true
	movl	(%rsp), %eax
	jmp	.LBB0_3
.LBB0_2:                                # %cond.false
	movl	4(%rsp), %eax
.LBB0_3:                                # %cond.end
	popq	%rcx
	retq
.Ltmp1:
.Lfunc_end0:
	.seh_handlerdata
	.text
	.seh_endproc
                                        # -- End function
	.section	.debug$S,"dr"
	.p2align	2
	.long 4
	.long	241                     # Symbol subsection for max
	.long	.Ltmp7-.Ltmp6           # Subsection size
.Ltmp6:
	.short	.Ltmp9-.Ltmp8           # Record length
.Ltmp8:
	.short	4423                    # Record kind: S_GPROC32_ID
	.long	0                       # PtrParent
	.long	0                       # PtrEnd
	.long	0                       # PtrNext
	.long	.Lfunc_end0-max         # Code size
	.long	0                       # Offset after prologue
	.long	0                       # Offset before epilogue
	.long	4098                    # Function type index
	.secrel32	max             # Function section relative address
	.secidx	max                     # Function section index
	.byte	0                       # Flags
	.asciz	"max"                   # Function name
.Ltmp9:
	.short	.Ltmp11-.Ltmp10         # Record length
.Ltmp10:
	.short	4114                    # Record kind: S_FRAMEPROC
	.long	8                       # FrameSize
	.long	0                       # Padding
	.long	0                       # Offset of padding
	.long	0                       # Bytes of callee saved registers
	.long	0                       # Exception handler offset
	.short	0                       # Exception handler section
	.long	81920                   # Flags (defines frame register)
.Ltmp11:
	.short	.Ltmp13-.Ltmp12         # Record length
.Ltmp12:
	.short	4414                    # Record kind: S_LOCAL
	.long	18                      # TypeIndex
	.short	1                       # Flags
	.asciz	"a"
	# BUG
	.p2align 2
.Ltmp13:
	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 8
	.short	.Ltmp15-.Ltmp14         # Record length
.Ltmp14:
	.short	4414                    # Record kind: S_LOCAL
	.long	18                      # TypeIndex
	.short	1                       # Flags
	.asciz	"b"
	# BUG
	.p2align 2
.Ltmp15:
	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 8
	.short	2                       # Record length
	.short	4431                    # Record kind: S_PROC_ID_END
.Ltmp7:
	.p2align	2
	.cv_linetable	0, max, .Lfunc_end0
	.cv_filechecksums               # File index to string table offset subsection
	.cv_stringtable                 # String table
	.long	241
	.long	.Ltmp17-.Ltmp16         # Subsection size
.Ltmp16:
.Ltmp17:
	.p2align	2
	.section	.debug$T,"dr"
	.p2align	2
	.long	4                       # Debug section magic
	# ArgList (0x1000) {
	#   TypeLeafKind: LF_ARGLIST (0x1201)
	#   NumArgs: 2
	#   Arguments [
	#     ArgType: long (0x12)
	#     ArgType: long (0x12)
	#   ]
	# }
	.byte	0x0e, 0x00, 0x01, 0x12
	.byte	0x02, 0x00, 0x00, 0x00
	.byte	0x12, 0x00, 0x00, 0x00
	.byte	0x12, 0x00, 0x00, 0x00
	# Procedure (0x1001) {
	#   TypeLeafKind: LF_PROCEDURE (0x1008)
	#   ReturnType: long (0x12)
	#   CallingConvention: NearC (0x0)
	#   FunctionOptions [ (0x0)
	#   ]
	#   NumParameters: 2
	#   ArgListType: (long, long) (0x1000)
	# }
	.byte	0x0e, 0x00, 0x08, 0x10
	.byte	0x12, 0x00, 0x00, 0x00
	.byte	0x00, 0x00, 0x02, 0x00
	.byte	0x00, 0x10, 0x00, 0x00
	# FuncId (0x1002) {
	#   TypeLeafKind: LF_FUNC_ID (0x1601)
	#   ParentScope: 0x0
	#   FunctionType: long (long, long) (0x1001)
	#   Name: max
	# }
	.byte	0x0e, 0x00, 0x01, 0x16
	.byte	0x00, 0x00, 0x00, 0x00
	.byte	0x01, 0x10, 0x00, 0x00
	.byte	0x6d, 0x61, 0x78, 0x00

OpenPOWER on IntegriCloud