mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
Core/DSPCore: Improve Interpreter address register add/sub, convert to
assembler for JIT. Replace JIT ToMask() with a different variant. Remove superfluous zeroWriteBackLog calls(added by me). Core/Common: Don't bother creating a string and calling into a Logs trigger() when there is noone listening. Change AtomicLoadAcquire for gcc to just make the compiler not reorder memory accesses around it instead of doing a full memory barrier, per the comment in the win32 variant. Core/AudioCommon: Fix a use of uninitialized variable inside libalsa. Microbenchmarking results for ToMask variants:(1 000 000 000 iterations): cpu\variant| shifts | bit scan intel mobile C2D@2.5GHz | 5.5s | 4.0s amd athlon64x2@3GHz | 6.1s | 6.4s (including some constant overhead identical to both variants) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6667 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -68,10 +68,10 @@ inline u16 dsp_increase_addr_reg(u16 reg, s16 ix)
|
||||
u16 m = ToMask(wr) | 1;
|
||||
u16 nar = ar+ix;
|
||||
if (ix >= 0) {
|
||||
if((ar&m)+(ix&m) -m-1 >= 0)
|
||||
if((ar&m) + (int)(ix&m) -(int)m-1 >= 0)
|
||||
nar -= wr+1;
|
||||
} else {
|
||||
if((ar&m)+(ix&m) -m-1 < m-wr)
|
||||
if((ar&m) + (int)(ix&m) -(int)m-1 < m-wr)
|
||||
nar += wr+1;
|
||||
}
|
||||
return nar;
|
||||
@ -82,13 +82,12 @@ inline u16 dsp_decrease_addr_reg(u16 reg, s16 ix)
|
||||
u16 ar = g_dsp.r[reg];
|
||||
u16 wr = g_dsp.r[reg+8];
|
||||
u16 m = ToMask(wr) | 1;
|
||||
ix = -ix-1;
|
||||
u16 nar = ar+ix+1;
|
||||
if (ix-1 >= 0) {
|
||||
if((ar&m)+(ix&m) -m >= 0)
|
||||
u16 nar = ar-ix;
|
||||
if ((u16)ix > 0x8000) { // equiv: ix < 0 && ix != -0x8000
|
||||
if((ar&m) - (int)(ix&m) >= 0)
|
||||
nar -= wr+1;
|
||||
} else {
|
||||
if((ar&m)+(ix&m) -m < m-wr)
|
||||
if((ar&m) - (int)(ix&m) < m-wr)
|
||||
nar += wr+1;
|
||||
}
|
||||
return nar;
|
||||
|
Reference in New Issue
Block a user