1 # RUN: llvm-mc -triple=x86_64-pc-win32 -filetype=obj < %s | llvm-readobj --codeview | FileCheck %s
3 # This tries to test defrange gap edge cases.
6 # CHECK: Type: int (0x74)
9 # CHECK-NOT: LocalSym {
10 # CHECK: DefRangeRegisterSym {
11 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
12 # CHECK-NEXT: Register: ESI (0x17)
13 # CHECK-NEXT: MayHaveNoName: 0
14 # CHECK-NEXT: LocalVariableAddrRange {
15 # CHECK-NEXT: OffsetStart: .text+0x5
16 # CHECK-NEXT: ISectStart: 0x0
17 # CHECK-NEXT: Range: 0x5
19 # CHECK-NEXT: LocalVariableAddrGap [
20 # CHECK-NEXT: GapStartOffset: 0x3
21 # CHECK-NEXT: Range: 0x1
24 # CHECK-NEXT: DefRangeRegisterSym {
25 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
26 # CHECK-NEXT: Register: ESI (0x17)
27 # CHECK-NEXT: MayHaveNoName: 0
28 # CHECK-NEXT: LocalVariableAddrRange {
29 # CHECK-NEXT: OffsetStart: .text+0x10015
30 # CHECK-NEXT: ISectStart: 0x0
31 # CHECK-NEXT: Range: 0x6
34 # CHECK-NEXT: DefRangeRegisterSym {
35 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
36 # CHECK-NEXT: Register: ESI (0x17)
37 # CHECK-NEXT: MayHaveNoName: 0
38 # CHECK-NEXT: LocalVariableAddrRange {
39 # CHECK-NEXT: OffsetStart: .text+0x2001B
40 # CHECK-NEXT: ISectStart: 0x0
41 # CHECK-NEXT: Range: 0x1
44 # CHECK-NEXT: DefRangeRegisterSym {
45 # CHECK-NEXT: Kind: S_DEFRANGE_REGISTER (0x1141)
46 # CHECK-NEXT: Register: ESI (0x17)
47 # CHECK-NEXT: MayHaveNoName: 0
48 # CHECK-NEXT: LocalVariableAddrRange {
49 # CHECK-NEXT: OffsetStart: .text+0x2001C
50 # CHECK-NEXT: ISectStart: 0x0
51 # CHECK-NEXT: Range: 0xF000
53 # CHECK-NEXT: LocalVariableAddrGap [
54 # CHECK-NEXT: GapStartOffset: 0x1
55 # CHECK-NEXT: Range: 0xEFFE
71 .fill 0x10000, 1, 0x90
78 .fill 0x10000, 1, 0x90
83 # Create a range that is exactly 0xF000 bytes long with a gap in the
95 .section .debug$S,"dr"
97 .long 4 # Debug section magic
98 .long 241 # Symbol subsection for f
99 .long .Ltmp15-.Ltmp14 # Subsection size
101 .short .Ltmp17-.Ltmp16 # Record length
103 .short 4423 # Record kind: S_GPROC32_ID
107 .long .Lfunc_end0-f # Code size
108 .long 0 # Offset after prologue
109 .long 0 # Offset before epilogue
110 .long 4098 # Function type index
111 .secrel32 f # Function section relative address
112 .secidx f # Function section index
114 .asciz "f" # Function name
116 .short .Ltmp19-.Ltmp18 # Record length
118 .short 4414 # Record kind: S_LOCAL
119 .long 116 # TypeIndex
123 .cv_def_range .Lbegin0 .Lend0 .Lbegin1 .Lend1 .Lbegin2 .Lend2 .Lbegin3 .Lend3, "A\021\027\000\000\000"
124 .cv_def_range .Lbegin4 .Lend4 .Lbegin5 .Lend5, "A\021\027\000\000\000"
125 .short 2 # Record length
126 .short 4431 # Record kind: S_PROC_ID_END
128 .cv_filechecksums # File index to string table offset subsection
129 .cv_stringtable # String table