Files
TheRock/debug-tools/rocgdb/source/sim/testsuite/arm/iwmmxt/testutils.inc
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

119 lines
1.8 KiB
PHP

# r0-r3 are used as tmps, consider them call clobbered by these macros.
# This uses the angel rom monitor calls.
# ??? How do we use the \@ facility of .macros ???
# @ is the comment char!
.macro mvi_h_gr reg, val
ldr \reg,[pc]
b . + 8
.word \val
.endm
.macro mvaddr_h_gr reg, addr
ldr \reg,[pc]
b . + 8
.word \addr
.endm
.macro start
.data
failmsg:
.asciz "fail\n"
passmsg:
.asciz "pass\n"
.text
do_pass:
ldr r1, passmsg_addr
mov r0, #4
swi #0x123456
exit 0
passmsg_addr:
.word passmsg
do_fail:
ldr r1, failmsg_addr
mov r0, #4
swi #0x123456
exit 1
failmsg_addr:
.word failmsg
.global _start
_start:
.endm
# *** Other macros know pass/fail are 4 bytes in size! Yuck.
.macro pass
b do_pass
.endm
.macro fail
b do_fail
.endm
.macro exit rc
# ??? This works with the ARMulator but maybe not others.
#mov r0, #\rc
#swi #1
# This seems to be portable (though it ignores rc).
mov r0,#0x18
mvi_h_gr r1, 0x20026
swi #0x123456
# If that returns, punt with a sigill.
stc 0,cr0,[r0]
.endm
# Other macros know this only clobbers r0.
# WARNING: It also clobbers the condition codes (FIXME).
.macro test_h_gr reg, val
mvaddr_h_gr r0, \val
cmp \reg, r0
beq . + 8
fail
.endm
.macro mvi_h_cnvz c, n, v, z
mov r0, #0
.if \c
orr r0, r0, #0x20000000
.endif
.if \n
orr r0, r0, #0x80000000
.endif
.if \v
orr r0, r0, #0x10000000
.endif
.if \z
orr r0, r0, #0x40000000
.endif
mrs r1, cpsr
bic r1, r1, #0xf0000000
orr r1, r1, r0
msr cpsr, r1
# ??? nops needed
.endm
# ??? Preserve condition codes?
.macro test_h_cnvz c, n, v, z
mov r0, #0
.if \c
orr r0, r0, #0x20000000
.endif
.if \n
orr r0, r0, #0x80000000
.endif
.if \v
orr r0, r0, #0x10000000
.endif
.if \z
orr r0, r0, #0x40000000
.endif
mrs r1, cpsr
and r1, r1, #0xf0000000
cmp r0, r1
beq . + 8
fail
.endm