1 # RUN: llvm-mc %s -triple=i686-pc-win32 -filetype=obj -o %t.obj
2 # RUN: llvm-objdump --no-print-imm-hex -d %t.obj | FileCheck %s --check-prefix=ASM
3 # RUN: llvm-pdbutil dump -il -symbols %t.obj | FileCheck %s --check-prefix=CODEVIEW
5 # Based on the other cv-loc-unreachable-2.s, but with other code in the same
6 # section afterwards. We had negative label difference assertions when .cv_loc
7 # bound tightly to the next instruction.
9 # ASM: 00000000 <_callit>:
11 # ASM-NEXT: 0: e8 00 00 00 00 calll 0x5 <_callit+0x5>
12 # ASM-NEXT: 5: 85 c0 testl %eax, %eax
13 # ASM-NEXT: 7: 75 01 jne 0xa <_callit+0xa>
15 # ASM-NEXT: 9: c3 retl
17 # ASM-NEXT: a: 6a 20 pushl $32
18 # ASM-NEXT: c: ff 15 00 00 00 00 calll *0
21 # CODEVIEW: Inlinee | Line | Source File
22 # CODEVIEW: 0x1002 | 3 | C:\src\llvm-project\build\t.cpp (MD5: 0BC092F354CE14FDC2FA78F8EDE7426E)
24 # CODEVIEW: S_INLINESITE [size = 26]
25 # CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 0
26 # CODEVIEW-NEXT: 0B20 code 0x0 (+0x0) line 1 (+1)
27 # CODEVIEW-NEXT: 0409 code end 0x9 (+0x9)
28 # CODEVIEW-NEXT: 0B21 code 0xA (+0x1) line 2 (+1)
29 # CODEVIEW-NEXT: 0B28 code 0x12 (+0x8) line 3 (+1)
30 # CODEVIEW-NEXT: 0400 code end 0x12 (+0x0)
33 .def _callit; .scl 2; .type 32; .endef
34 .globl _callit # -- Begin function callit
38 .cv_fpo_proc _callit 0
40 .cv_file 1 "C:\\src\\llvm-project\\build\\t.cpp" "0BC092F354CE14FDC2FA78F8EDE7426E" 1
41 .cv_inline_site_id 1 within 0 inlined_at 1 9 0
42 .cv_loc 1 1 4 0 is_stmt 0 # t.cpp:4:0
47 # %bb.2: # %do_exit.exit
48 .cv_loc 0 1 10 0 # t.cpp:10:0
52 .cv_loc 1 1 5 0 # t.cpp:5:0
56 .cv_loc 1 1 6 0 # t.cpp:6:0
66 .section .debug$S,"dr"
68 .long 4 # Debug section magic
70 .long Ltmp4-Ltmp3 # Subsection size
72 .short Ltmp6-Ltmp5 # Record length
74 .short 4412 # Record kind: S_COMPILE3
75 .long 0 # Flags and language
77 .short 7 # Frontend version
81 .short 7000 # Backend version
85 .asciz "clang version 7.0.0 " # Null-terminated compiler version string
89 .long 246 # Inlinee lines subsection
90 .long Ltmp8-Ltmp7 # Subsection size
92 .long 0 # Inlinee lines signature
94 # Inlined function do_exit starts at t.cpp:3
95 .long 4098 # Type index of inlined function
96 .cv_filechecksumoffset 1 # Offset into filechecksum table
97 .long 3 # Starting line number
101 .long 241 # Symbol subsection for callit
102 .long Ltmp10-Ltmp9 # Subsection size
104 .short Ltmp12-Ltmp11 # Record length
106 .short 4423 # Record kind: S_GPROC32_ID
110 .long Lfunc_end0-_callit # Code size
111 .long 0 # Offset after prologue
112 .long 0 # Offset before epilogue
113 .long 4099 # Function type index
114 .secrel32 _callit # Function section relative address
115 .secidx _callit # Function section index
117 .asciz "callit" # Function name
119 .short Ltmp14-Ltmp13 # Record length
121 .short 4429 # Record kind: S_INLINESITE
124 .long 4098 # Inlinee type index
125 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0
127 .short 2 # Record length
128 .short 4430 # Record kind: S_INLINESITE_END
129 .short 2 # Record length
130 .short 4431 # Record kind: S_PROC_ID_END
133 .cv_linetable 0, _callit, Lfunc_end0
134 .cv_filechecksums # File index to string table offset subsection
135 .cv_stringtable # String table
136 .section .debug$T,"dr"
138 .long 4 # Debug section magic
140 # TypeLeafKind: LF_ARGLIST (0x1201)
145 .byte 0x06, 0x00, 0x01, 0x12
146 .byte 0x00, 0x00, 0x00, 0x00
147 # Procedure (0x1001) {
148 # TypeLeafKind: LF_PROCEDURE (0x1008)
149 # ReturnType: void (0x3)
150 # CallingConvention: NearC (0x0)
151 # FunctionOptions [ (0x0)
154 # ArgListType: () (0x1000)
156 .byte 0x0e, 0x00, 0x08, 0x10
157 .byte 0x03, 0x00, 0x00, 0x00
158 .byte 0x00, 0x00, 0x00, 0x00
159 .byte 0x00, 0x10, 0x00, 0x00
161 # TypeLeafKind: LF_FUNC_ID (0x1601)
163 # FunctionType: void () (0x1001)
166 .byte 0x12, 0x00, 0x01, 0x16
167 .byte 0x00, 0x00, 0x00, 0x00
168 .byte 0x01, 0x10, 0x00, 0x00
169 .byte 0x64, 0x6f, 0x5f, 0x65
170 .byte 0x78, 0x69, 0x74, 0x00
172 # TypeLeafKind: LF_FUNC_ID (0x1601)
174 # FunctionType: void () (0x1001)
177 .byte 0x12, 0x00, 0x01, 0x16
178 .byte 0x00, 0x00, 0x00, 0x00
179 .byte 0x01, 0x10, 0x00, 0x00
180 .byte 0x63, 0x61, 0x6c, 0x6c
181 .byte 0x69, 0x74, 0x00, 0xf1