Simon Atanasyan | b6d3c50 | 2019-01-24 09:13:14 +0000 | [diff] [blame] | 1 | ; RUN: llc -O0 -march=mips -mcpu=mips32r2 -filetype=obj \ |
| 2 | ; RUN: -split-dwarf-file=foo.dwo -o=%t-32.o < %s |
Simon Atanasyan | cb83307 | 2017-08-16 19:01:22 +0000 | [diff] [blame] | 3 | ; RUN: llvm-dwarfdump %t-32.o 2>&1 | FileCheck %s |
Simon Atanasyan | b6d3c50 | 2019-01-24 09:13:14 +0000 | [diff] [blame] | 4 | ; RUN: llc -O0 -march=mips64 -mcpu=mips64r2 -filetype=obj \ |
| 5 | ; RUN: -split-dwarf-file=foo.dwo -o=%t-64.o < %s |
Simon Atanasyan | cb83307 | 2017-08-16 19:01:22 +0000 | [diff] [blame] | 6 | ; RUN: llvm-dwarfdump %t-64.o 2>&1 | FileCheck %s |
| 7 | |
Simon Atanasyan | b6d3c50 | 2019-01-24 09:13:14 +0000 | [diff] [blame] | 8 | ; 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 Atanasyan | cb83307 | 2017-08-16 19:01:22 +0000 | [diff] [blame] | 13 | @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 Atanasyan | b6d3c50 | 2019-01-24 09:13:14 +0000 | [diff] [blame] | 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}}) |
| 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 Atanasyan | cb83307 | 2017-08-16 19:01:22 +0000 | [diff] [blame] | 32 | !llvm.dbg.cu = !{!2} |
| 33 | !llvm.module.flags = !{!7, !8} |
| 34 | |
Adrian Prantl | 0578221 | 2017-08-30 18:06:51 +0000 | [diff] [blame] | 35 | !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) |
Simon Atanasyan | cb83307 | 2017-08-16 19:01:22 +0000 | [diff] [blame] | 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") |
| 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} |