summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-08-20 22:09:54 +0000
committernakeee <nakeee@gmail.com>2009-08-20 22:09:54 +0000
commit92d4c55e14ea1f91a56d294a7372a11dfaaa0beb (patch)
tree39aab258267575db8c20eb09d58497b240d2e3e2 /Source/Core/DSPCore
parent99b4b0470525b7c1dd0f7fc37f55733b8a36dae8 (diff)
DSPLLE small sign fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4023 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore')
-rw-r--r--Source/Core/DSPCore/Src/DSPIntUtil.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/Core/DSPCore/Src/DSPIntUtil.h b/Source/Core/DSPCore/Src/DSPIntUtil.h
index 86ba5f316b..36af7021a5 100644
--- a/Source/Core/DSPCore/Src/DSPIntUtil.h
+++ b/Source/Core/DSPCore/Src/DSPIntUtil.h
@@ -58,10 +58,10 @@ inline u16 ToMask(u16 a)
return a | (a >> 1);
}
-inline u16 dsp_increment_addr_reg(int reg, int value = -1)
+inline s16 dsp_increment_addr_reg(int reg, s32 value = -1)
{
u16 tmb = ToMask(g_dsp.r[DSP_REG_WR0 + reg]);
- u16 tmp;
+ s16 tmp;
if (value == -1)
tmp = g_dsp.r[reg];
else
@@ -76,9 +76,9 @@ inline u16 dsp_increment_addr_reg(int reg, int value = -1)
}
// See http://code.google.com/p/dolphin-emu/source/detail?r=3125
-inline u16 dsp_decrement_addr_reg(int reg, int value = -1)
+inline s16 dsp_decrement_addr_reg(int reg, s32 value = -1)
{
- u16 tmp;
+ s16 tmp;
if (value == -1)
tmp = g_dsp.r[reg];
else
@@ -93,9 +93,9 @@ inline u16 dsp_decrement_addr_reg(int reg, int value = -1)
return tmp;
}
-inline u16 dsp_increase_addr_reg(int reg, s16 value)
+inline s16 dsp_increase_addr_reg(int reg, s16 value)
{
- u16 tmp = - 1;
+ s16 tmp = - 1;
// TODO: DO RIGHT!
if (value > 0) {
@@ -106,7 +106,8 @@ inline u16 dsp_increase_addr_reg(int reg, s16 value)
for (int i = 0; i < (int)(-value); i++) {
tmp = dsp_decrement_addr_reg(reg, tmp);
}
- }
+ } else
+ tmp = g_dsp.r[reg];
return tmp;
}