2 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
3 # RUN: ld.lld %t.o -o %t
4 # RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL
5 # RUN: llvm-objdump -d --no-show-raw-insn --mcpu=pwr10 %t | FileCheck %s
7 # RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
8 # RUN: ld.lld %t.o -o %t
9 # RUN: llvm-readelf -s %t | FileCheck %s --check-prefix=SYMBOL
10 # RUN: llvm-objdump -d --no-show-raw-insn --mcpu=pwr10 %t | FileCheck %s
12 ## This test checks the LLD implementation of the Local Exec TLS model
13 ## when using prefixed instructions like paddi.
15 # SYMBOL: Symbol table '.symtab' contains 6 entries:
16 # SYMBOL: 0000000000000000 0 TLS LOCAL DEFAULT 2 x
17 # SYMBOL-NEXT: 0000000000000004 0 TLS LOCAL DEFAULT 2 y
18 # SYMBOL-NEXT: 0000000000000008 0 TLS LOCAL DEFAULT 2 z
20 # CHECK-LABEL: <LocalExecAddr>:
21 # CHECK: paddi 3, 13, -28672, 0
22 # CHECK-NEXT: paddi 3, 13, -28668, 0
23 # CHECK-NEXT: paddi 3, 13, -28652, 0
26 # CHECK-LABEL: <LocalExecVal>:
27 # CHECK: paddi 3, 13, -28672, 0
28 # CHECK-NEXT: lwz 3, 0(3)
29 # CHECK-NEXT: paddi 3, 13, -28668, 0
30 # CHECK-NEXT: lwz 3, 0(3)
31 # CHECK-NEXT: paddi 3, 13, -28652, 0
32 # CHECK-NEXT: lwz 3, 0(3)
36 paddi
3, 13, x@TPREL
, 0
37 paddi
3, 13, y@TPREL
, 0
38 paddi
3, 13, z@TPREL+
12, 0
42 paddi
3, 13, x@TPREL
, 0
44 paddi
3, 13, y@TPREL
, 0
46 paddi
3, 13, z@TPREL+
12, 0
50 .section .tbss, "awT", @nobits