Merge pull request #957 from PCSX2/mvu-custom-search

Mvu custom search
This commit is contained in:
Gregory Hainaut 2015-11-12 12:12:11 +01:00
commit dfba17c7dc
2 changed files with 1 additions and 8 deletions

View File

@ -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...

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 // 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)