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:
Gregory Hainaut 2015-11-07 17:42:08 +01:00
parent 870e799baa
commit d9610d25e5
2 changed files with 1 additions and 8 deletions

View File

@ -183,17 +183,10 @@ typedef Fntype_mVUrecInst* Fnptr_mVUrecInst;
//------------------------------------------------------------------
// Define mVUquickSearch
//------------------------------------------------------------------
#ifndef __linux__
extern __pagealigned u8 mVUsearchXMM[__pagesize];
typedef u32 (__fastcall *mVUCall)(void*, void*);
#define mVUquickSearch(dest, src, size) ((((mVUCall)((void*)mVUsearchXMM))(dest, src)) == 0xf)
#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...

View File

@ -552,7 +552,7 @@ void SSE_DIVSS(mV, const xmm& to, const xmm& from, const xmm& t1 = xEmptyReg, co
// Micro VU - Custom Quick Search
//------------------------------------------------------------------
static __pagealigned u8 mVUsearchXMM[__pagesize];
__pagealigned u8 mVUsearchXMM[__pagesize];
// Generates a custom optimized block-search function
// Note: Structs must be 16-byte aligned! (GCC doesn't guarantee this)