[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / ppc64-ld-got-dtprel.s
blobd799558445c472283ae819413ffa7859fcda3fc2
1 # REQUIRES: ppc
3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
4 # RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=RELOCS %s
5 # RUN: ld.lld -shared %t.o -o %t.so
6 # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s
7 ## Check LD->LE relaxation does not affect R_PPC64_GOT_DTPREL16*.
8 # RUN: ld.lld %t.o -o %t
9 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
11 # RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
12 # RUN: llvm-readobj -r %t.o | FileCheck --check-prefix=RELOCS %s
13 # RUN: ld.lld -shared %t.o -o %t.so
14 # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s
15 # RUN: ld.lld %t.o -o %t
16 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
18 # RELOCS: .rela.text {
19 # RELOCS-NEXT: R_PPC64_GOT_DTPREL16_HA i 0x0
20 # RELOCS-NEXT: R_PPC64_GOT_DTPREL16_LO_DS i 0x0
21 # RELOCS-NEXT: R_PPC64_GOT_DTPREL16_HI j 0x0
22 # RELOCS-NEXT: R_PPC64_GOT_DTPREL16_DS j 0x0
23 # RELOCS-NEXT: }
25 ## Start with .got[1] as .got[0] is .TOC.
26 ## ha(i@got@dtprel) = (&.got[1] - (.got+0x8000) >> 16) & 0xffff = 0
27 ## lo(i@got@dtprel) = &.got[1] - (.got+0x8000) & 0xffff = -32760
28 ## hi(j@got@dtprel) = (&.got[2] - .got >> 16) & 0xffff = -1
29 ## j@got@dtprel = &.got[2] - (.got+0x8000) = -32752
30 # CHECK: addis 3, 2, 0
31 # CHECK-NEXT: ld 3, -32760(3)
32 # CHECK-NEXT: addis 3, 2, -1
33 # CHECK-NEXT: addi 3, 2, -32752
35 addis 3, 2, i@got@dtprel@ha
36 ld 3, i@got@dtprel@l(3)
37 addis 3, 2, j@got@dtprel@h
38 addi 3, 2, j@got@dtprel
40 .section .tbss,"awT",@nobits
41 .p2align 2
43 .long 0
45 .long 0