Files
TheRock/compiler/amd-llvm/lld/test/ELF/loongarch-abs64.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

65 lines
2.2 KiB
ArmAsm

# REQUIRES: loongarch
# RUN: llvm-mc --filetype=obj --triple=loongarch64-unknown-elf %s -o %t.la64.o
# RUN: ld.lld %t.la64.o --defsym foo=0 --defsym bar=42 -o %t.la64.1
# RUN: llvm-objdump --no-show-raw-insn -d %t.la64.1 | FileCheck --check-prefix=CASE1 %s
# CASE1: lu12i.w $a0, 0
# CASE1-NEXT: ori $a0, $a0, 0
# CASE1-NEXT: lu32i.d $a0, 0
# CASE1-NEXT: lu52i.d $a0, $a0, 0
# CASE1-NEXT: lu12i.w $a1, 0
# CASE1-NEXT: ori $a1, $a1, 42
# CASE1-NEXT: lu32i.d $a1, 0
# CASE1-NEXT: lu52i.d $a1, $a1, 0
# RUN: ld.lld %t.la64.o --defsym foo=0x12345678 --defsym bar=0x87654321 -o %t.la64.2
# RUN: llvm-objdump --no-show-raw-insn -d %t.la64.2 | FileCheck --check-prefix=CASE2 %s
# CASE2: lu12i.w $a0, 74565
# CASE2-NEXT: ori $a0, $a0, 1656
# CASE2-NEXT: lu32i.d $a0, 0
# CASE2-NEXT: lu52i.d $a0, $a0, 0
# CASE2-NEXT: lu12i.w $a1, -493996
# CASE2-NEXT: ori $a1, $a1, 801
# CASE2-NEXT: lu32i.d $a1, 0
# CASE2-NEXT: lu52i.d $a1, $a1, 0
# RUN: ld.lld %t.la64.o --defsym foo=0x12345fedcb678 --defsym bar=0xfedcb12345000 -o %t.la64.3
# RUN: llvm-objdump --no-show-raw-insn -d %t.la64.3 | FileCheck --check-prefix=CASE3 %s
# CASE3: lu12i.w $a0, -4661
# CASE3-NEXT: ori $a0, $a0, 1656
# CASE3-NEXT: lu32i.d $a0, 74565
# CASE3-NEXT: lu52i.d $a0, $a0, 0
# CASE3-NEXT: lu12i.w $a1, 74565
# CASE3-NEXT: ori $a1, $a1, 0
# CASE3-NEXT: lu32i.d $a1, -4661
# CASE3-NEXT: lu52i.d $a1, $a1, 0
# RUN: ld.lld %t.la64.o --defsym foo=0xfffffeeeeeddd --defsym bar=0xfff00000f1111222 -o %t.la64.4
# RUN: llvm-objdump --no-show-raw-insn -d %t.la64.4 | FileCheck --check-prefix=CASE4 %s
# CASE4: lu12i.w $a0, -69906
# CASE4-NEXT: ori $a0, $a0, 3549
# CASE4-NEXT: lu32i.d $a0, -1
# CASE4-NEXT: lu52i.d $a0, $a0, 0
# CASE4-NEXT: lu12i.w $a1, -61167
# CASE4-NEXT: ori $a1, $a1, 546
# CASE4-NEXT: lu32i.d $a1, 0
# CASE4-NEXT: lu52i.d $a1, $a1, -1
.global _start
_start:
1:
lu12i.w $a0, %abs_hi20(foo)
.reloc 1b, R_LARCH_MARK_LA, foo
ori $a0, $a0, %abs_lo12(foo)
lu32i.d $a0, %abs64_lo20(foo)
lu52i.d $a0, $a0, %abs64_hi12(foo)
2:
lu12i.w $a1, %abs_hi20(bar)
.reloc 1b, R_LARCH_MARK_LA, bar
ori $a1, $a1, %abs_lo12(bar)
lu32i.d $a1, %abs64_lo20(bar)
lu52i.d $a1, $a1, %abs64_hi12(bar)