From b5ea4ef9a8b05647faf00676fd8b354b5f420072 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sat, 2 May 2009 13:19:20 +0000 Subject: [PATCH] DSP: update base test to match new register naming. add mul test. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3132 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/DSPSpy/tests/dsp_base.inc | 28 +++++++-------- Source/DSPSpy/tests/mul_test.ds | 58 ++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 14 deletions(-) create mode 100644 Source/DSPSpy/tests/mul_test.ds diff --git a/Source/DSPSpy/tests/dsp_base.inc b/Source/DSPSpy/tests/dsp_base.inc index dd9ae2df76..664d0a0333 100644 --- a/Source/DSPSpy/tests/dsp_base.inc +++ b/Source/DSPSpy/tests/dsp_base.inc @@ -86,10 +86,10 @@ main: lrri $ix1, @$ar0 lrri $ix2, @$ar0 lrri $ix3, @$ar0 - lrri $r08, @$ar0 - lrri $r09, @$ar0 - lrri $r10, @$ar0 - lrri $r11, @$ar0 + lrri $wr0, @$ar0 + lrri $wr1, @$ar0 + lrri $wr2, @$ar0 + lrri $wr3, @$ar0 lrri $st0, @$ar0 lrri $st1, @$ar0 lrri $st2, @$ar0 @@ -206,8 +206,8 @@ irq: andcf $ac1.m, #0x8000 jlz irq si @DMBH, #0x8BAD - sr @DMBL, $r11 -;sr @DMBL, $ac0.m + sr @DMBL, $wr3 ; ??? + ;sr @DMBL, $ac0.m si @DIRQ, #0x0001 halt @@ -228,10 +228,10 @@ send_back: srri @$ar0, $ix1 srri @$ar0, $ix2 srri @$ar0, $ix3 - srri @$ar0, $r08 - srri @$ar0, $r09 - srri @$ar0, $r10 - srri @$ar0, $r11 + srri @$ar0, $wr0 + srri @$ar0, $wr1 + srri @$ar0, $wr2 + srri @$ar0, $wr3 srri @$ar0, $st0 srri @$ar0, $st1 srri @$ar0, $st2 @@ -294,10 +294,10 @@ dma_copy: lrri $ix1, @$ar0 lrri $ix2, @$ar0 lrri $ix3, @$ar0 - lrri $r08, @$ar0 - lrri $r09, @$ar0 - lrri $r10, @$ar0 - lrri $r11, @$ar0 + lrri $wr0, @$ar0 + lrri $wr1, @$ar0 + lrri $wr2, @$ar0 + lrri $wr3, @$ar0 lrri $st0, @$ar0 lrri $st1, @$ar0 lrri $st2, @$ar0 diff --git a/Source/DSPSpy/tests/mul_test.ds b/Source/DSPSpy/tests/mul_test.ds new file mode 100644 index 0000000000..030d1cce0a --- /dev/null +++ b/Source/DSPSpy/tests/mul_test.ds @@ -0,0 +1,58 @@ +; This test checks the effect of SET15 on multiplications. +incdir "tests" +include "dsp_base.inc" + +SET40 +LRI $AC0.M, #0x1234 +LRI $AC0.L, #0x5678 +SET16 + +m2 +CLR $ACC0 +LRI $AX0.L, #0xFFFF +LRI $AX1.L, #0x100 +MULX $AX0.L, $AX1.L +MULXAC $AX0.L, $AX1.L, $ACC0 +call send_back + +CLR $ACC0 +SET15 +LRI $AX0.L, #0xFFFF +LRI $AX1.L, #0x100 +MULX $AX0.L, $AX1.L +MULXAC $AX0.L, $AX1.L, $ACC0 +CLR15 +call send_back +m0 +lri $AX0.L, #1 +lri $AX1.L, #2 +mulx $AX0.L, $AX1.L +movp $ACC0 +call send_back ; 1 + +set15 +lri $AX0.L, #2 +lri $AX1.L, #4 +mulx $AX0.L, $AX1.L +movp $ACC0 +clr15 +call send_back ; 1 + +m2 +lri $AX0.L, #1 +lri $AX1.L, #2 +mulx $AX0.L, $AX1.L +movp $ACC0 +call send_back ; 1 + +set15 +lri $AX0.L, #2 +lri $AX1.L, #4 +mulx $AX0.L, $AX1.L +movp $ACC0 +clr15 +call send_back ; 1 +m0 + +; We're done, DO NOT DELETE THIS LINE +jmp end_of_test