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
63 lines
2.1 KiB
ArmAsm
63 lines
2.1 KiB
ArmAsm
# REQUIRES: hexagon
|
|
# RUN: rm -rf %t && split-file %s %t && cd %t
|
|
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf external.s -o external.o
|
|
# RUN: ld.lld -shared external.o -soname external.so -o external.so
|
|
|
|
## PLT calls within range (2 MiB padding) — no thunks needed.
|
|
# RUN: llvm-mc -filetype=obj -triple=hexagon-unknown-elf main.s -o main.o
|
|
# RUN: ld.lld main.o external.so -o test
|
|
# RUN: llvm-objdump -d --no-show-raw-insn test | \
|
|
# RUN: FileCheck --check-prefix=INRANGE %s
|
|
|
|
## PLT calls out of range (>8 MiB padding) — thunks required.
|
|
# RUN: llvm-mc -filetype=obj \
|
|
# RUN: -triple=hexagon-unknown-elf main-large.s -o main-large.o
|
|
# RUN: ld.lld main-large.o external.so -o test-large
|
|
# RUN: llvm-objdump -d --no-show-raw-insn test-large | \
|
|
# RUN: FileCheck --check-prefix=OUTRANGE %s
|
|
|
|
## Test thunk range scenarios for Hexagon R_HEX_PLT_B22_PCREL relocations.
|
|
## PLT calls use the same +/- 8 MiB range as regular B22_PCREL calls.
|
|
## When the PLT entry is beyond this range, a thunk must be created.
|
|
|
|
#--- external.s
|
|
.globl extern_func
|
|
.type extern_func, @function
|
|
extern_func:
|
|
jumpr r31
|
|
|
|
#--- main.s
|
|
## Within-range case: 2 MiB padding keeps PLT entries reachable.
|
|
.globl _start
|
|
.type _start, @function
|
|
_start:
|
|
call extern_func@PLT
|
|
jumpr r31
|
|
|
|
.skip 0x200000
|
|
|
|
#--- main-large.s
|
|
## Out-of-range case: >8 MiB padding pushes PLT entries beyond B22_PCREL range.
|
|
.globl _start
|
|
.type _start, @function
|
|
_start:
|
|
call extern_func@PLT
|
|
jumpr r31
|
|
|
|
.skip 0x900000
|
|
|
|
## Within-range: _start calls the PLT entry directly (no thunk).
|
|
# INRANGE: <_start>:
|
|
# INRANGE-NEXT: 201ac: { call 0x2201e0 <extern_func@plt> }
|
|
# INRANGE-NEXT: { jumpr r31 }
|
|
|
|
## Out-of-range: thunk uses immext+jump to reach the PLT entry.
|
|
# OUTRANGE: <__hexagon_thunk_extern_func_from_.text.thunk>:
|
|
# OUTRANGE-NEXT: 201ac: { immext(#0x900000)
|
|
# OUTRANGE-NEXT: jump 0x9201e0 <extern_func@plt> }
|
|
|
|
## _start calls the thunk instead of the PLT entry directly.
|
|
# OUTRANGE: <_start>:
|
|
# OUTRANGE-NEXT: 201b4: { call 0x201ac <__hexagon_thunk_extern_func_from_.text.thunk> }
|
|
# OUTRANGE-NEXT: { jumpr r31 }
|