brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · 424ea96 Raw
170 lines · plain
1; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -O0 < %s | FileCheck --check-prefix=X86 %s2; 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 %s3; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s4; 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 %s5; RUN: llc -mcpu=core2 -mtriple=x86_64-uefi -O0 < %s | FileCheck --check-prefix=X64 %s6; RUN: llc -mcpu=core2 -mtriple=x86_64-uefi -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview - | FileCheck --check-prefix=OBJ64 %s7 8; This LL file was generated by running clang on the following code:9; D:\asm.c:10;  1 void g(void);11;  212;  3 void f(void) {13;  4   __asm align 4;14;  5   g();15;  6 }16 17; X86-LABEL: _f:18; X86:      .cv_file 1 "D:\\asm.c"19; X86:      .cv_loc 0 1 4 020; X86:      .cv_loc 0 1 5 021; X86:      calll   _g22; X86:      .cv_loc 0 1 6 023; X86:      ret24; X86:      [[END_OF_F:.?Lfunc_end.*]]:25 26; Line table27; X86:      .cv_linetable 0, _f, [[END_OF_F]]28; File index to string table offset subsection29; X86-NEXT: .cv_filechecksums30; String table31; X86-NEXT: .cv_stringtable32 33; OBJ32:    Section {34; OBJ32:      Name: .debug$S (2E 64 65 62 75 67 24 53)35; OBJ32:      Characteristics [ (0x42300040)36; OBJ32:      ]37; OBJ32:    CodeViewDebugInfo [38; OBJ32:      Subsection [39; OBJ32-NEXT:   SubSectionType: Symbols (0xF1)40; OBJ32:        {{.*}}Proc{{.*}}Sym {41; OBJ32:          CodeSize: 0x642; OBJ32:          DisplayName: f43; OBJ32:          LinkageName: _f44; OBJ32:        }45; OBJ32:        ProcEnd {46; OBJ32:        }47; OBJ32-NEXT: ]48; OBJ32:      FunctionLineTable [49; OBJ32-NEXT:   Name: _f50; OBJ32-NEXT:   Flags: 0x051; OBJ32-NEXT:   CodeSize: 0x652; OBJ32-NEXT:   FilenameSegment [53; OBJ32-NEXT:   Filename: D:\asm.c54; FIXME: An empty __asm stmt creates an extra entry.55; We seem to know that these offsets are the same statically during the56; execution of endModule().  See PR18679 for the details.57; OBJ32-NEXT:   +0x0 [58; OBJ32-NEXT:     LineNumberStart: 459; OBJ32-NEXT:     LineNumberEndDelta: 060; OBJ32-NEXT:     IsStatement: No61; OBJ32-NEXT:   ]62; OBJ32-NEXT:   +0x0 [63; OBJ32-NEXT:     LineNumberStart: 564; OBJ32-NEXT:     LineNumberEndDelta: 065; OBJ32-NEXT:     IsStatement: No66; OBJ32-NEXT:   ]67; OBJ32-NEXT:   +0x5 [68; OBJ32-NEXT:     LineNumberStart: 669; OBJ32-NEXT:     LineNumberEndDelta: 070; OBJ32-NEXT:     IsStatement: No71; OBJ32-NEXT:   ]72; OBJ32-NEXT: ]73 74; X64-LABEL: f:75; X64:      .cv_file 1 "D:\\asm.c"76; X64:      .cv_loc 0 1 3 077; X64:      subq    $40, %rsp78; X64:      .cv_loc 0 1 4 079; X64:      .cv_loc 0 1 5 080; X64:      callq   g81; X64:      .cv_loc 0 1 6 082; X64:      addq    $40, %rsp83; X64-NEXT: ret84; X64:      [[END_OF_F:.?Lfunc_end.*]]:85 86; Line table87; X64:      .cv_linetable 0, f, [[END_OF_F]]88; File index to string table offset subsection89; X64-NEXT: .cv_filechecksums90; String table91; X64-NEXT: .cv_stringtable92 93; OBJ64:    Section {94; OBJ64:      Name: .debug$S (2E 64 65 62 75 67 24 53)95; OBJ64:      Characteristics [ (0x42300040)96; OBJ64:      ]97; OBJ64:      Subsection [98; OBJ64-NEXT:   SubSectionType: Symbols (0xF1)99; OBJ64:        {{.*}}Proc{{.*}}Sym {100; OBJ64:          CodeSize: 0xE101; OBJ64:          DisplayName: f102; OBJ64:          LinkageName: f103; OBJ64:        }104; OBJ64:        ProcEnd {105; OBJ64:        }106; OBJ64-NEXT: ]107; OBJ64:      FunctionLineTable [108; OBJ64-NEXT:   Name: f109; OBJ64-NEXT:   Flags: 0x0110; OBJ64-NEXT:   CodeSize: 0xE111; OBJ64-NEXT:   FilenameSegment [112; OBJ64-NEXT:     Filename: D:\asm.c113; FIXME: An empty __asm stmt creates an extra entry.114; See PR18679 for the details.115; OBJ64-NEXT:     +0x0 [116; OBJ64-NEXT:       LineNumberStart: 3117; OBJ64-NEXT:       LineNumberEndDelta: 0118; OBJ64-NEXT:       IsStatement: No119; OBJ64-NEXT:     ]120; OBJ64-NEXT:     +0x4 [121; OBJ64-NEXT:       LineNumberStart: 4122; OBJ64-NEXT:       LineNumberEndDelta: 0123; OBJ64-NEXT:       IsStatement: No124; OBJ64-NEXT:     ]125; OBJ64-NEXT:     +0x4 [126; OBJ64-NEXT:       LineNumberStart: 5127; OBJ64-NEXT:       LineNumberEndDelta: 0128; OBJ64-NEXT:       IsStatement: No129; OBJ64-NEXT:     ]130; OBJ64-NEXT:     +0x9 [131; OBJ64-NEXT:       LineNumberStart: 6132; OBJ64-NEXT:       LineNumberEndDelta: 0133; OBJ64-NEXT:       IsStatement: No134; OBJ64-NEXT:     ]135; OBJ64-NEXT:   ]136; OBJ64-NEXT: ]137 138; Function Attrs: nounwind139define void @f() #0 !dbg !4 {140entry:141  call void asm sideeffect inteldialect ".align 4", "~{dirflag},~{fpsr},~{flags}"() #2, !dbg !12142  call void @g(), !dbg !13143  ret void, !dbg !14144}145 146declare void @g() #1147 148attributes #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" "use-soft-float"="false" }149attributes #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" "use-soft-float"="false" }150attributes #2 = { nounwind }151 152!llvm.dbg.cu = !{!0}153!llvm.module.flags = !{!9, !10}154!llvm.ident = !{!11}155 156!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)157!1 = !DIFile(filename: "<unknown>", directory: "D:\5C")158!2 = !{}159!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)160!5 = !DIFile(filename: "asm.c", directory: "D:\5C")161!6 = !DIFile(filename: "asm.c", directory: "D:C")162!7 = !DISubroutineType(types: !8)163!8 = !{null}164!9 = !{i32 2, !"CodeView", i32 1}165!10 = !{i32 1, !"Debug Info Version", i32 3}166!11 = !{!"clang version 3.5 "}167!12 = !DILocation(line: 4, scope: !4)168!13 = !DILocation(line: 5, scope: !4)169!14 = !DILocation(line: 6, scope: !4)170