3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
4 # RUN: ld.lld -shared --no-toc-optimize %t.o -o %t
5 # RUN: llvm-objdump -d %t | FileCheck %s
7 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
8 # RUN: ld.lld -shared --no-toc-optimize %t.o -o %t
9 # RUN: llvm-objdump -d %t | FileCheck %s
11 # RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
12 # RUN: ld.lld -shared %t.o -o %t
13 # RUN: llvm-objdump -d %t | FileCheck --check-prefix=OPT %s
15 # RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
16 # RUN: ld.lld -shared %t.o -o %t
17 # RUN: llvm-objdump -d %t | FileCheck --check-prefix=OPT %s
27 addis 2, 12, .TOC.-.Lfunc_gep@ha
28 addi 2, 2, .TOC.-.Lfunc_gep@l
30 .localentry func, .-func
41 # CHECK: addis 3, 2, 0
42 # CHECK-NEXT: ld 3, -32760(3)
43 # CHECK-NEXT: ld 4, -32760(2)
44 # CHECK-NEXT: lis 5, -1
45 # CHECK-NEXT: ori 5, 5, 32776
47 # CHECK-NEXT: ori 6, 6, 32776
51 # OPT-NEXT: ld 3, -32760(2)
52 # OPT-NEXT: ld 4, -32760(2)
54 # OPT-NEXT: ori 5, 5, 32776
56 # OPT-NEXT: ori 6, 6, 32776
58 # Since the got entry for a is .got[1] and the TOC base points to
59 # .got + 0x8000, the offset for a@got is -0x7FF8 --> -32760