Files
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

96 lines
1.2 KiB
PHP

# r0-r3 are used as tmps, consider them call clobbered by these macros.
.macro start
.data
failmsg:
.ascii "fail\n"
passmsg:
.ascii "pass\n"
.text
.global _start
_start:
.endm
.macro exit rc
ldi8 r1, \rc
ldi8 r0, #1
trap #0
.endm
.macro pass
ldi8 r3, 5
ld24 r2, passmsg
ldi8 r1, 1
ldi8 r0, 5
trap #0
exit 0
.endm
.macro fail
ldi8 r3, 5
ld24 r2, failmsg
ldi8 r1, 1
ldi8 r0, 5
trap #0
exit 1
.endm
.macro mvi_h_gr reg, val
.if (\val >= -128) && (\val <= 127)
ldi8 \reg, \val
.else
seth \reg, high(\val)
or3 \reg, \reg, low(\val)
.endif
.endm
.macro mvaddr_h_gr reg, addr
seth \reg, high(\addr)
or3 \reg, \reg, low(\addr)
.endm
# Other macros know this only clobbers r0.
.macro test_h_gr reg, val
mvaddr_h_gr r0, \val
beq \reg, r0, test_gr\@
fail
test_gr\@:
.endm
.macro mvi_h_condbit val
ldi8 r0, 0
ldi8 r1, 1
.if \val
cmp r0, r1
.else
cmp r1, r0
.endif
.endm
.macro test_h_condbit val
.if \val
bc test_c1\@
fail
test_c1\@:
.else
bnc test_c0\@
fail
test_c0\@:
.endif
.endm
.macro mvi_h_accum0 hi, lo
mvi_h_gr r0, \hi
mvtachi r0
mvi_h_gr r0, \lo
mvtaclo r0
.endm
.macro test_h_accum0 hi, lo
mvfachi r1
test_h_gr r1, \hi
mvfaclo r1
test_h_gr r1, \lo
.endm