mirror of https://github.com/PCSX2/pcsx2.git
mvu: enable custom cmp function
From the comment, it used to be bad to gcc alignment issue. Recent gcc align the stack on 16B boundary. Maybe it solved the issue. I play severals minutes without any crashes but it requires more tests.
This commit is contained in:
parent
870e799baa
commit
d9610d25e5
|
@ -183,17 +183,10 @@ typedef Fntype_mVUrecInst* Fnptr_mVUrecInst;
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Define mVUquickSearch
|
// Define mVUquickSearch
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
#ifndef __linux__
|
|
||||||
extern __pagealigned u8 mVUsearchXMM[__pagesize];
|
extern __pagealigned u8 mVUsearchXMM[__pagesize];
|
||||||
typedef u32 (__fastcall *mVUCall)(void*, void*);
|
typedef u32 (__fastcall *mVUCall)(void*, void*);
|
||||||
#define mVUquickSearch(dest, src, size) ((((mVUCall)((void*)mVUsearchXMM))(dest, src)) == 0xf)
|
#define mVUquickSearch(dest, src, size) ((((mVUCall)((void*)mVUsearchXMM))(dest, src)) == 0xf)
|
||||||
#define mVUemitSearch() { mVUcustomSearch(); }
|
#define mVUemitSearch() { mVUcustomSearch(); }
|
||||||
#else
|
|
||||||
// Note: GCC builds crash with custom search function, because
|
|
||||||
// they're not guaranteeing 16-byte alignment on the structs :(
|
|
||||||
#define mVUquickSearch(dest, src, size) (!memcmp(dest, src, size))
|
|
||||||
#define mVUemitSearch()
|
|
||||||
#endif
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
// Misc Macros...
|
// Misc Macros...
|
||||||
|
|
|
@ -552,7 +552,7 @@ void SSE_DIVSS(mV, const xmm& to, const xmm& from, const xmm& t1 = xEmptyReg, co
|
||||||
// Micro VU - Custom Quick Search
|
// Micro VU - Custom Quick Search
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
static __pagealigned u8 mVUsearchXMM[__pagesize];
|
__pagealigned u8 mVUsearchXMM[__pagesize];
|
||||||
|
|
||||||
// Generates a custom optimized block-search function
|
// Generates a custom optimized block-search function
|
||||||
// Note: Structs must be 16-byte aligned! (GCC doesn't guarantee this)
|
// Note: Structs must be 16-byte aligned! (GCC doesn't guarantee this)
|
||||||
|
|
Loading…
Reference in New Issue