Files
TheRock/compiler/amd-llvm/llvm/test/MC/LoongArch/Basic/Integer/misc.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

69 lines
2.1 KiB
ArmAsm

## Test valid misc instructions.
# RUN: llvm-mc %s --triple=loongarch32 --show-encoding \
# RUN: | FileCheck --check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
# RUN: llvm-mc %s --triple=loongarch64 --show-encoding --defsym=LA64=1 \
# RUN: | FileCheck --check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ,CHECK64-ASM,CHECK64-ASM-AND-OBJ %s
# RUN: llvm-mc %s --triple=loongarch32 --filetype=obj | llvm-objdump -d - \
# RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
# RUN: llvm-mc %s --triple=loongarch64 --filetype=obj --defsym=LA64=1 | llvm-objdump -d - \
# RUN: | FileCheck --check-prefixes=CHECK-ASM-AND-OBJ,CHECK64-OBJ,CHECK64-ASM-AND-OBJ %s
#############################################################
## Instructions for both loongarch32 and loongarch64
#############################################################
# CHECK-ASM-AND-OBJ: syscall 100
# CHECK-ASM: encoding: [0x64,0x00,0x2b,0x00]
syscall 100
# CHECK-ASM-AND-OBJ: break 199
# CHECK-ASM: encoding: [0xc7,0x00,0x2a,0x00]
break 199
# CHECK-ASM-AND-OBJ: rdtimel.w $s1, $a0
# CHECK-ASM: encoding: [0x98,0x60,0x00,0x00]
rdtimel.w $s1, $a0
# CHECK-ASM-AND-OBJ: rdtimeh.w $a7, $a1
# CHECK-ASM: encoding: [0xab,0x64,0x00,0x00]
rdtimeh.w $a7, $a1
# CHECK-ASM-AND-OBJ: cpucfg $sp, $a4
# CHECK-ASM: encoding: [0x03,0x6d,0x00,0x00]
cpucfg $sp, $a4
# CHECK-ASM-AND-OBJ: ud 0
# CHECK-ASM: encoding: [0x00,0x04,0x60,0x38]
ud 0
# CHECK-ASM-AND-OBJ: ud 31
# CHECK-ASM: encoding: [0xff,0x07,0x60,0x38]
ud 31
#############################################################
## Instructions only for loongarch64
#############################################################
.ifdef LA64
# CHECK64-OBJ: ud 0
# CHECK64-ASM: amswap.w $zero, $ra, $zero
# CHECK64-ASM: encoding: [0x00,0x04,0x60,0x38]
amswap.w $zero, $ra, $zero
# CHECK64-ASM-AND-OBJ: asrtle.d $t0, $t5
# CHECK64-ASM: encoding: [0x80,0x45,0x01,0x00]
asrtle.d $t0, $t5
# CHECK64-ASM-AND-OBJ: asrtgt.d $t8, $t8
# CHECK64-ASM: encoding: [0x80,0xd2,0x01,0x00]
asrtgt.d $t8, $t8
# CHECK64-ASM-AND-OBJ: rdtime.d $tp, $t3
# CHECK64-ASM: encoding: [0xe2,0x69,0x00,0x00]
rdtime.d $tp, $t3
.endif