1 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -O0 < %s | FileCheck --check-prefix=X86 %s
2 ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview - | FileCheck --check-prefix=OBJ32 %s
3 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s
4 ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview - | FileCheck --check-prefix=OBJ64 %s
6 ; This LL file was generated by running clang on the following code:
16 ; X86: .cv_file 1 "D:\\asm.c"
17 ; X86: .cv_loc 0 1 4 0
18 ; X86: .cv_loc 0 1 5 0
20 ; X86: .cv_loc 0 1 6 0
22 ; X86: [[END_OF_F:.?Lfunc_end.*]]:
25 ; X86: .cv_linetable 0, _f, [[END_OF_F]]
26 ; File index to string table offset subsection
27 ; X86-NEXT: .cv_filechecksums
29 ; X86-NEXT: .cv_stringtable
32 ; OBJ32: Name: .debug$S (2E 64 65 62 75 67 24 53)
33 ; OBJ32: Characteristics [ (0x42300040)
35 ; OBJ32: CodeViewDebugInfo [
37 ; OBJ32-NEXT: SubSectionType: Symbols (0xF1)
38 ; OBJ32: {{.*}}Proc{{.*}}Sym {
39 ; OBJ32: CodeSize: 0x6
40 ; OBJ32: DisplayName: f
41 ; OBJ32: LinkageName: _f
46 ; OBJ32: FunctionLineTable [
47 ; OBJ32-NEXT: Name: _f
48 ; OBJ32-NEXT: Flags: 0x0
49 ; OBJ32-NEXT: CodeSize: 0x6
50 ; OBJ32-NEXT: FilenameSegment [
51 ; OBJ32-NEXT: Filename: D:\asm.c
52 ; FIXME: An empty __asm stmt creates an extra entry.
53 ; We seem to know that these offsets are the same statically during the
54 ; execution of endModule(). See PR18679 for the details.
56 ; OBJ32-NEXT: LineNumberStart: 4
57 ; OBJ32-NEXT: LineNumberEndDelta: 0
58 ; OBJ32-NEXT: IsStatement: No
61 ; OBJ32-NEXT: LineNumberStart: 5
62 ; OBJ32-NEXT: LineNumberEndDelta: 0
63 ; OBJ32-NEXT: IsStatement: No
66 ; OBJ32-NEXT: LineNumberStart: 6
67 ; OBJ32-NEXT: LineNumberEndDelta: 0
68 ; OBJ32-NEXT: IsStatement: No
73 ; X64: .cv_file 1 "D:\\asm.c"
74 ; X64: .cv_loc 0 1 3 0
76 ; X64: .cv_loc 0 1 4 0
77 ; X64: .cv_loc 0 1 5 0
79 ; X64: .cv_loc 0 1 6 0
82 ; X64: [[END_OF_F:.?Lfunc_end.*]]:
85 ; X64: .cv_linetable 0, f, [[END_OF_F]]
86 ; File index to string table offset subsection
87 ; X64-NEXT: .cv_filechecksums
89 ; X64-NEXT: .cv_stringtable
92 ; OBJ64: Name: .debug$S (2E 64 65 62 75 67 24 53)
93 ; OBJ64: Characteristics [ (0x42300040)
96 ; OBJ64-NEXT: SubSectionType: Symbols (0xF1)
97 ; OBJ64: {{.*}}Proc{{.*}}Sym {
98 ; OBJ64: CodeSize: 0xE
99 ; OBJ64: DisplayName: f
100 ; OBJ64: LinkageName: f
105 ; OBJ64: FunctionLineTable [
106 ; OBJ64-NEXT: Name: f
107 ; OBJ64-NEXT: Flags: 0x0
108 ; OBJ64-NEXT: CodeSize: 0xE
109 ; OBJ64-NEXT: FilenameSegment [
110 ; OBJ64-NEXT: Filename: D:\asm.c
111 ; FIXME: An empty __asm stmt creates an extra entry.
112 ; See PR18679 for the details.
114 ; OBJ64-NEXT: LineNumberStart: 3
115 ; OBJ64-NEXT: LineNumberEndDelta: 0
116 ; OBJ64-NEXT: IsStatement: No
119 ; OBJ64-NEXT: LineNumberStart: 4
120 ; OBJ64-NEXT: LineNumberEndDelta: 0
121 ; OBJ64-NEXT: IsStatement: No
124 ; OBJ64-NEXT: LineNumberStart: 5
125 ; OBJ64-NEXT: LineNumberEndDelta: 0
126 ; OBJ64-NEXT: IsStatement: No
129 ; OBJ64-NEXT: LineNumberStart: 6
130 ; OBJ64-NEXT: LineNumberEndDelta: 0
131 ; OBJ64-NEXT: IsStatement: No
136 ; Function Attrs: nounwind
137 define void @f() #0 !dbg !4 {
139 call void asm sideeffect inteldialect ".align 4", "~{dirflag},~{fpsr},~{flags}"() #2, !dbg !12
140 call void @g(), !dbg !13
146 attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
147 attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="none" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
148 attributes #2 = { nounwind }
151 !llvm.module.flags = !{!9, !10}
154 !0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
155 !1 = !DIFile(filename: "<unknown>", directory: "D:\5C")
157 !4 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !5, scope: !6, type: !7, retainedNodes: !2)
158 !5 = !DIFile(filename: "asm.c", directory: "D:\5C")
159 !6 = !DIFile(filename: "asm.c", directory: "D:C")
160 !7 = !DISubroutineType(types: !8)
162 !9 = !{i32 2, !"CodeView", i32 1}
163 !10 = !{i32 1, !"Debug Info Version", i32 3}
164 !11 = !{!"clang version 3.5 "}
165 !12 = !DILocation(line: 4, scope: !4)
166 !13 = !DILocation(line: 5, scope: !4)
167 !14 = !DILocation(line: 6, scope: !4)