summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore/Src
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-07-06 21:27:56 +0000
committernakeee <nakeee@gmail.com>2009-07-06 21:27:56 +0000
commitd8d2b8030e4ec0cfdead607e5c8591fcfcab989c (patch)
tree673e1dfcb9dc3c1dbeebd686b6d8342b40d193bd /Source/Core/DSPCore/Src
parentce6e8ed798007545a42aaf36099176355d070003 (diff)
DSPLLE: Commented out the else in bloop, it doesn't make sense, and I didn't get any
regression, but please check and tell me if it broke something. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3695 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore/Src')
-rw-r--r--Source/Core/DSPCore/Src/DspIntBranch.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/DSPCore/Src/DspIntBranch.cpp b/Source/Core/DSPCore/Src/DspIntBranch.cpp
index 7afa5d9585..52aa121bb2 100644
--- a/Source/Core/DSPCore/Src/DspIntBranch.cpp
+++ b/Source/Core/DSPCore/Src/DspIntBranch.cpp
@@ -142,20 +142,20 @@ void halt(const UDSPInstruction& opc)
// LOOP handling: Loop stack is used to control execution of repeated blocks of
// instructions. Whenever there is value on stack $st2 and current PC is equal
// value at $st2, then value at stack $st3 is decremented. If value is not zero
-// then PC is modified with calue from call stack $st0. Otherwise values from
-// callstack $st0 and both loop stacks $st2 and $st3 are poped and execution
+// then PC is modified with value from call stack $st0. Otherwise values from
+// call stack $st0 and both loop stacks $st2 and $st3 are poped and execution
// continues at next opcode.
void HandleLoop()
{
// Handle looping hardware.
+ const u16 rCallAddress = g_dsp.r[DSP_REG_ST0];
+ const u16 rLoopAddress = g_dsp.r[DSP_REG_ST2];
u16& rLoopCounter = g_dsp.r[DSP_REG_ST3];
- if (rLoopCounter > 0)
- {
- const u16 rCallAddress = g_dsp.r[DSP_REG_ST0];
- const u16 rLoopAddress = g_dsp.r[DSP_REG_ST2];
-
- if (g_dsp.pc == (rLoopAddress + 1)) //opSize[rLoopAddress]))
+ if (rLoopAddress > 0 && rLoopCounter > 0)
+ {
+ // FIXME: why -1?
+ if (g_dsp.pc - 1 == rLoopAddress)
{
rLoopCounter--;
if (rLoopCounter > 0)
@@ -239,11 +239,11 @@ void bloop(const UDSPInstruction& opc)
dsp_reg_store_stack(2, loop_pc);
dsp_reg_store_stack(3, cnt);
}
- else
+ /* else
{
g_dsp.pc = loop_pc;
g_dsp.pc += opSize[dsp_peek_code()];
- }
+ }*/
}
// BLOOPI #I, addrA
@@ -260,17 +260,17 @@ void bloopi(const UDSPInstruction& opc)
u16 cnt = opc.hex & 0xff;
u16 loop_pc = dsp_fetch_code();
- if (cnt)
+ if (cnt)
{
dsp_reg_store_stack(0, g_dsp.pc);
dsp_reg_store_stack(2, loop_pc);
dsp_reg_store_stack(3, cnt);
}
- else
+ /* else
{
g_dsp.pc = loop_pc;
g_dsp.pc += opSize[dsp_peek_code()];
- }
+ }*/
}
} // namespace