brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 84a105c Raw
92 lines · plain
1# REQUIRES: ppc2# RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o3 4# RUN: ld.lld -shared %t.o -o %t.so5# RUN: llvm-readobj -d -r %t.so | FileCheck --check-prefix=IE-REL %s6# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=IE %s7 8# RUN: ld.lld %t.o -o %t9# RUN: llvm-readelf -r %t | FileCheck --check-prefix=NOREL %s10# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=LE %s11 12# IE-REL:      FLAGS STATIC_TLS13## A non-preemptable symbol (b) has 0 st_shndx.14# IE-REL:      .rela.dyn {15# IE-REL-NEXT:   0x20258 R_PPC_TPREL32 - 0xC16# IE-REL-NEXT:   0x20254 R_PPC_TPREL32 a 0x017# IE-REL-NEXT: }18 19## &.got[3] - _GLOBAL_OFFSET_TABLE_ = 1220# IE:      lwz 10, 12(9)21# IE-NEXT: add 10, 10, 222## &.got[4] - _GLOBAL_OFFSET_TABLE_ = 1623# IE-NEXT: lwz 8, 16(7)24# IE-NEXT: lbzx 10, 8, 225 26# NOREL: no relocations27 28## a@tprel = st_value(a)-0x7000 = -2866429## b@tprel = st_value(b)-0x7000 = -2866030# LE:      addis 10, 2, 031# LE-NEXT: addi 10, 10, -2866432# LE-NEXT: addis 8, 2, 033# LE-NEXT: lbz 10, -28660(8)34 35lwz 10, a@got@tprel(9)36add 10, 10, a@tls37 38lwz 8, c@got@tprel(7)39lbzx 10, 8, c@tls40 41## In IE, these instructions (op rT, rA, x@tls) are not changed.42# IE-NEXT: lhzx 12, 2, 243# IE-NEXT: lwzx 13, 3, 244# IE-NEXT: stbx 14, 4, 245# IE-NEXT: sthx 15, 5, 246# IE-NEXT: stwx 16, 6, 247# IE-NEXT: lhax 17, 7, 248# IE-NEXT: lwax 18, 8, 249# IE-NEXT: lfsx 19, 9, 250# IE-NEXT: lfdx 20, 10, 251# IE-NEXT: stfsx 21, 11, 252# IE-NEXT: stfdx 22, 12, 253 54## In LE, these X-Form instructions are changed to their corresponding D-Form.55# LE-NEXT: lhz 12, -28660(2)56# LE-NEXT: lwz 13, -28660(3)57# LE-NEXT: stb 14, -28660(4)58# LE-NEXT: sth 15, -28660(5)59# LE-NEXT: stw 16, -28660(6)60# LE-NEXT: lha 17, -28660(7)61# LE-NEXT: lwa 18, -28660(8)62# LE-NEXT: lfs 19, -28660(9)63# LE-NEXT: lfd 20, -28660(10)64# LE-NEXT: stfs 21, -28660(11)65# LE-NEXT: stfd 22, -28660(12)66 67lhzx 12, 2, s@tls68lwzx 13, 3, i@tls69stbx 14, 4, c@tls70sthx 15, 5, s@tls71stwx 16, 6, i@tls72lhax 17, 7, s@tls73lwax 18, 8, i@tls74lfsx 19, 9, f@tls75lfdx 20, 10, d@tls76stfsx 21, 11, f@tls77stfdx 22, 12, d@tls78ldx 23, 13, l@tls79stdx 24, 14, l@tls80 81.section .tbss82.globl a83.zero 884a:85.zero 486c:87s:88i:89f:90d:91l:92