newVif: minor change, brought the nVifstruct down from 32bytes to 16bytes...

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2368 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-12-20 06:33:37 +00:00
parent 7b2c66e549
commit bc3b419272
3 changed files with 6 additions and 6 deletions

View File

@ -61,17 +61,16 @@ struct __aligned16 nVifBlock { // Ordered for Hashing
u8 cl; // [04] CL Field u8 cl; // [04] CL Field
u8 wl; // [05] WL Field u8 wl; // [05] WL Field
u32 mask; // [06] Mask Field u32 mask; // [06] Mask Field
u8 padding[6];// [10] through [15] u8 padding[2];// [10] through [11]
uptr startPtr; // [16] Start Ptr of RecGen Code uptr startPtr; // [12] Start Ptr of RecGen Code
u8 end[12]; // [20] through [31] } __packed; // 16 bytes
} __packed; // 32 bytes
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma pack() # pragma pack()
#endif #endif
#define _hSize 0x4000 // [usn*1:mask*1:upk*4:num*8] hash... #define _hSize 0x4000 // [usn*1:mask*1:upk*4:num*8] hash...
#define _cmpS (sizeof(nVifBlock) - (16+6)) #define _cmpS (sizeof(nVifBlock) - (4))
#define _tParams nVifBlock, _hSize, _cmpS #define _tParams nVifBlock, _hSize, _cmpS
struct nVifStruct { struct nVifStruct {
u32 idx; // VIF0 or VIF1 u32 idx; // VIF0 or VIF1

View File

@ -49,7 +49,7 @@ public:
T* c = mChain[o]; T* c = mChain[o];
for (int i = 0; i < s; i++) { for (int i = 0; i < s; i++) {
//if (!memcmp(&c[i], dataPtr, cmpSize)) return &c[i]; //if (!memcmp(&c[i], dataPtr, cmpSize)) return &c[i];
if ((((nVifCall)((void*)nVifMemCmp))(&c[i], dataPtr))==0xf) return &c[i]; if ((((nVifCall)((void*)nVifMemCmp))(&c[i], dataPtr))==7) return &c[i];
} }
return NULL; return NULL;
} }

View File

@ -282,6 +282,7 @@ void emitCustomCompare() {
xMOVAPS (xmm0, ptr32[ecx]); xMOVAPS (xmm0, ptr32[ecx]);
xPCMP.EQD(xmm0, ptr32[edx]); xPCMP.EQD(xmm0, ptr32[edx]);
xMOVMSKPS(eax, xmm0); xMOVMSKPS(eax, xmm0);
xAND (eax, 0x7);
xRET(); xRET();
HostSys::MemProtectStatic(nVifMemCmp, Protect_ReadOnly, true); HostSys::MemProtectStatic(nVifMemCmp, Protect_ReadOnly, true);