1 ; RUN: llc -O0 -mtriple=mips -mcpu=mips32r2 -filetype=obj \
2 ; RUN: -split-dwarf-file=foo.dwo -o=%t-32.o < %s
3 ; RUN: llvm-dwarfdump %t-32.o 2>&1 | FileCheck %s
4 ; RUN: llc -O0 -mtriple=mips64 -mcpu=mips64r2 -filetype=obj \
5 ; RUN: -split-dwarf-file=foo.dwo -o=%t-64.o < %s
6 ; RUN: llvm-dwarfdump %t-64.o 2>&1 | FileCheck %s
8 ; RUN: llc -O0 -mtriple=mips -mcpu=mips32r2 -filetype=asm \
9 ; RUN: -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM32 %s
10 ; RUN: llc -O0 -mtriple=mips64 -mcpu=mips64r2 -filetype=asm \
11 ; RUN: -split-dwarf-file=foo.dwo < %s | FileCheck -check-prefix=ASM64 %s
13 @x = thread_local global i32 5, align 4, !dbg !0
15 ; CHECK-NOT: error: failed to compute relocation: R_MIPS_TLS_DTPREL
17 ; 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}})
24 ; ASM32: .section .debug_addr
25 ; ASM32-NEXT: $addr_table_base0:
26 ; ASM32-NEXT: .4byte x+32768
28 ; ASM64: .section .debug_addr
29 ; ASM64-NEXT: .Laddr_table_base0:
30 ; ASM64-NEXT: .8byte x+32768
33 !llvm.module.flags = !{!7, !8}
35 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
36 !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")
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}