1# RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s 2>&1 | \ 2# RUN: FileCheck %s -check-prefix=MC 3# RUN: llvm-mc -triple=powerpc64le-unknown-unknown -filetype=obj %s | \ 4# RUN: llvm-readobj -r - | FileCheck %s -check-prefix=READOBJ 5 6# This test checks that on Power PC we can correctly convert x@got@tprel@pcrel 7# and x@tls@pcrel into R_PPC64_GOT_TPREL_PCREL34, and R_PPC64_TLS for initial 8# exec relocations with the value loaded. 9# Note that with R_PPC64_TLS relocations, to distinguish PC relative 10# TLS the relocation has a field value displaced by one byte from the 11# beginning of the instruction. 12 13# MC-NOT: error: invalid variant 14 15# READOBJ: 0x0 R_PPC64_GOT_TPREL_PCREL34 x 0x0 16# READOBJ-NEXT: 0x9 R_PPC64_TLS x 0x0 17 18InitialExecLoad: 19 pld 3, x@got@tprel@pcrel(0), 1 20 lwzx 3, 3, x@tls@pcrel 21 blr 22