brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 722f3b6 Raw
65 lines · plain
1# REQUIRES: ppc2# RUN: echo 'SECTIONS { \3# RUN:       .text_low 0x2000: { *(.text_low) } \4# RUN:       .text_high 0xa000 : { *(.text_high) } \5# RUN:       }' > %t.lds6 7# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o8# RUN: ld.lld -T %t.lds %t.o -o %t9# RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s10# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s11 12# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o13# RUN: ld.lld -pie -T %t.lds %t.o -o %t14# RUN: llvm-readelf -r %t | FileCheck --check-prefix=SEC %s15# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s16 17# SEC: There are no relocations in this file.18 19# CHECK-LABEL: <_start>:20# CHECK-NEXT:  2000: bt 2, 0x202021# CHECK-NEXT:        bt+ 2, 0x202022# CHECK-NEXT:        bf 2, 0xa00423# CHECK-NEXT:        bt 2, 0x204024# CHECK-NEXT:        blr25# CHECK-NEXT:        trap26# CHECK-NEXT:        trap27# CHECK-NEXT:        trap28# CHECK-EMPTY:29# CHECK-NEXT: <__long_branch_high>:30# CHECK-NEXT:  2020: addis 12, 2, 031# CHECK-NEXT:        ld 12, {{.*}}(12)32# CHECK-NEXT:        mtctr 1233# CHECK-NEXT:        bctr34# CHECK-NEXT:        ...35# CHECK-EMPTY:36 37# CHECK-NEXT: <__long_branch_>:38# CHECK-NEXT:  2040: addis 12, 2, 039# CHECK-NEXT:        ld 12, {{.*}}(12)40# CHECK-NEXT:        mtctr 1241# CHECK-NEXT:        bctr42 43.section .text_low, "ax", @progbits44.globl _start45_start:46beq high           # Need a thunk47beq+ high          # Need a thunk48bne high49beq .text_high+16  # Need a thunk50blr51 52# CHECK-LABEL: <.text_high>:53# CHECK-NEXT:      a000: nop54# CHECK-EMPTY:55# CHECK-LABEL: <high>:56# CHECK-NEXT:      a004: bf 0, 0x200857# CHECK-NEXT:            bt 1, 0x200858 59.section .text_high, "ax", @progbits60nop61.globl high62high:63bge .text_low+8    # Need a thunk64bgt .text_low+8    # Need a thunk65