57 lines · plain
1# test for little endian2#3# This test has been observed to fail on 32-bit architectures (see e.g.4# https://github.com/llvm/llvm-project/issues/62184). Since we're aiming to5# bring up JITLink support for ppc64{le} anyway (see6# https://github.com/llvm/llvm-project/issues/62253) I've opted to just disable7# it on 32-bit architectures for now.8# REQUIRES: llvm-64-bits9#10# RUN: rm -rf %t && mkdir -p %t11# RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o %t/ppc64_reloc.o %s12# RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o %t/ppc64_elf_module_b.o %S/Inputs/ppc64_elf_module_b.s13# RUN: llvm-rtdyld -triple=powerpc64le-unknown-linux-gnu -verify -check=%s %t/ppc64_reloc.o %t/ppc64_elf_module_b.o14# test for big endian15# RUN: rm -rf %t && mkdir -p %t16# RUN: llvm-mc -triple=powerpc64-unknown-linux-gnu -filetype=obj -o %t/ppc64_reloc.o %s17# RUN: llvm-mc -triple=powerpc64-unknown-linux-gnu -filetype=obj -o %t/ppc64_elf_module_b.o %S/Inputs/ppc64_elf_module_b.s18# RUN: llvm-rtdyld -triple=powerpc64-unknown-linux-gnu -verify -check=%s %t/ppc64_reloc.o %t/ppc64_elf_module_b.o19 20 .text21 .abiversion 222 .file "test.c"23 .globl func24 .p2align 425 .type func,@function26func: # @func27.Lfunc_begin0:28.Lfunc_gep0:29 addis 2, 12, .TOC.-.Lfunc_gep0@ha30 addi 2, 2, .TOC.-.Lfunc_gep0@l31.Lfunc_lep0:32 .localentry func, .Lfunc_lep0-.Lfunc_gep033 mflr 034 std 31, -8(1)35 std 0, 16(1)36 stdu 1, -112(1)37 mr 31, 138# confirm that LK flag is set for bl39# rtdyld-check: (*{4}call_bl) & 1 = 140call_bl:41 bl foo42 nop43 44 li 3, 045 addi 1, 1, 11246 ld 0, 16(1)47 ld 31, -8(1)48 mtlr 049# confirm that LK flag is not set for b50# rtdyld-check: (*{4}call_b) & 1 = 051call_b:52 b foo53 .long 054 .quad 055.Lfunc_end0:56 .size func, .Lfunc_end0-.Lfunc_begin057