1# RUN: llvm-mc -triple=powerpc-unknown-linux-gnu -filetype=obj -o %t %s 2# RUN: llvm-rtdyld -triple=powerpc-unknown-linux-gnu -verify -check=%s %t 3 .text 4 .file "ppc32_elf_rel_addr16.ll" 5 .globl lookup 6 .align 2 7 .type lookup,@function 8lookup: # @lookup 9.Lfunc_begin0: 10# %bb.0: 11 stw 31, -4(1) 12 stwu 1, -16(1) 13insn_hi: 14# Check the higher 16-bits of the symbol's absolute address 15# rtdyld-check: decode_operand(insn_hi, 1) = elements[31:16] 16 lis 4, elements@ha 17 slwi 3, 3, 2 18 mr 31, 1 19insn_lo: 20# Check the lower 16-bits of the symbol's absolute address 21# rtdyld-check: decode_operand(insn_lo, 2) = elements[15:0] 22 la 4, elements@l(4) 23 lwzx 3, 4, 3 24 addi 1, 1, 16 25 lwz 31, -4(1) 26 blr 27.Lfunc_end0: 28 .size lookup, .Lfunc_end0-.Lfunc_begin0 29 30 .type elements,@object # @elements 31 .data 32 .globl elements 33 .align 2 34elements: 35 .long 14 # 0xe 36 .long 4 # 0x4 37 .long 1 # 0x1 38 .long 3 # 0x3 39 .long 13 # 0xd 40 .long 0 # 0x0 41 .long 32 # 0x20 42 .long 334 # 0x14e 43 .size elements, 32 44 45 46 .ident "clang version 3.7.0 " 47 .section ".note.GNU-stack","",@progbits 48