[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / ppc64-long-branch-rel14.s
blob722f3b6513bd989055407f3a6908c03b973b3818
1 # REQUIRES: ppc
2 # RUN: echo 'SECTIONS { \
3 # RUN: .text_low 0x2000: { *(.text_low) } \
4 # RUN: .text_high 0xa000 : { *(.text_high) } \
5 # RUN: }' > %t.lds
7 # RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
8 # RUN: ld.lld -T %t.lds %t.o -o %t
9 # RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s
10 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
12 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
13 # RUN: ld.lld -pie -T %t.lds %t.o -o %t
14 # RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s
15 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
17 # SEC: There are no relocations in this file.
19 # CHECK-LABEL: <_start>:
20 # CHECK-NEXT: 2000: bt 2, 0x2020
21 # CHECK-NEXT: bt+ 2, 0x2020
22 # CHECK-NEXT: bf 2, 0xa004
23 # CHECK-NEXT: bt 2, 0x2040
24 # CHECK-NEXT: blr
25 # CHECK-NEXT: trap
26 # CHECK-NEXT: trap
27 # CHECK-NEXT: trap
28 # CHECK-EMPTY:
29 # CHECK-NEXT: <__long_branch_high>:
30 # CHECK-NEXT: 2020: addis 12, 2, 0
31 # CHECK-NEXT: ld 12, {{.*}}(12)
32 # CHECK-NEXT: mtctr 12
33 # CHECK-NEXT: bctr
34 # CHECK-NEXT: ...
35 # CHECK-EMPTY:
37 # CHECK-NEXT: <__long_branch_>:
38 # CHECK-NEXT: 2040: addis 12, 2, 0
39 # CHECK-NEXT: ld 12, {{.*}}(12)
40 # CHECK-NEXT: mtctr 12
41 # CHECK-NEXT: bctr
43 .section .text_low, "ax", @progbits
44 .globl _start
45 _start:
46 beq high # Need a thunk
47 beq+ high # Need a thunk
48 bne high
49 beq .text_high+16 # Need a thunk
50 blr
52 # CHECK-LABEL: <.text_high>:
53 # CHECK-NEXT: a000: nop
54 # CHECK-EMPTY:
55 # CHECK-LABEL: <high>:
56 # CHECK-NEXT: a004: bf 0, 0x2008
57 # CHECK-NEXT: bt 1, 0x2008
59 .section .text_high, "ax", @progbits
60 nop
61 .globl high
62 high:
63 bge .text_low+8 # Need a thunk
64 bgt .text_low+8 # Need a thunk