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
70 lines
2.3 KiB
ArmAsm
70 lines
2.3 KiB
ArmAsm
# REQUIRES: riscv
|
|
## Test that we can handle --emit-relocs while relaxing.
|
|
|
|
# RUN: rm -rf %t && mkdir %t && cd %t
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+relax %s -o 32.o -riscv-align-rvc=0
|
|
# RUN: ld.lld -Ttext=0x10000 --emit-relocs 32.o -o 32
|
|
# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases 32 | FileCheck %s
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+relax %s -o 64.o -riscv-align-rvc=0
|
|
# RUN: ld.lld -Ttext=0x10000 --emit-relocs 64.o -o 64
|
|
# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases 64 | FileCheck %s
|
|
|
|
## -r should keep original relocations.
|
|
# RUN: ld.lld -r 64.o -o 64.r
|
|
# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases 64.r | FileCheck %s --check-prefix=CHECKR
|
|
|
|
## --no-relax should keep original relocations.
|
|
# RUN: ld.lld --emit-relocs --no-relax 64.o -o 64.norelax
|
|
# RUN: llvm-objdump -dr --no-show-raw-insn -M no-aliases 64.norelax | FileCheck %s --check-prefix=CHECKNORELAX
|
|
|
|
# CHECK: <_start>:
|
|
# CHECK-NEXT: jal ra, 0x10008 <f>
|
|
# CHECK-NEXT: R_RISCV_JAL f
|
|
# CHECK-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECK-NEXT: jal ra, 0x10008 <f>
|
|
# CHECK-NEXT: R_RISCV_JAL f
|
|
# CHECK-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECK-EMPTY:
|
|
# CHECK-NEXT: <f>:
|
|
# CHECK-NEXT: jalr zero, 0x0(ra)
|
|
# CHECK-NEXT: R_RISCV_ALIGN *ABS*+0x4
|
|
|
|
# CHECKR: <_start>:
|
|
# CHECKR-NEXT: auipc ra, 0x0
|
|
# CHECKR-NEXT: R_RISCV_CALL_PLT f
|
|
# CHECKR-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECKR-NEXT: jalr ra, 0x0(ra)
|
|
# CHECKR-NEXT: auipc ra, 0x0
|
|
# CHECKR-NEXT: R_RISCV_CALL_PLT f
|
|
# CHECKR-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECKR-NEXT: jalr ra, 0x0(ra)
|
|
# CHECKR-NEXT: addi zero, zero, 0x0
|
|
# CHECKR-NEXT: R_RISCV_ALIGN *ABS*+0x4
|
|
# CHECKR-EMPTY:
|
|
# CHECKR-NEXT: <f>:
|
|
# CHECKR-NEXT: jalr zero, 0x0(ra)
|
|
|
|
# CHECKNORELAX: <_start>:
|
|
# CHECKNORELAX-NEXT: auipc ra, 0x0
|
|
# CHECKNORELAX-NEXT: R_RISCV_CALL_PLT f
|
|
# CHECKNORELAX-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECKNORELAX-NEXT: jalr ra, 0x10(ra)
|
|
# CHECKNORELAX-NEXT: auipc ra, 0x0
|
|
# CHECKNORELAX-NEXT: R_RISCV_CALL_PLT f
|
|
# CHECKNORELAX-NEXT: R_RISCV_RELAX *ABS*
|
|
# CHECKNORELAX-NEXT: jalr ra, 0x8(ra)
|
|
# CHECKNORELAX-EMPTY:
|
|
# CHECKNORELAX-NEXT: <f>:
|
|
# CHECKNORELAX-NEXT: jalr zero, 0x0(ra)
|
|
# CHECKNORELAX-NEXT: R_RISCV_ALIGN *ABS*+0x4
|
|
|
|
.global _start
|
|
_start:
|
|
call f
|
|
call f
|
|
.balign 8
|
|
f:
|
|
ret
|