1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
// RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -r - | FileCheck %s
// Check that the appropriate relocations were created.
// CHECK: Relocations [
// CHECK: Section {{.*}} .rel.text {
// CHECK: R_MIPS_TLS_LDM
// CHECK: R_MIPS_TLS_DTPREL_HI16
// CHECK: R_MIPS_TLS_DTPREL_LO16
// CHECK: }
// CHECK: ]
.text
.abicalls
.section .mdebug.abi32,"",@progbits
.file "/home/espindola/llvm/llvm/test/MC/Mips/elf-tls.ll"
.text
.globl f1
.align 2
.type f1,@function
.set nomips16
.ent f1
f1: # @f1
.frame $sp,24,$ra
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# %bb.0: # %entry
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -24
sw $ra, 20($sp) # 4-byte Folded Spill
addu $gp, $2, $25
lw $25, %call16(__tls_get_addr)($gp)
jalr $25
addiu $4, $gp, %tlsgd(t1)
lw $2, 0($2)
lw $ra, 20($sp) # 4-byte Folded Reload
jr $ra
addiu $sp, $sp, 24
.set at
.set macro
.set reorder
.end f1
$tmp0:
.size f1, ($tmp0)-f1
.globl f2
.align 2
.type f2,@function
.set nomips16
.ent f2
f2: # @f2
.frame $sp,24,$ra
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# %bb.0: # %entry
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -24
sw $ra, 20($sp) # 4-byte Folded Spill
addu $gp, $2, $25
lw $25, %call16(__tls_get_addr)($gp)
jalr $25
addiu $4, $gp, %tlsgd(t2)
lw $2, 0($2)
lw $ra, 20($sp) # 4-byte Folded Reload
jr $ra
addiu $sp, $sp, 24
.set at
.set macro
.set reorder
.end f2
$tmp1:
.size f2, ($tmp1)-f2
.globl f3
.align 2
.type f3,@function
.set nomips16
.ent f3
f3: # @f3
.frame $sp,24,$ra
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.set nomacro
.set noat
# %bb.0: # %entry
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -24
sw $ra, 20($sp) # 4-byte Folded Spill
addu $gp, $2, $25
lw $25, %call16(__tls_get_addr)($gp)
jalr $25
addiu $4, $gp, %tlsldm(f3.i)
lui $1, %dtprel_hi(f3.i)
addu $1, $1, $2
lw $2, %dtprel_lo(f3.i)($1)
addiu $2, $2, 1
sw $2, %dtprel_lo(f3.i)($1)
lw $ra, 20($sp) # 4-byte Folded Reload
jr $ra
addiu $sp, $sp, 24
.set at
.set macro
.set reorder
.end f3
$tmp2:
.size f3, ($tmp2)-f3
.type t1,@object # @t1
.section .tbss,"awT",@nobits
.globl t1
.align 2
t1:
.4byte 0 # 0x0
.size t1, 4
.type f3.i,@object # @f3.i
.section .tdata,"awT",@progbits
.align 2
f3.i:
.4byte 1 # 0x1
.size f3.i, 4
.text
|