Files
TheRock/compiler/amd-llvm/lld/test/ELF/arm-adr-err-long.s
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

58 lines
2.0 KiB
ArmAsm

// REQUIRES: arm
// RUN: split-file %s %t
// RUN: llvm-mc --triple=armv7a-none-eabi --arm-add-build-attributes -filetype=obj -o %t.o %t/asm
// RUN: not ld.lld --script %t/lds %t.o -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:
//--- lds
SECTIONS {
.text.0 0x0100000 : AT(0x0100000) { *(.text.0) }
.text.1 0x0800000 : AT(0x0800000) { *(.text.1) }
.text.2 0xf0f0000 : AT(0xf0f0000) { *(.text.2) }
}
//--- asm
/// This is a variant of arm-adr-long.s with some _NC relocs changed into their
/// checking counterparts, to verify that out-of-range references are caught.
.section .text.0, "ax", %progbits
dat1:
.word 0
.section .text.1, "ax", %progbits
.global _start
.type _start, %function
_start:
.inst 0xe24f0008 // sub r0, pc, #8
.inst 0xe2400004 // sub r0, r0, #4
.reloc 0, R_ARM_ALU_PC_G0, dat1
// CHECK: error: {{.*}}.o:(.text.1+0x0): unencodeable immediate 7340040 for relocation R_ARM_ALU_PC_G0
.reloc 4, R_ARM_ALU_PC_G1, dat1
.inst 0xe24f1008 // sub r1, pc, #8
.inst 0xe2411004 // sub r1, r1, #4
.inst 0xe2411000 // sub r1, r1, #0
.reloc 8, R_ARM_ALU_PC_G0_NC, dat2
.reloc 12, R_ARM_ALU_PC_G1, dat2
// CHECK: error: {{.*}}.o:(.text.1+0xc): unencodeable immediate 244252656 for relocation R_ARM_ALU_PC_G1
.reloc 16, R_ARM_ALU_PC_G2, dat2
.inst 0xe24f0008 // sub r0, pc, #8
.inst 0xe2400004 // sub r0, r0, #4
.inst 0xe2400000 // sub r0, r0, #0
.reloc 20, R_ARM_ALU_PC_G0, dat1
// CHECK: error: {{.*}}.o:(.text.1+0x14): unencodeable immediate 7340060 for relocation R_ARM_ALU_PC_G0
.reloc 24, R_ARM_ALU_PC_G1, dat1
.reloc 28, R_ARM_ALU_PC_G2, dat1
.inst 0xe24f0008 // sub r0, pc, #8
.inst 0xe2400004 // sub r0, r0, #4
.inst 0xe1c000d0 // ldrd r0, r1, [r0, #0]
.reloc 32, R_ARM_ALU_PC_G0_NC, dat2
.reloc 36, R_ARM_ALU_PC_G1_NC, dat2
// CHECK: error: {{.*}}.o:(.text.1+0x28): relocation R_ARM_LDRS_PC_G2 out of range: 4056 is not in [0, 255]; references 'dat2'
.reloc 40, R_ARM_LDRS_PC_G2, dat2
.section .text.2, "ax", %progbits
dat2:
.word 0