mirror of https://github.com/PCSX2/pcsx2.git
VIF-JIT: Clean up pointless code, optimise protected vector copies
This commit is contained in:
parent
41f62cf53d
commit
c2907ea58f
|
@ -30,6 +30,7 @@ typedef void (*nVifrecCall)(uptr dest, uptr src);
|
|||
#include "newVif_HashBucket.h"
|
||||
|
||||
extern void mVUmergeRegs(const xRegisterSSE& dest, const xRegisterSSE& src, int xyzw, bool modXYZW = 0);
|
||||
extern void mVUsaveReg(const xRegisterSSE& reg, xAddressVoid ptr, int xyzw, bool modXYZW);
|
||||
extern void _nVifUnpack (int idx, const u8* data, uint mode, bool isFill);
|
||||
extern void dVifReserve (int idx);
|
||||
extern void dVifReset (int idx);
|
||||
|
|
|
@ -123,17 +123,13 @@ void VifUnpackSSE_Dynarec::doMaskWrite(const xRegisterSSE& regX) const
|
|||
|
||||
if (doMask && m2) // Merge MaskRow
|
||||
{
|
||||
mergeVectors(regX, xmmRow, xmmTemp, m2);
|
||||
mVUmergeRegs(regX, xmmRow, m2);
|
||||
}
|
||||
if (doMask && m3) // Merge MaskCol
|
||||
{
|
||||
mergeVectors(regX, xRegisterSSE(xmmCol0.Id + cc), xmmTemp, m3);
|
||||
}
|
||||
if (doMask && m4) // Merge Write Protect
|
||||
{
|
||||
xMOVAPS(xmmTemp, ptr[dstIndirect]);
|
||||
mergeVectors(regX, xmmTemp, xmmTemp, m4);
|
||||
mVUmergeRegs(regX, xRegisterSSE(xmmCol0.Id + cc), m3);
|
||||
}
|
||||
|
||||
if (doMode)
|
||||
{
|
||||
u32 m5 = ~(m2 | m3 | m4) & 0xf;
|
||||
|
@ -146,14 +142,14 @@ void VifUnpackSSE_Dynarec::doMaskWrite(const xRegisterSSE& regX) const
|
|||
xPXOR(xmmTemp, xmmTemp);
|
||||
if (doMode == 3)
|
||||
{
|
||||
mergeVectors(xmmRow, regX, xmmTemp, m5);
|
||||
mVUmergeRegs(xmmRow, regX, m5);
|
||||
}
|
||||
else
|
||||
{
|
||||
mergeVectors(xmmTemp, xmmRow, xmmTemp, m5);
|
||||
mVUmergeRegs(xmmTemp, xmmRow, m5);
|
||||
xPADD.D(regX, xmmTemp);
|
||||
if (doMode == 2)
|
||||
mergeVectors(xmmRow, regX, xmmTemp, m5);
|
||||
mVUmergeRegs(xmmRow, regX, m5);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -170,7 +166,10 @@ void VifUnpackSSE_Dynarec::doMaskWrite(const xRegisterSSE& regX) const
|
|||
}
|
||||
}
|
||||
}
|
||||
xMOVAPS(ptr32[dstIndirect], regX);
|
||||
if (doMask && m4) // Merge Write Protect
|
||||
mVUsaveReg(regX, ptr32[dstIndirect], m4 ^ 0xf, false);
|
||||
else
|
||||
xMOVAPS(ptr32[dstIndirect], regX);
|
||||
}
|
||||
|
||||
void VifUnpackSSE_Dynarec::writeBackRow() const
|
||||
|
|
|
@ -35,12 +35,6 @@ alignas(16) static const u32 SSEXYZWMask[4][4] =
|
|||
//alignas(__pagesize) static u8 nVifUpkExec[__pagesize*4];
|
||||
static RecompiledCodeReserve* nVifUpkExec = NULL;
|
||||
|
||||
// Merges xmm vectors without modifying source reg
|
||||
void mergeVectors(xRegisterSSE dest, xRegisterSSE src, xRegisterSSE temp, int xyzw)
|
||||
{
|
||||
mVUmergeRegs(dest, src, xyzw);
|
||||
}
|
||||
|
||||
// =====================================================================================================
|
||||
// VifUnpackSSE_Base Section
|
||||
// =====================================================================================================
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
using namespace x86Emitter;
|
||||
|
||||
extern void mergeVectors(xRegisterSSE dest, xRegisterSSE src, xRegisterSSE temp, int xyzw);
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// VifUnpackSSE_Base
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue