brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1020 B · d6c8e49 Raw
45 lines · plain
1// RUN: llvm-mc -triple riscv64 -filetype obj -o %t.o %s2// RUN: ld.lld --emit-relocs -o %t %t.o3// RUN: llvm-bolt --print-cfg --print-only=tls_le,tls_ie -o %t.null %t \4// RUN:    | FileCheck %s5 6// CHECK-LABEL: Binary Function "tls_le{{.*}}" after building cfg {7// CHECK:      lui a5, 0x08// CHECK-NEXT: add a5, a5, tp9// CHECK-NEXT: lw t0, 0x0(a5)10// CHECK-NEXT: sw t0, 0x0(a5)11 12// CHECK-LABEL: Binary Function "tls_ie" after building cfg {13// CHECK-LABEL: .LBB0114// CHECK:      auipc a0, %pcrel_hi(__BOLT_got_zero+{{[0-9]+}})15// CHECK-NEXT: ld a0, %pcrel_lo(.Ltmp0)(a0)16    .text17    .globl tls_le, _start18    .p2align 219tls_le:20_start:21    nop22    lui a5, %tprel_hi(i)23    add a5, a5, tp, %tprel_add(i)24    lw t0, %tprel_lo(i)(a5)25    sw t0, %tprel_lo(i)(a5)26    ret27    .size _start, .-_start28 29    .globl tls_ie30    .p2align 231tls_ie:32    nop33    la.tls.ie a0, i34    ret35    .size tls_ie, .-tls_ie36 37    .section .tbss,"awT",@nobits38    .type i,@object39    .globl i40    .p2align 341i:42    .quad 043    .size i, .-i44 45