Files
TheRock/compiler/amd-llvm/llvm/test/MC/Mips/mul-macro-variants.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

155 lines
11 KiB
ArmAsm

# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mcpu=mips64r2 | FileCheck %s
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mcpu=mips64r3 | FileCheck %s
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mcpu=mips64r5 | FileCheck %s
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mattr=use-tcc-in-div -mcpu=mips64 | FileCheck %s --check-prefix=CHECK-TRAP
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mattr=use-tcc-in-div -mcpu=mips64r2 | FileCheck %s --check-prefix=CHECK-TRAP
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mattr=use-tcc-in-div -mcpu=mips64r3 | FileCheck %s --check-prefix=CHECK-TRAP
# RUN: llvm-mc %s -triple mips-unknown-linux -show-encoding -mattr=use-tcc-in-div -mcpu=mips64r5 | FileCheck %s --check-prefix=CHECK-TRAP
.text
text_label:
mul $4, $5
# CHECK: mul $4, $4, $5 # encoding: [0x70,0x85,0x20,0x02]
# CHECK-TRAP: mul $4, $4, $5 # encoding: [0x70,0x85,0x20,0x02]
mul $4, $5, $6
# CHECK: mul $4, $5, $6 # encoding: [0x70,0xa6,0x20,0x02]
# CHECK-TRAP: mul $4, $5, $6 # encoding: [0x70,0xa6,0x20,0x02]
mul $4, $5, 0
# CHECK: addiu $1, $zero, 0 # encoding: [0x24,0x01,0x00,0x00]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: addiu $1, $zero, 0 # encoding: [0x24,0x01,0x00,0x00]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mul $4, $5, 1
# CHECK: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mul $4, $5, 0x8000
# CHECK: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: ori $1, $zero, 32768 # encoding: [0x34,0x01,0x80,0x00]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mul $4, $5, -0x8000
# CHECK: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: addiu $1, $zero, -32768 # encoding: [0x24,0x01,0x80,0x00]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mul $4, $5, 0x10000
# CHECK: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mul $4, $5, 0x1a5a5
# CHECK: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
# CHECK: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: lui $1, 1 # encoding: [0x3c,0x01,0x00,0x01]
# CHECK-TRAP: ori $1, $1, 42405 # encoding: [0x34,0x21,0xa5,0xa5]
# CHECK-TRAP: mult $5, $1 # encoding: [0x00,0xa1,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mulo $4, $5
# CHECK: mult $4, $5 # encoding: [0x00,0x85,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: sra $4, $4, 31 # encoding: [0x00,0x04,0x27,0xc3]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: beq $4, $1, $tmp0 # encoding: [0x10,0x81,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: mult $4, $5 # encoding: [0x00,0x85,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: sra $4, $4, 31 # encoding: [0x00,0x04,0x27,0xc3]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: tne $4, $1, 6 # encoding: [0x00,0x81,0x01,0xb6]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mulo $4, $5, $6
# CHECK: mult $5, $6 # encoding: [0x00,0xa6,0x00,0x18]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: sra $4, $4, 31 # encoding: [0x00,0x04,0x27,0xc3]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: beq $4, $1, $tmp1 # encoding: [0x10,0x81,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: mult $5, $6 # encoding: [0x00,0xa6,0x00,0x18]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: sra $4, $4, 31 # encoding: [0x00,0x04,0x27,0xc3]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: tne $4, $1, 6 # encoding: [0x00,0x81,0x01,0xb6]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
mulou $4,$5
# CHECK: multu $4, $5 # encoding: [0x00,0x85,0x00,0x19]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: beqz $1, $tmp2 # encoding: [0x10,0x20,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK-TRAP: multu $4, $5 # encoding: [0x00,0x85,0x00,0x19]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: tne $1, $zero, 6 # encoding: [0x00,0x20,0x01,0xb6]
mulou $4, $5, $6
# CHECK: multu $5, $6 # encoding: [0x00,0xa6,0x00,0x19]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: beqz $1, $tmp3 # encoding: [0x10,0x20,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK-TRAP: multu $5, $6 # encoding: [0x00,0xa6,0x00,0x19]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: tne $1, $zero, 6 # encoding: [0x00,0x20,0x01,0xb6]
dmul $4, $5, $6
# CHECK: dmultu $5, $6 # encoding: [0x00,0xa6,0x00,0x1d]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: dmultu $5, $6 # encoding: [0x00,0xa6,0x00,0x1d]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
dmul $4, $5, 1
# CHECK: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
# CHECK: dmult $5, $1 # encoding: [0x00,0xa1,0x00,0x1c]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: addiu $1, $zero, 1 # encoding: [0x24,0x01,0x00,0x01]
# CHECK-TRAP: dmult $5, $1 # encoding: [0x00,0xa1,0x00,0x1c]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
dmulo $4, $5, $6
# CHECK: dmult $5, $6 # encoding: [0x00,0xa6,0x00,0x1c]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: dsra32 $4, $4, 31 # encoding: [0x00,0x04,0x27,0xff]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: beq $4, $1, $tmp4 # encoding: [0x10,0x81,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: dmult $5, $6 # encoding: [0x00,0xa6,0x00,0x1c]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: dsra32 $4, $4, 31 # encoding: [0x00,0x04,0x27,0xff]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: tne $4, $1, 6 # encoding: [0x00,0x81,0x01,0xb6]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
dmulou $4,$5,$6
# CHECK: dmultu $5, $6 # encoding: [0x00,0xa6,0x00,0x1d]
# CHECK: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK: beqz $1, $tmp5 # encoding: [0x10,0x20,A,A]
# CHECK: nop # encoding: [0x00,0x00,0x00,0x00]
# CHECK: break 6 # encoding: [0x00,0x06,0x00,0x0d]
# CHECK-TRAP: dmultu $5, $6 # encoding: [0x00,0xa6,0x00,0x1d]
# CHECK-TRAP: mfhi $1 # encoding: [0x00,0x00,0x08,0x10]
# CHECK-TRAP: mflo $4 # encoding: [0x00,0x00,0x20,0x12]
# CHECK-TRAP: tne $1, $zero, 6 # encoding: [0x00,0x20,0x01,0xb6]