mirror of https://github.com/PCSX2/pcsx2.git
spu2-x: Fix a crash in Linux. (Do the same thing to ZeroSPU2 for good measure.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3252 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
c45480f5a6
commit
10576c5b01
|
@ -14,6 +14,7 @@
|
|||
<Compiler>
|
||||
<Add option="-g" />
|
||||
<Add option="-DPCSX2_DEVBUILD" />
|
||||
<Add option="-DPCSX2_DEBUG" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="../../../../deps/debug/libsoundtouch-dbg.a" />
|
||||
|
|
|
@ -251,6 +251,7 @@ static __forceinline void GetNextDataDummy(V_Core& thiscore, uint voiceidx)
|
|||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
||||
static s32 __forceinline GetNoiseValues()
|
||||
{
|
||||
static s32 Seed = 0x41595321;
|
||||
|
@ -260,7 +261,6 @@ static s32 __forceinline GetNoiseValues()
|
|||
retval = (Seed&0xff) << 8;
|
||||
else if( Seed&0xffff )
|
||||
retval = 0x7fff;
|
||||
|
||||
#ifdef _WIN32
|
||||
__asm {
|
||||
MOV eax,Seed
|
||||
|
@ -274,22 +274,22 @@ static s32 __forceinline GetNoiseValues()
|
|||
MOV Seed,eax
|
||||
}
|
||||
#else
|
||||
__asm__ (
|
||||
__asm__ __volatile__ (
|
||||
".intel_syntax\n"
|
||||
"MOV %%eax,%1\n"
|
||||
"ROR %%eax,5\n"
|
||||
"XOR %%eax,0x9a\n"
|
||||
"MOV %%ebx,%%eax\n"
|
||||
"MOV %%esi,%%eax\n"
|
||||
"ROL %%eax,2\n"
|
||||
"ADD %%eax,%%ebx\n"
|
||||
"XOR %%eax,%%ebx\n"
|
||||
"ADD %%eax,%%esi\n"
|
||||
"XOR %%eax,%%esi\n"
|
||||
"ROR %%eax,3\n"
|
||||
"MOV %0,%%eax\n"
|
||||
".att_syntax\n" : "=r"(Seed) :"r"(Seed));
|
||||
".att_syntax\n" : "=r"(Seed) :"r"(Seed)
|
||||
);
|
||||
#endif
|
||||
return retval;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
|
|
|
@ -204,18 +204,19 @@ static void __forceinline GetNoiseValues(s32& VD)
|
|||
MOV Seed,eax
|
||||
}
|
||||
#else
|
||||
__asm__ (
|
||||
__asm__ __volatile__ (
|
||||
".intel_syntax\n"
|
||||
"MOV %%eax,%1\n"
|
||||
"ROR %%eax,5\n"
|
||||
"XOR %%eax,0x9a\n"
|
||||
"MOV %%ebx,%%eax\n"
|
||||
"MOV %%esi,%%eax\n"
|
||||
"ROL %%eax,2\n"
|
||||
"ADD %%eax,%%ebx\n"
|
||||
"XOR %%eax,%%ebx\n"
|
||||
"ADD %%eax,%%esi\n"
|
||||
"XOR %%eax,%%esi\n"
|
||||
"ROR %%eax,3\n"
|
||||
"MOV %0,%%eax\n"
|
||||
".att_syntax\n" : "=r"(Seed) :"r"(Seed));
|
||||
".att_syntax\n" : "=r"(Seed) :"r"(Seed)
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue