Files
TheRock/compiler/amd-llvm/llvm/test/MC/PowerPC/ppc64-psubis.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

99 lines
4.4 KiB
ArmAsm

# NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --version 6
# RUN: llvm-mc -triple powerpc64-unknown-unknown --show-encoding \
# RUN: -mattr=+isa-future-instructions,+prefix-instrs %s | \
# RUN: FileCheck -check-prefix=CHECK-BE %s
# RUN: llvm-mc -triple powerpc64le-unknown-unknown --show-encoding \
# RUN: -mattr=+isa-future-instructions,+prefix-instrs %s | \
# RUN: FileCheck -check-prefix=CHECK-LE %s
# psubis RT, RA, SI is an alias for paddis RT, RA, -SI, 0.
# psubis 3, 3, 1 -> paddis 3, 3, -1, 0
# -1 = 0xFFFFFFFF: prefix SI[31:16]=0xFFFF, instr SI[15:0]=0xFFFF
# Prefix (BE): 06 00 FF FF
# Instr (BE): 3C 63 FF FF
psubis 3, 3, 1
# CHECK-BE: paddis 3, 3, -1, 0 # encoding: [0x06,0x00,0xff,0xff,0x3c,0x63,0xff,0xff]
# CHECK-LE: paddis 3, 3, -1, 0 # encoding: [0xff,0xff,0x00,0x06,0xff,0xff,0x63,0x3c]
# psubis 3, 3, -1 -> paddis 3, 3, 1, 0
# 1 = 0x00000001: prefix SI[31:16]=0x0000, instr SI[15:0]=0x0001
# Prefix (BE): 06 00 00 00
# Instr (BE): 3C 63 00 01
psubis 3, 3, -1
# CHECK-BE: paddis 3, 3, 1, 0 # encoding: [0x06,0x00,0x00,0x00,0x3c,0x63,0x00,0x01]
# CHECK-LE: paddis 3, 3, 1, 0 # encoding: [0x00,0x00,0x00,0x06,0x01,0x00,0x63,0x3c]
# psubis 3, 3, 0x1234 -> paddis 3, 3, -0x1234, 0
# -0x1234 = 0xFFFFEDCC: prefix SI[31:16]=0xFFFF, instr SI[15:0]=0xEDCC
# Prefix (BE): 06 00 FF FF
# Instr (BE): 3C 63 ED CC
psubis 3, 3, 0x1234
# CHECK-BE: paddis 3, 3, -4660, 0 # encoding: [0x06,0x00,0xff,0xff,0x3c,0x63,0xed,0xcc]
# CHECK-LE: paddis 3, 3, -4660, 0 # encoding: [0xff,0xff,0x00,0x06,0xcc,0xed,0x63,0x3c]
# psubis 3, 3, 0x12345678 -> paddis 3, 3, -0x12345678, 0
# -0x12345678 = 0xEDCBA988: prefix SI[31:16]=0xEDCB, instr SI[15:0]=0xA988
# Prefix (BE): 06 00 ED CB
# Instr (BE): 3C 63 A9 88
psubis 3, 3, 0x12345678
# CHECK-BE: paddis 3, 3, -305419896, 0 # encoding: [0x06,0x00,0xed,0xcb,0x3c,0x63,0xa9,0x88]
# CHECK-LE: paddis 3, 3, -305419896, 0 # encoding: [0xcb,0xed,0x00,0x06,0x88,0xa9,0x63,0x3c]
# psubis 1, 2, 1 -> paddis 1, 2, -1, 0 (different RT and RA)
# -1 = 0xFFFFFFFF: prefix SI[31:16]=0xFFFF, instr SI[15:0]=0xFFFF
# Prefix (BE): 06 00 FF FF
# Instr (BE): 3C 22 FF FF
psubis 1, 2, 1
# CHECK-BE: paddis 1, 2, -1, 0 # encoding: [0x06,0x00,0xff,0xff,0x3c,0x22,0xff,0xff]
# CHECK-LE: paddis 1, 2, -1, 0 # encoding: [0xff,0xff,0x00,0x06,0xff,0xff,0x22,0x3c]
# psubis 1, 2, 0x12345678 -> paddis 1, 2, -0x12345678, 0
# -0x12345678 = 0xEDCBA988: prefix SI[31:16]=0xEDCB, instr SI[15:0]=0xA988
# Prefix (BE): 06 00 ED CB
# Instr (BE): 3C 22 A9 88
psubis 1, 2, 0x12345678
# CHECK-BE: paddis 1, 2, -305419896, 0 # encoding: [0x06,0x00,0xed,0xcb,0x3c,0x22,0xa9,0x88]
# CHECK-LE: paddis 1, 2, -305419896, 0 # encoding: [0xcb,0xed,0x00,0x06,0x88,0xa9,0x22,0x3c]
# psubis 3, 0, 1 -> paddis 3, 0, -1, 0 (RA=0)
# -1 = 0xFFFFFFFF: prefix SI[31:16]=0xFFFF, instr SI[15:0]=0xFFFF
# Prefix (BE): 06 00 FF FF
# Instr (BE): 3C 60 FF FF
psubis 3, 0, 1
# CHECK-BE: plis 3, -1 # encoding: [0x06,0x00,0xff,0xff,0x3c,0x60,0xff,0xff]
# CHECK-LE: plis 3, -1 # encoding: [0xff,0xff,0x00,0x06,0xff,0xff,0x60,0x3c]
# psubis 3, 0, 0x7FFFFFFF -> paddis 3, 0, -0x7FFFFFFF, 0
# -0x7FFFFFFF = 0x80000001: prefix SI[31:16]=0x8000, instr SI[15:0]=0x0001
# Prefix (BE): 06 00 80 00
# Instr (BE): 3C 60 00 01
psubis 3, 0, 0x7FFFFFFF
# CHECK-BE: plis 3, -2147483647 # encoding: [0x06,0x00,0x80,0x00,0x3c,0x60,0x00,0x01]
# CHECK-LE: plis 3, -2147483647 # encoding: [0x00,0x80,0x00,0x06,0x01,0x00,0x60,0x3c]
# psubis with a symbol reference: psubis 3, 3, target
# -> paddis 3, 3, -target, 0
# The fixup negates the symbol value; fixup kind is fixup_ppc_imm32.
# At encode time SI=0, so:
# Prefix (BE): 0x06'A' A A A
# Instr (BE): 3C 63 00 00
target:
# CHECK-BE: target:
# CHECK-LE: target:
psubis 3, 3, target
# CHECK-BE: paddis 3, 3, -target, 0 # encoding: [0x06'A',A,A,A,0x3c,0x63,0x00,0x00]
# CHECK-BE-NEXT: # fixup A - offset: 0, value: -target, kind: fixup_ppc_imm32
# CHECK-LE: paddis 3, 3, -target, 0 # encoding: [A,A,A,0x06'A',0x00,0x00,0x63,0x3c]
# CHECK-LE-NEXT: # fixup A - offset: 0, value: -target, kind: fixup_ppc_imm32