blob: a1ae1404e925c7345039d061c08bf9515a399df2 [file] [log] [blame]
David Majnemer408b5e62016-02-05 01:55:49 +00001# RUN: llvm-mc -triple=i686-pc-win32 -filetype=obj < %s | llvm-readobj -codeview -codeview-subsection-bytes | FileCheck %s
2 .text
3 .def @feat.00;
4 .scl 3;
5 .type 0;
6 .endef
7 .globl @feat.00
8@feat.00 = 1
9 .def _g;
10 .scl 2;
11 .type 32;
12 .endef
13 .globl _g
14 .p2align 4, 0x90
15_g: # @g
16Lfunc_begin0:
17 .cv_file 1 "\\usr\\local\\google\\home\\majnemer\\llvm\\src\\<stdin>"
18 .cv_loc 0 1 3 0 is_stmt 0 # <stdin>:3:0
19# BB#0: # %entry
20 pushl %ebp
21 movl %esp, %ebp
22 subl $8, %esp
23 leal -4(%ebp), %eax
24Lvar_begin0:
25 #DEBUG_VALUE: g:x <- %EAX
26 .cv_loc 0 1 4 7 # <stdin>:4:7
27 movl $0, -4(%ebp)
28 .cv_loc 0 1 5 3 # <stdin>:5:3
29 movl %eax, (%esp)
30 calll _f
31 .cv_loc 0 1 6 1 # <stdin>:6:1
32Lvar_end0:
33 addl $8, %esp
34 popl %ebp
35 retl
36Lfunc_end0:
37
38 .section .debug$T,"dr"
39 .long 4 # Debug section magic
40 .short 6 # Type record length
41 .short 4609 # Leaf type: LF_ARGLIST
42 .long 0 # Number of arguments
43 .short 14 # Type record length
44 .short 4104 # Leaf type: LF_PROCEDURE
45 .long 3 # Return type index
46 .byte 0 # Calling convention
47 .byte 0 # Function options
48 .short 0 # # of parameters
49 .long 4096 # Argument list type index
50 .short 12 # Type record length
51 .short 5633 # Leaf type: LF_FUNC_ID
52 .long 0 # Scope type index
53 .long 4097 # Function type
54 .asciz "g" # Function name
55 .section .debug$S,"dr"
56 .long 4 # Debug section magic
57 .long 241 # Symbol subsection for g
58 .long Ltmp1-Ltmp0 # Subsection size
59Ltmp0:
60 .short Ltmp3-Ltmp2 # Record length
61Ltmp2:
62 .short 4423 # Record kind: S_GPROC32_ID
63 .long 0 # PtrParent
64 .long 0 # PtrEnd
65 .long 0 # PtrNext
66 .long Lfunc_end0-_g # Code size
67 .long 0 # Offset after prologue
68 .long 0 # Offset before epilogue
69 .long 0 # Function type index
70 .secrel32 _g # Function section relative address
71 .secidx _g # Function section index
72 .byte 0 # Flags
73 .asciz "g" # Function name
74Ltmp3:
75 .short 2 # Record length
76 .short 4431 # Record kind: S_PROC_ID_END
77 .cv_def_range Lvar_begin0 Lvar_end0, "\102\021\374\377\377\377"
78
79# CHECK: DefRangeFramePointerRel {
80# CHECK: Offset: -4
81# CHECK: LocalVariableAddrRange {
82# CHECK: OffsetStart: .text+0x9
83# CHECK: ISectStart: 0x0
Reid Kleckner4ab992d2016-02-11 23:40:14 +000084# CHECK: Range: 0xF
David Majnemer408b5e62016-02-05 01:55:49 +000085# CHECK: }
86# CHECK: }
87# CHECK: BlockRelocations [
88# CHECK: 0x4 IMAGE_REL_I386_SECREL .text
89# CHECK: 0x8 IMAGE_REL_I386_SECTION .text
90# CHECK: ]
91
92Ltmp1:
93 .p2align 2
94 .cv_linetable 0, _g, Lfunc_end0
95 .cv_filechecksums # File index to string table offset subsection
96 .cv_stringtable # String table
97