brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.0 KiB · f6f6b6f Raw
135 lines · plain
1; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-linux-gnu \2; RUN:   | FileCheck --check-prefixes=SINGLE,SINGLE-64,GNUOP %s3 4; RUN: llc %s -o - -filetype=asm -O0 -mtriple=i386-linux-gnu \5; RUN:   | FileCheck --check-prefixes=SINGLE,SINGLE-32,GNUOP %s6 7; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo \8; RUN:   | FileCheck --check-prefixes=FISSION,GNUOP %s9 10; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-scei-ps4 \11; RUN:   | FileCheck --check-prefixes=SINGLE,SINGLE-64,STDOP %s12 13; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-apple-darwin \14; RUN:   | FileCheck --check-prefixes=DARWIN,STDOP %s15 16; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-freebsd \17; RUN:   | FileCheck --check-prefixes=SINGLE,SINGLE-64,GNUOP %s18 19; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-linux-gnu -emulated-tls \20; RUN:   | FileCheck --check-prefix=SINGLE --check-prefix=EMUSINGLE-64 %s21 22; RUN: llc %s -o - -filetype=asm -O0 -mtriple=i386-linux-gnu -emulated-tls \23; RUN:   | FileCheck --check-prefix=SINGLE --check-prefix=EMUSINGLE-32 %s24 25; TODO: Add expected output for -emulated-tls tests.26; EMUSINGLE-32: {{^}}27; EMUSINGLE-64: {{^}}28 29; FIXME: add relocation and DWARF expression support to llvm-dwarfdump & use30; that here instead of raw assembly printing31 32; FISSION: .section    .debug_info.dwo,33; 3 bytes of data in this DW_FORM_exprloc representation of the location of 'tls'34; FISSION: .byte 3{{ *}}# DW_AT_location35; DW_OP_GNU_const_index (0xfx == 252) to refer to the debug_addr table36; FISSION-NEXT: .byte 25237; an index of zero into the debug_addr table38; FISSION-NEXT: .byte 039 40; SINGLE: .section     .debug_info,41; DARWIN: .section     {{.*}}debug_info,42 43; 10 bytes of data in this DW_FORM_exprloc representation of the location of 'tls'44; SINGLE-64: .byte     10 # DW_AT_location45; DW_OP_const8u (0x0e == 14) of address46; SINGLE-64-NEXT: .byte        1447; SINGLE-64-NEXT: .quad tls@DTPOFF48 49; DARWIN: .byte     10 ## DW_AT_location50; DW_OP_const8u (0x0e == 14) of address51; DARWIN-NEXT: .byte        1452; DARWIN-NEXT: .quad _tls53 54; 6 bytes of data in 32-bit mode55; SINGLE-32: .byte     6 # DW_AT_location56; DW_OP_const4u (0x0e == 12) of address57; SINGLE-32-NEXT: .byte        1258; SINGLE-32-NEXT: .long tls@DTPOFF59 60; DW_OP_GNU_push_tls_address61; GNUOP-NEXT: .byte 22462; DW_OP_form_tls_address63; STDOP-NEXT: .byte 15564 65; FISSION: DW_TAG_variable66; FISSION: .byte 2 # DW_AT_location67; DW_OP_GNU_addr_index68; FISSION-NEXT: .byte 25169; FISSION-NEXT: .byte 170 71; FISSION: DW_TAG_template_value_parameter72; FISSION: .byte 3 # DW_AT_location73; DW_OP_GNU_addr_index74; FISSION-NEXT: .byte 25175; FISSION-NEXT: .byte 176; DW_OP_stack_value77; FISSION-NEXT: .byte 15978 79; check that the expected TLS address description is the first thing in the debug_addr section80; FISSION: .section    .debug_addr81; FISSION-NEXT: .Laddr_table_base0:82; FISSION-NEXT: .quad  tls@DTPOFF83; FISSION-NEXT: .quad  glbl84; FISSION-NOT: .quad  glbl85 86; Generated from:87 88; __thread int tls;89; int glbl;90;91; template <int *I>92; int func() {93;   return 0;94; }95;96; template int func<&glbl>(); // create a second reference to 'glbl'97 98source_filename = "test/DebugInfo/X86/tls.ll"99 100@tls = thread_local global i32 0, align 4, !dbg !0101@glbl = global i32 0, align 4, !dbg !4102 103; Function Attrs: nounwind uwtable104define weak_odr i32 @_Z4funcIXadL_Z4glblEEEiv() #0 !dbg !12 {105entry:106  ret i32 0, !dbg !18107}108 109attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }110 111!llvm.dbg.cu = !{!6}112!llvm.module.flags = !{!9, !10}113!llvm.ident = !{!11}114 115!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())116!1 = !DIGlobalVariable(name: "tls", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)117!2 = !DIFile(filename: "tls.cpp", directory: "/tmp/dbginfo")118!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)119!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())120!5 = !DIGlobalVariable(name: "glbl", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)121!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "-.dwo", emissionKind: FullDebug, enums: !7, retainedTypes: !7, globals: !8, imports: !7)122!7 = !{}123!8 = !{!0, !4}124!9 = !{i32 2, !"Dwarf Version", i32 4}125!10 = !{i32 1, !"Debug Info Version", i32 3}126!11 = !{!"clang version 3.5 "}127!12 = distinct !DISubprogram(name: "func<&glbl>", linkageName: "_Z4funcIXadL_Z4glblEEEiv", scope: !2, file: !2, line: 5, type: !13, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !6, templateParams: !15, retainedNodes: !7)128!13 = !DISubroutineType(types: !14)129!14 = !{!3}130!15 = !{!16}131!16 = !DITemplateValueParameter(name: "I", type: !17, value: ptr @glbl)132!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)133!18 = !DILocation(line: 6, scope: !12)134 135