Bump version to 19.1.0-rc3
[llvm-project.git] / llvm / test / ExecutionEngine / RuntimeDyld / PowerPC / ppc64_reloc.s
blob999b8041335e8dc596c7e60fd22234ce22354844
1 # test for little endian
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 to
5 # bring up JITLink support for ppc64{le} anyway (see
6 # https://github.com/llvm/llvm-project/issues/62253) I've opted to just disable
7 # it on 32-bit architectures for now.
8 # REQUIRES: llvm-64-bits
10 # RUN: rm -rf %t && mkdir -p %t
11 # RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o %t/ppc64_reloc.o %s
12 # RUN: llvm-mc -triple=powerpc64le-unknown-linux-gnu -filetype=obj -o %t/ppc64_elf_module_b.o %S/Inputs/ppc64_elf_module_b.s
13 # RUN: llvm-rtdyld -triple=powerpc64le-unknown-linux-gnu -verify -check=%s %t/ppc64_reloc.o %t/ppc64_elf_module_b.o
14 # test for big endian
15 # RUN: rm -rf %t && mkdir -p %t
16 # RUN: llvm-mc -triple=powerpc64-unknown-linux-gnu -filetype=obj -o %t/ppc64_reloc.o %s
17 # RUN: llvm-mc -triple=powerpc64-unknown-linux-gnu -filetype=obj -o %t/ppc64_elf_module_b.o %S/Inputs/ppc64_elf_module_b.s
18 # RUN: llvm-rtdyld -triple=powerpc64-unknown-linux-gnu -verify -check=%s %t/ppc64_reloc.o %t/ppc64_elf_module_b.o
20 .text
21 .abiversion 2
22 .file "test.c"
23 .globl func
24 .p2align 4
25 .type func,@function
26 func: # @func
27 .Lfunc_begin0:
28 .Lfunc_gep0:
29 addis 2, 12, .TOC.-.Lfunc_gep0@ha
30 addi 2, 2, .TOC.-.Lfunc_gep0@l
31 .Lfunc_lep0:
32 .localentry func, .Lfunc_lep0-.Lfunc_gep0
33 mflr 0
34 std 31, -8(1)
35 std 0, 16(1)
36 stdu 1, -112(1)
37 mr 31, 1
38 # confirm that LK flag is set for bl
39 # rtdyld-check: (*{4}call_bl) & 1 = 1
40 call_bl:
41 bl foo
42 nop
44 li 3, 0
45 addi 1, 1, 112
46 ld 0, 16(1)
47 ld 31, -8(1)
48 mtlr 0
49 # confirm that LK flag is not set for b
50 # rtdyld-check: (*{4}call_b) & 1 = 0
51 call_b:
52 b foo
53 .long 0
54 .quad 0
55 .Lfunc_end0:
56 .size func, .Lfunc_end0-.Lfunc_begin0