CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
85 lines
2.5 KiB
ArmAsm
85 lines
2.5 KiB
ArmAsm
# REQUIRES: aarch64
|
|
|
|
## Test that the branch-to-branch optimization follows the links
|
|
## from f1 -> f2 -> f3 and updates all references to point to f3.
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=aarch64-pc-linux %s -o %t.o
|
|
# RUN: ld.lld %t.o -o %t --branch-to-branch --emit-relocs
|
|
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
|
|
# RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,B2B-RELOC %s
|
|
# RUN: ld.lld %t.o -o %t -O2 --emit-relocs
|
|
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,B2B %s
|
|
# RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,B2B-RELOC %s
|
|
|
|
## Test that branch-to-branch is disabled by default.
|
|
|
|
# RUN: ld.lld %t.o -o %t --emit-relocs
|
|
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
|
|
# RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,NOB2B-RELOC %s
|
|
# RUN: ld.lld %t.o -o %t -O2 --no-branch-to-branch --emit-relocs
|
|
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
|
|
# RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,NOB2B-RELOC %s
|
|
|
|
## Test that branch-to-branch is disabled for preemptible symbols.
|
|
|
|
# RUN: ld.lld %t.o -o %t --branch-to-branch -shared --emit-relocs
|
|
# RUN: llvm-objdump -d -s %t | FileCheck --check-prefixes=CHECK,NOB2B %s
|
|
# RUN: llvm-objdump -r %t | FileCheck --check-prefixes=RELOC,NOB2B-RELOC %s
|
|
|
|
.section .rodata.vtable,"a"
|
|
.globl vtable
|
|
vtable:
|
|
# B2B: Contents of section .rodata:
|
|
# RELOC: RELOCATION RECORDS FOR [.rodata]:
|
|
# RELOC-NEXT: OFFSET
|
|
# B2B-NEXT: [[VF:[0-9a-f]{8}]]
|
|
# B2B-RELOC-NEXT: R_AARCH64_PLT32 f3
|
|
# NOB2B-RELOC-NEXT: R_AARCH64_PLT32 f1
|
|
.4byte %pltpcrel(f1)
|
|
# B2B-SAME: [[VF]]
|
|
# B2B-RELOC-NEXT: R_AARCH64_PLT32 f3+0x4
|
|
# NOB2B-RELOC-NEXT: R_AARCH64_PLT32 f2+0x4
|
|
.4byte %pltpcrel(f2+4)
|
|
# B2B-SAME: [[VF]]
|
|
# RELOC-NEXT: R_AARCH64_PLT32 f3+0x8
|
|
.4byte %pltpcrel(f3+8)
|
|
|
|
.section .text._start,"ax"
|
|
.globl _start
|
|
# CHECK: <_start>:
|
|
# RELOC: RELOCATION RECORDS FOR [.text]:
|
|
# RELOC-NEXT: OFFSET
|
|
_start:
|
|
.cfi_startproc
|
|
# B2B: bl {{.*}} <f3>
|
|
# B2B-RELOC-NEXT: R_AARCH64_CALL26 f3
|
|
# NOB2B: bl {{.*}} <f1{{.*}}>
|
|
# NOB2B-RELOC-NEXT: R_AARCH64_CALL26 f1
|
|
bl f1
|
|
# B2B: b {{.*}} <f3>
|
|
# B2B-RELOC-NEXT: R_AARCH64_JUMP26 f3
|
|
# NOB2B: b {{.*}} <f2{{.*}}>
|
|
# NOB2B-RELOC-NEXT: R_AARCH64_JUMP26 f2
|
|
b f2
|
|
.cfi_endproc
|
|
|
|
.section .text.f1,"ax"
|
|
.globl f1
|
|
f1:
|
|
# B2B-RELOC-NEXT: R_AARCH64_JUMP26 f3
|
|
# NOB2B-RELOC-NEXT: R_AARCH64_JUMP26 f2
|
|
b f2
|
|
|
|
.section .text.f2,"ax"
|
|
.globl f2
|
|
# CHECK: <f2>:
|
|
f2:
|
|
# CHECK-NEXT: b {{.*}} <f3{{.*}}>
|
|
# RELOC-NEXT: R_AARCH64_JUMP26 f3
|
|
b f3
|
|
|
|
.section .text.f3,"ax"
|
|
.globl f3
|
|
f3:
|
|
ret
|