blob: 8d8af8c5124a9fe24a5b0e88aad889d7572caba7 [file] [log] [blame]
Simon Atanasyanb6d3c502019-01-24 09:13:14 +00001; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=obj \
2; RUN: -split-dwarf-file=foo.dwo -o=%t-32.o < %s
Simon Atanasyancb833072017-08-16 19:01:22 +00003; RUN: llvm-dwarfdump %t-32.o 2>&1 | FileCheck %s
Simon Atanasyanb6d3c502019-01-24 09:13:14 +00004; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=obj \
5; RUN: -split-dwarf-file=foo.dwo -o=%t-64.o < %s
Simon Atanasyancb833072017-08-16 19:01:22 +00006; RUN: llvm-dwarfdump %t-64.o 2>&1 | FileCheck %s
7
Simon Atanasyanb6d3c502019-01-24 09:13:14 +00008; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=asm \
9; RUN: -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM32 %s
10; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=asm \
11; RUN: -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM64 %s
12
Simon Atanasyancb833072017-08-16 19:01:22 +000013@x = thread_local global i32 5, align 4, !dbg !0
14
15; CHECK-NOT: error: failed to compute relocation: R_MIPS_TLS_DTPREL
16
Simon Atanasyanb6d3c502019-01-24 09:13:14 +000017; CHECK: DW_AT_name ("x")
18; CHECK-NEXT: DW_AT_type (0x00000025 "int")
19; CHECK-NEXT: DW_AT_external (true)
20; CHECK-NEXT: DW_AT_decl_file (0x01)
21; CHECK-NEXT: DW_AT_decl_line (1)
22; CHECK-NEXT: DW_AT_location (DW_OP_GNU_const_index 0x0, {{DW_OP_GNU_push_tls_address|DW_OP_form_tls_address}})
23
24; ASM32: .section .debug_addr
25; ASM32-NEXT: $addr_table_base0:
26; ASM32-NEXT: .4byte x+32768
27
28; ASM64: .section .debug_addr
29; ASM64-NEXT: .Laddr_table_base0:
30; ASM64-NEXT: .8byte x+32768
31
Simon Atanasyancb833072017-08-16 19:01:22 +000032!llvm.dbg.cu = !{!2}
33!llvm.module.flags = !{!7, !8}
34
Adrian Prantl05782212017-08-30 18:06:51 +000035!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
Simon Atanasyancb833072017-08-16 19:01:22 +000036!1 = distinct !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
37!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
38!3 = !DIFile(filename: "tls.c", directory: "/tmp")
39!4 = !{}
40!5 = !{!0}
41!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
42!7 = !{i32 2, !"Dwarf Version", i32 4}
43!8 = !{i32 2, !"Debug Info Version", i32 3}