mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
51c26d82a5
This makes the point where execution starts more obvious compared to a start_of_test label at the end of the include, and allows putting other functions at the start of the file. This change also modifies the existing tests to build with this change.
67 lines
1.3 KiB
Plaintext
67 lines
1.3 KiB
Plaintext
incdir "tests"
|
|
include "dsp_base.inc"
|
|
|
|
test_main:
|
|
; Test what happens various values are written to every register
|
|
LRI $ar0, #0xffff
|
|
CALL set_all_regs
|
|
CALL send_back
|
|
|
|
LRI $ar0, #0x0000
|
|
CALL set_all_regs
|
|
CALL send_back
|
|
|
|
LRI $ar0, #0x007f
|
|
CALL set_all_regs
|
|
CALL send_back
|
|
|
|
LRI $ar0, #0x0080
|
|
CALL set_all_regs
|
|
CALL send_back
|
|
|
|
LRI $ar0, #0x0100
|
|
CALL set_all_regs
|
|
CALL send_back
|
|
|
|
; We're done, DO NOT DELETE THIS LINE
|
|
JMP end_of_test
|
|
|
|
; Copy $ar0 to all other registers
|
|
set_all_regs:
|
|
SET16
|
|
MRR $ar1, $ar0
|
|
MRR $ar2, $ar0
|
|
MRR $ar3, $ar0
|
|
MRR $ix0, $ar0
|
|
MRR $ix1, $ar0
|
|
MRR $ix2, $ar0
|
|
MRR $ix3, $ar0
|
|
MRR $wr0, $ar0
|
|
MRR $wr1, $ar0
|
|
MRR $wr2, $ar0
|
|
MRR $wr3, $ar0
|
|
; Don't write to the stacks; returning from this function breaks otherwise
|
|
; They don't show up in DSPSpy anyways
|
|
;MRR $st0, $ar0
|
|
;MRR $st1, $ar0
|
|
;MRR $st2, $ar0
|
|
;MRR $st3, $ar0
|
|
MRR $ac0.h, $ar0
|
|
MRR $ac1.h, $ar0
|
|
MRR $cr, $ar0
|
|
; Wait to set $sr, as it can change the way stores work
|
|
MRR $prod.l, $ar0
|
|
MRR $prod.m1, $ar0
|
|
MRR $prod.h, $ar0
|
|
MRR $prod.m2, $ar0
|
|
MRR $ax0.l, $ar0
|
|
MRR $ax1.l, $ar0
|
|
MRR $ax0.h, $ar0
|
|
MRR $ax1.h, $ar0
|
|
MRR $ac0.l, $ar0
|
|
MRR $ac1.l, $ar0
|
|
MRR $ac0.m, $ar0
|
|
MRR $ac1.m, $ar0
|
|
MRR $sr, $ar0
|
|
RET
|