brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.8 KiB · 358383a Raw
164 lines · plain
1# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.o2# RUN: llvm-pdbutil dump -symbols %t.o | FileCheck %s3 4# We used to have a label flushing bug down below by the "BUG" comments that5# would cause the S_DEFRANGE_FRAMEPOINTER_REL records to appear missing. In6# practice, the label would extend past the def range, so it would appear that7# every local was optimized out or had no def ranges.8 9# CHECK: S_GPROC32_ID {{.*}} `max`10# CHECK: S_LOCAL [size = {{.*}}] `a`11# CHECK: S_DEFRANGE_FRAMEPOINTER_REL12# CHECK: S_LOCAL [size = {{.*}}] `b`13# CHECK: S_DEFRANGE_FRAMEPOINTER_REL14 15	.text16	.def	 @feat.00;17	.scl	3;18	.type	0;19	.endef20	.globl	@feat.0021.set @feat.00, 022	.def	 max;23	.scl	2;24	.type	32;25	.endef26	.globl	max                     # -- Begin function max27	.p2align	4, 0x9028max:                                    # @max29.Lfunc_begin0:30	.cv_func_id 031	.cv_file	1 "C:\\src\\llvm-project\\build\\t.c" "44649E6EBC4FC8880991A1AF1F2D2990" 132	.cv_loc	0 1 1 0                 # t.c:1:033.seh_proc max34# %bb.0:                                # %entry35	pushq	%rax36	.seh_stackalloc 837	.seh_endprologue38	movl	%edx, 4(%rsp)39	movl	%ecx, (%rsp)40.Ltmp0:41	.cv_loc	0 1 2 0                 # t.c:2:042	movl	(%rsp), %eax43	cmpl	4(%rsp), %eax44	jle	.LBB0_245# %bb.1:                                # %cond.true46	movl	(%rsp), %eax47	jmp	.LBB0_348.LBB0_2:                                # %cond.false49	movl	4(%rsp), %eax50.LBB0_3:                                # %cond.end51	.seh_startepilogue52	popq	%rcx53	.seh_endepilogue54	retq55.Ltmp1:56.Lfunc_end0:57	.seh_handlerdata58	.text59	.seh_endproc60                                        # -- End function61	.section	.debug$S,"dr"62	.p2align	263	.long 464	.long	241                     # Symbol subsection for max65	.long	.Ltmp7-.Ltmp6           # Subsection size66.Ltmp6:67	.short	.Ltmp9-.Ltmp8           # Record length68.Ltmp8:69	.short	4423                    # Record kind: S_GPROC32_ID70	.long	0                       # PtrParent71	.long	0                       # PtrEnd72	.long	0                       # PtrNext73	.long	.Lfunc_end0-max         # Code size74	.long	0                       # Offset after prologue75	.long	0                       # Offset before epilogue76	.long	4098                    # Function type index77	.secrel32	max             # Function section relative address78	.secidx	max                     # Function section index79	.byte	0                       # Flags80	.asciz	"max"                   # Function name81.Ltmp9:82	.short	.Ltmp11-.Ltmp10         # Record length83.Ltmp10:84	.short	4114                    # Record kind: S_FRAMEPROC85	.long	8                       # FrameSize86	.long	0                       # Padding87	.long	0                       # Offset of padding88	.long	0                       # Bytes of callee saved registers89	.long	0                       # Exception handler offset90	.short	0                       # Exception handler section91	.long	81920                   # Flags (defines frame register)92.Ltmp11:93	.short	.Ltmp13-.Ltmp12         # Record length94.Ltmp12:95	.short	4414                    # Record kind: S_LOCAL96	.long	18                      # TypeIndex97	.short	1                       # Flags98	.asciz	"a"99	# BUG100	.p2align 2101.Ltmp13:102	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 8103	.short	.Ltmp15-.Ltmp14         # Record length104.Ltmp14:105	.short	4414                    # Record kind: S_LOCAL106	.long	18                      # TypeIndex107	.short	1                       # Flags108	.asciz	"b"109	# BUG110	.p2align 2111.Ltmp15:112	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 8113	.short	2                       # Record length114	.short	4431                    # Record kind: S_PROC_ID_END115.Ltmp7:116	.p2align	2117	.cv_linetable	0, max, .Lfunc_end0118	.cv_filechecksums               # File index to string table offset subsection119	.cv_stringtable                 # String table120	.long	241121	.long	.Ltmp17-.Ltmp16         # Subsection size122.Ltmp16:123.Ltmp17:124	.p2align	2125	.section	.debug$T,"dr"126	.p2align	2127	.long	4                       # Debug section magic128	# ArgList (0x1000) {129	#   TypeLeafKind: LF_ARGLIST (0x1201)130	#   NumArgs: 2131	#   Arguments [132	#     ArgType: long (0x12)133	#     ArgType: long (0x12)134	#   ]135	# }136	.byte	0x0e, 0x00, 0x01, 0x12137	.byte	0x02, 0x00, 0x00, 0x00138	.byte	0x12, 0x00, 0x00, 0x00139	.byte	0x12, 0x00, 0x00, 0x00140	# Procedure (0x1001) {141	#   TypeLeafKind: LF_PROCEDURE (0x1008)142	#   ReturnType: long (0x12)143	#   CallingConvention: NearC (0x0)144	#   FunctionOptions [ (0x0)145	#   ]146	#   NumParameters: 2147	#   ArgListType: (long, long) (0x1000)148	# }149	.byte	0x0e, 0x00, 0x08, 0x10150	.byte	0x12, 0x00, 0x00, 0x00151	.byte	0x00, 0x00, 0x02, 0x00152	.byte	0x00, 0x10, 0x00, 0x00153	# FuncId (0x1002) {154	#   TypeLeafKind: LF_FUNC_ID (0x1601)155	#   ParentScope: 0x0156	#   FunctionType: long (long, long) (0x1001)157	#   Name: max158	# }159	.byte	0x0e, 0x00, 0x01, 0x16160	.byte	0x00, 0x00, 0x00, 0x00161	.byte	0x01, 0x10, 0x00, 0x00162	.byte	0x6d, 0x61, 0x78, 0x00163 164