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
61 lines
2.0 KiB
ArmAsm
61 lines
2.0 KiB
ArmAsm
# REQUIRES: loongarch
|
|
# RUN: rm -rf %t && split-file %s %t
|
|
|
|
# RUN: llvm-mc --filetype=obj --triple=loongarch32-unknown-elf %t/a.s -o %t/a.la32.o
|
|
# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %t/a.s -o %t/a.la64.o
|
|
|
|
# RUN: ld.lld %t/a.la32.o -shared -T %t/a.t -o %t/a.la32.so
|
|
# RUN: ld.lld %t/a.la64.o -shared -T %t/a.t -o %t/a.la64.so
|
|
|
|
# RUN: llvm-objdump -d --no-show-raw-insn %t/a.la32.so | FileCheck --check-prefixes=DIS,DIS32 %s
|
|
# RUN: llvm-objdump -d --no-show-raw-insn %t/a.la64.so | FileCheck --check-prefixes=DIS,DIS64 %s
|
|
|
|
## PLT should be present in this case.
|
|
# DIS: Disassembly of section .plt:
|
|
# DIS: <.plt>:
|
|
# DIS: 234020: pcaddu12i $t3, 510
|
|
# DIS32-NEXT: ld.w $t3, $t3, 84
|
|
# DIS64-NEXT: ld.d $t3, $t3, 184
|
|
# DIS-NEXT: jirl $t1, $t3, 0
|
|
# DIS-NEXT: nop
|
|
|
|
# DIS: Disassembly of section .text:
|
|
# DIS: <foo>:
|
|
# DIS-NEXT: nop
|
|
# DIS-NEXT: nop
|
|
# DIS-NEXT: nop
|
|
# DIS-NEXT: pcalau12i $t0, -510
|
|
# DIS-NEXT: jirl $zero, $t0, 32
|
|
|
|
# RUN: llvm-mc --filetype=obj --triple=loongarch32-unknown-elf %t/error.s -o %t/error.la32.o
|
|
# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %t/error.s -o %t/error.la64.o
|
|
# RUN: not ld.lld %t/error.la32.o -shared -o %t/error.la32.so 2>&1 | FileCheck --check-prefix=ERR %s
|
|
# RUN: not ld.lld %t/error.la64.o -shared -o %t/error.la64.so 2>&1 | FileCheck --check-prefix=ERR %s
|
|
# ERR: error: relocation R_LARCH_PCALA_LO12 cannot be used against symbol 'bar'; recompile with -fPIC
|
|
|
|
#--- a.t
|
|
SECTIONS {
|
|
.plt 0x234000: { *(.plt) }
|
|
.text 0x432000: { *(.text) }
|
|
}
|
|
|
|
#--- a.s
|
|
.p2align 12
|
|
.global foo
|
|
foo:
|
|
## The nops are for pushing the relocs off page boundary, to better see the
|
|
## page-aligned semantics in action.
|
|
nop
|
|
nop
|
|
nop
|
|
## The offsets should be -510 (0x234 - 0x432) and 32 (PLT header size + 0)
|
|
## respectively.
|
|
pcalau12i $t0, %pc_hi20(bar)
|
|
jirl $zero, $t0, %pc_lo12(bar)
|
|
|
|
#--- error.s
|
|
.global foo
|
|
foo:
|
|
pcalau12i $t0, %pc_hi20(bar)
|
|
ld.w $t0, $t0, %pc_lo12(bar)
|