183 lines · plain
1# RUN: llvm-mc %s -triple=i686-pc-win32 -filetype=obj -o %t.obj2# RUN: llvm-objdump --no-print-imm-hex -d %t.obj | FileCheck %s --check-prefix=ASM3# RUN: llvm-pdbutil dump -il -symbols %t.obj | FileCheck %s --check-prefix=CODEVIEW4 5# Based on the other cv-loc-unreachable-2.s, but with other code in the same6# section afterwards. We had negative label difference assertions when .cv_loc7# bound tightly to the next instruction.8 9# ASM: 00000000 <_callit>:10# begin inline {11# ASM-NEXT: 0: e8 00 00 00 00 calll 0x5 <_callit+0x5>12# ASM-NEXT: 5: 85 c0 testl %eax, %eax13# ASM-NEXT: 7: 75 01 jne 0xa <_callit+0xa>14# } end inline15# ASM-NEXT: 9: c3 retl16# begin inline {17# ASM-NEXT: a: 6a 20 pushl $3218# ASM-NEXT: c: ff 15 00 00 00 00 calll *019# } end inline20 21# CODEVIEW: Inlinee | Line | Source File22# CODEVIEW: 0x1002 | 3 | C:\src\llvm-project\build\t.cpp (MD5: 0BC092F354CE14FDC2FA78F8EDE7426E)23 24# CODEVIEW: S_INLINESITE [size = 26]25# CODEVIEW-NEXT: inlinee = 0x1002 (do_exit), parent = 0, end = 026# 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)31 32 .text33 .def _callit; .scl 2; .type 32; .endef34 .globl _callit # -- Begin function callit35_callit: # @callit36Lfunc_begin0:37 .cv_func_id 038 .cv_fpo_proc _callit 039# %bb.0: # %entry40 .cv_file 1 "C:\\src\\llvm-project\\build\\t.cpp" "0BC092F354CE14FDC2FA78F8EDE7426E" 141 .cv_inline_site_id 1 within 0 inlined_at 1 9 042 .cv_loc 1 1 4 0 is_stmt 0 # t.cpp:4:043 calll _unlikely44 testl %eax, %eax45 jne LBB0_146Ltmp0:47# %bb.2: # %do_exit.exit48 .cv_loc 0 1 10 0 # t.cpp:10:049 retl50LBB0_1: # %if.then.i51Ltmp1:52 .cv_loc 1 1 5 0 # t.cpp:5:053 pushl $3254 calll *__imp__exit55 # EXTRA56 .cv_loc 1 1 6 0 # t.cpp:6:057Ltmp2:58 .cv_fpo_endproc59Lfunc_end0:60 # -- End function61 62 .text63 .align 3264 retl65 66 .section .debug$S,"dr"67 .p2align 268 .long 4 # Debug section magic69 .long 24170 .long Ltmp4-Ltmp3 # Subsection size71Ltmp3:72 .short Ltmp6-Ltmp5 # Record length73Ltmp5:74 .short 4412 # Record kind: S_COMPILE375 .long 0 # Flags and language76 .short 7 # CPUType77 .short 7 # Frontend version78 .short 079 .short 080 .short 081 .short 7000 # Backend version82 .short 083 .short 084 .short 085 .asciz "clang version 7.0.0 " # Null-terminated compiler version string86Ltmp6:87Ltmp4:88 .p2align 289 .long 246 # Inlinee lines subsection90 .long Ltmp8-Ltmp7 # Subsection size91Ltmp7:92 .long 0 # Inlinee lines signature93 94 # Inlined function do_exit starts at t.cpp:395 .long 4098 # Type index of inlined function96 .cv_filechecksumoffset 1 # Offset into filechecksum table97 .long 3 # Starting line number98Ltmp8:99 .p2align 2100 .cv_fpo_data _callit101 .long 241 # Symbol subsection for callit102 .long Ltmp10-Ltmp9 # Subsection size103Ltmp9:104 .short Ltmp12-Ltmp11 # Record length105Ltmp11:106 .short 4423 # Record kind: S_GPROC32_ID107 .long 0 # PtrParent108 .long 0 # PtrEnd109 .long 0 # PtrNext110 .long Lfunc_end0-_callit # Code size111 .long 0 # Offset after prologue112 .long 0 # Offset before epilogue113 .long 4099 # Function type index114 .secrel32 _callit # Function section relative address115 .secidx _callit # Function section index116 .byte 0 # Flags117 .asciz "callit" # Function name118Ltmp12:119 .short Ltmp14-Ltmp13 # Record length120Ltmp13:121 .short 4429 # Record kind: S_INLINESITE122 .long 0 # PtrParent123 .long 0 # PtrEnd124 .long 4098 # Inlinee type index125 .cv_inline_linetable 1 1 3 Lfunc_begin0 Lfunc_end0126Ltmp14:127 .short 2 # Record length128 .short 4430 # Record kind: S_INLINESITE_END129 .short 2 # Record length130 .short 4431 # Record kind: S_PROC_ID_END131Ltmp10:132 .p2align 2133 .cv_linetable 0, _callit, Lfunc_end0134 .cv_filechecksums # File index to string table offset subsection135 .cv_stringtable # String table136 .section .debug$T,"dr"137 .p2align 2138 .long 4 # Debug section magic139 # ArgList (0x1000) {140 # TypeLeafKind: LF_ARGLIST (0x1201)141 # NumArgs: 0142 # Arguments [143 # ]144 # }145 .byte 0x06, 0x00, 0x01, 0x12146 .byte 0x00, 0x00, 0x00, 0x00147 # Procedure (0x1001) {148 # TypeLeafKind: LF_PROCEDURE (0x1008)149 # ReturnType: void (0x3)150 # CallingConvention: NearC (0x0)151 # FunctionOptions [ (0x0)152 # ]153 # NumParameters: 0154 # ArgListType: () (0x1000)155 # }156 .byte 0x0e, 0x00, 0x08, 0x10157 .byte 0x03, 0x00, 0x00, 0x00158 .byte 0x00, 0x00, 0x00, 0x00159 .byte 0x00, 0x10, 0x00, 0x00160 # FuncId (0x1002) {161 # TypeLeafKind: LF_FUNC_ID (0x1601)162 # ParentScope: 0x0163 # FunctionType: void () (0x1001)164 # Name: do_exit165 # }166 .byte 0x12, 0x00, 0x01, 0x16167 .byte 0x00, 0x00, 0x00, 0x00168 .byte 0x01, 0x10, 0x00, 0x00169 .byte 0x64, 0x6f, 0x5f, 0x65170 .byte 0x78, 0x69, 0x74, 0x00171 # FuncId (0x1003) {172 # TypeLeafKind: LF_FUNC_ID (0x1601)173 # ParentScope: 0x0174 # FunctionType: void () (0x1001)175 # Name: callit176 # }177 .byte 0x12, 0x00, 0x01, 0x16178 .byte 0x00, 0x00, 0x00, 0x00179 .byte 0x01, 0x10, 0x00, 0x00180 .byte 0x63, 0x61, 0x6c, 0x6c181 .byte 0x69, 0x74, 0x00, 0xf1182 183