cv-def-range-gap.s
3.88 KB
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
# RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj < %s | llvm-readobj --codeview - | FileCheck %s
# This tries to test defrange gap edge cases.
# CHECK: LocalSym {
# CHECK: Type: int (0x74)
# CHECK: VarName: p
# CHECK: }
# CHECK-NOT: LocalSym {
# CHECK: DefRangeRegisterSym {
# CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
# CHECK-NEXT: Register: ESI (0x17)
# CHECK-NEXT: MayHaveNoName: 0
# CHECK-NEXT: LocalVariableAddrRange {
# CHECK-NEXT: OffsetStart: .text+0x5
# CHECK-NEXT: ISectStart: 0x0
# CHECK-NEXT: Range: 0x5
# CHECK-NEXT: }
# CHECK-NEXT: LocalVariableAddrGap [
# CHECK-NEXT: GapStartOffset: 0x3
# CHECK-NEXT: Range: 0x1
# CHECK-NEXT: ]
# CHECK-NEXT: }
# CHECK-NEXT: DefRangeRegisterSym {
# CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
# CHECK-NEXT: Register: ESI (0x17)
# CHECK-NEXT: MayHaveNoName: 0
# CHECK-NEXT: LocalVariableAddrRange {
# CHECK-NEXT: OffsetStart: .text+0x10015
# CHECK-NEXT: ISectStart: 0x0
# CHECK-NEXT: Range: 0x6
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: DefRangeRegisterSym {
# CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
# CHECK-NEXT: Register: ESI (0x17)
# CHECK-NEXT: MayHaveNoName: 0
# CHECK-NEXT: LocalVariableAddrRange {
# CHECK-NEXT: OffsetStart: .text+0x2001B
# CHECK-NEXT: ISectStart: 0x0
# CHECK-NEXT: Range: 0x1
# CHECK-NEXT: }
# CHECK-NEXT: }
# CHECK-NEXT: DefRangeRegisterSym {
# CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
# CHECK-NEXT: Register: ESI (0x17)
# CHECK-NEXT: MayHaveNoName: 0
# CHECK-NEXT: LocalVariableAddrRange {
# CHECK-NEXT: OffsetStart: .text+0x2001C
# CHECK-NEXT: ISectStart: 0x0
# CHECK-NEXT: Range: 0xF000
# CHECK-NEXT: }
# CHECK-NEXT: LocalVariableAddrGap [
# CHECK-NEXT: GapStartOffset: 0x1
# CHECK-NEXT: Range: 0xEFFE
# CHECK-NEXT: ]
# CHECK-NEXT: }
.text
f: # @f
mov $42, %esi
.Lbegin0:
nop
jmp .Lbegin1
.Lend0:
nop
.Lbegin1:
nop
.Lend1:
.p2align 4
.fill 0x10000, 1, 0x90
mov $42, %esi
.Lbegin2:
nop
jmp .Lbegin3
.Lend2:
.fill 0x10000, 1, 0x90
.Lbegin3:
nop
.Lend3:
# Create a range that is exactly 0xF000 bytes long with a gap in the
# middle.
.Lbegin4:
nop
.Lend4:
.fill 0xeffe, 1, 0x90
.Lbegin5:
nop
.Lend5:
ret
.Lfunc_end0:
.section .debug$S,"dr"
.p2align 2
.long 4 # Debug section magic
.long 241 # Symbol subsection for f
.long .Ltmp15-.Ltmp14 # Subsection size
.Ltmp14:
.short .Ltmp17-.Ltmp16 # Record length
.Ltmp16:
.short 4423 # Record kind: S_GPROC32_ID
.long 0 # PtrParent
.long 0 # PtrEnd
.long 0 # PtrNext
.long .Lfunc_end0-f # Code size
.long 0 # Offset after prologue
.long 0 # Offset before epilogue
.long 4098 # Function type index
.secrel32 f # Function section relative address
.secidx f # Function section index
.byte 0 # Flags
.asciz "f" # Function name
.Ltmp17:
.short .Ltmp19-.Ltmp18 # Record length
.Ltmp18:
.short 4414 # Record kind: S_LOCAL
.long 116 # TypeIndex
.short 0 # Flags
.asciz "p"
.Ltmp19:
.cv_def_range .Lbegin0 .Lend0 .Lbegin1 .Lend1 .Lbegin2 .Lend2 .Lbegin3 .Lend3, reg, 23
.cv_def_range .Lbegin4 .Lend4 .Lbegin5 .Lend5, reg, 23
.short 2 # Record length
.short 4431 # Record kind: S_PROC_ID_END
.Ltmp15:
.cv_filechecksums # File index to string table offset subsection
.cv_stringtable # String table