diff options
| author | pierre <pierre@pirsoft.de> | 2010-12-29 02:12:06 +0000 |
|---|---|---|
| committer | pierre <pierre@pirsoft.de> | 2010-12-29 02:12:06 +0000 |
| commit | fc1db5eaa0b6caf2797d6250fa7a7bce1cfe4dbe (patch) | |
| tree | b652d2cdcd5f5d33a5f70164abd787f698d9c606 /Source/Core/DSPCore/Src/DspIntMisc.cpp | |
| parent | 0059b0f44f6af976fa1b17cea932b3d828d58e3c (diff) | |
Core/DSPCore: Reorganize register layout for accessing accumulators
(acc and ax) and product register with one read/write.
Gives a minuscule speedup of not more than 4%. In exchange, breaks all
your out-of-tree changes to dsp. Tests are not building again, yet.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6680 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore/Src/DspIntMisc.cpp')
| -rw-r--r-- | Source/Core/DSPCore/Src/DspIntMisc.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/Core/DSPCore/Src/DspIntMisc.cpp b/Source/Core/DSPCore/Src/DspIntMisc.cpp index b87667b259..e586c59816 100644 --- a/Source/Core/DSPCore/Src/DspIntMisc.cpp +++ b/Source/Core/DSPCore/Src/DspIntMisc.cpp @@ -28,7 +28,7 @@ namespace DSPInterpreter { // MRR $D, $S // 0001 11dd ddds ssss // Move value from register $S to register $D. -// FIXME: Perform additional operation depending on destination register. +// todo: Perform additional operation depending on destination register. void mrr(const UDSPInstruction opc) { u8 sreg = opc & 0x1f; @@ -86,7 +86,7 @@ void nx(const UDSPInstruction opc) // Decrement address register $arD. void dar(const UDSPInstruction opc) { - g_dsp.r[opc & 0x3] = dsp_decrement_addr_reg(opc & 0x3); + g_dsp._r.ar[opc & 0x3] = dsp_decrement_addr_reg(opc & 0x3); } // IAR $arD @@ -94,7 +94,7 @@ void dar(const UDSPInstruction opc) // Increment address register $arD. void iar(const UDSPInstruction opc) { - g_dsp.r[opc & 0x3] = dsp_increment_addr_reg(opc & 0x3); + g_dsp._r.ar[opc & 0x3] = dsp_increment_addr_reg(opc & 0x3); } // SUBARN $arD @@ -104,7 +104,7 @@ void iar(const UDSPInstruction opc) void subarn(const UDSPInstruction opc) { u8 dreg = opc & 0x3; - g_dsp.r[dreg] = dsp_decrease_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + dreg]); + g_dsp._r.ar[dreg] = dsp_decrease_addr_reg(dreg, (s16)g_dsp._r.ix[dreg]); } // ADDARN $arD, $ixS @@ -115,7 +115,7 @@ void addarn(const UDSPInstruction opc) { u8 dreg = opc & 0x3; u8 sreg = (opc >> 2) & 0x3; - g_dsp.r[dreg] = dsp_increase_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + sreg]); + g_dsp._r.ar[dreg] = dsp_increase_addr_reg(dreg, (s16)g_dsp._r.ix[sreg]); } //---- @@ -127,7 +127,7 @@ void addarn(const UDSPInstruction opc) void sbclr(const UDSPInstruction opc) { u8 bit = (opc & 0x7) + 6; - g_dsp.r[DSP_REG_SR] &= ~(1 << bit); + g_dsp._r.sr &= ~(1 << bit); } // SBSET #I @@ -137,7 +137,7 @@ void sbclr(const UDSPInstruction opc) void sbset(const UDSPInstruction opc) { u8 bit = (opc & 0x7) + 6; - g_dsp.r[DSP_REG_SR] |= (1 << bit); + g_dsp._r.sr |= (1 << bit); } // This is a bunch of flag setters, flipping bits in SR. So far so good, @@ -149,29 +149,29 @@ void srbith(const UDSPInstruction opc) { // M0/M2 change the multiplier mode (it can multiply by 2 for free). case 0xa: // M2 - g_dsp.r[DSP_REG_SR] &= ~SR_MUL_MODIFY; + g_dsp._r.sr &= ~SR_MUL_MODIFY; break; case 0xb: // M0 - g_dsp.r[DSP_REG_SR] |= SR_MUL_MODIFY; + g_dsp._r.sr |= SR_MUL_MODIFY; break; // If set, treat multiplicands as unsigned. // If clear, treat them as signed. case 0xc: // CLR15 - g_dsp.r[DSP_REG_SR] &= ~SR_MUL_UNSIGNED; + g_dsp._r.sr &= ~SR_MUL_UNSIGNED; break; case 0xd: // SET15 - g_dsp.r[DSP_REG_SR] |= SR_MUL_UNSIGNED; + g_dsp._r.sr |= SR_MUL_UNSIGNED; break; // Automatic 40-bit sign extension when loading ACx.M. // SET40 changes something very important: see the LRI instruction above. case 0xe: // SET16 (CLR40) - g_dsp.r[DSP_REG_SR] &= ~SR_40_MODE_BIT; + g_dsp._r.sr &= ~SR_40_MODE_BIT; break; - case 0xf: // SET40 - g_dsp.r[DSP_REG_SR] |= SR_40_MODE_BIT; + case 0xf: // SET40 + g_dsp._r.sr |= SR_40_MODE_BIT; break; default: |
