From f0641ebe3f667f4fdff61aab5fc54fb42c7e0e7b Mon Sep 17 00:00:00 2001 From: nakeee Date: Thu, 9 Apr 2009 22:07:58 +0000 Subject: [PATCH] fixed possible mistake in mulcmv git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2944 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.cpp | 13 +++++++------ Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.h | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.cpp index 7522baf162..4ad8422d01 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.cpp @@ -616,24 +616,25 @@ void mulcmvz(const UDSPInstruction& opc) // MULCMV // 110s t11r xxxx xxxx -// Multiply mid part of accumulator register $acS.m by high part $axS.h of +// Multiply mid part of accumulator register $acS.m by high part $axT.h of // secondary accumulator $axT (treat them both as signed). Move product // register before multiplication to accumulator $acR. +// possible mistake in duddie's doc axT.h rather than axS.h void mulcmv(const UDSPInstruction& opc) { - s64 TempProd = dsp_get_long_prod(); + s64 tempProd = dsp_get_long_prod(); // update prod u8 sreg = (opc.hex >> 12) & 0x1; u8 treg = (opc.hex >> 11) & 0x1; - s64 Prod = (s64)dsp_get_acc_m(sreg) * (s64)dsp_get_ax_h(sreg) * GetMultiplyModifier(); - dsp_set_long_prod(Prod); + s64 prod = (s64)dsp_get_acc_m(sreg) * (s64)dsp_get_ax_h(treg) * GetMultiplyModifier(); + dsp_set_long_prod(prod); // update acc u8 rreg = (opc.hex >> 8) & 0x1; - dsp_set_long_acc(rreg, TempProd); + dsp_set_long_acc(rreg, tempProd); - Update_SR_Register64(TempProd); + Update_SR_Register64(tempProd); } // CMPAR diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.h b/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.h index 4ad773cad6..b94c784cab 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPInterpreter.h @@ -83,6 +83,7 @@ void neg(const UDSPInstruction& opc); void addax(const UDSPInstruction& opc); void addr(const UDSPInstruction& opc); void subr(const UDSPInstruction& opc); +void subp(const UDSPInstruction& opc); void subax(const UDSPInstruction& opc); void addis(const UDSPInstruction& opc); void addi(const UDSPInstruction& opc);