vifUnpack: Made V3_## Unpacks work the same as V4_32, this is how legacy did it to, for some reason i made it copy the 3rd vector in to the fourth >.<

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3516 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2010-07-17 13:53:09 +00:00
parent 8e7a7cf5fe
commit 6fdfdf604f
1 changed files with 84 additions and 71 deletions

View File

@ -98,27 +98,31 @@ void VifUnpackSSE_Base::xUPK_S_32() const {
} }
void VifUnpackSSE_Base::xUPK_S_16() const { void VifUnpackSSE_Base::xUPK_S_16() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX16 (workReg); {
} xPMOVXX16 (workReg);
else { }
xMOV16 (workReg, ptr32[srcIndirect]); else
xPUNPCK.LWD(workReg, workReg); {
xShiftR (workReg, 16); xMOV16 (workReg, ptr32[srcIndirect]);
} xPUNPCK.LWD(workReg, workReg);
xShiftR (workReg, 16);
}
xPSHUF.D (destReg, workReg, _v0); xPSHUF.D (destReg, workReg, _v0);
} }
void VifUnpackSSE_Base::xUPK_S_8() const { void VifUnpackSSE_Base::xUPK_S_8() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX8 (workReg); {
} xPMOVXX8 (workReg);
else { }
xMOV8 (workReg, ptr32[srcIndirect]); else
xPUNPCK.LBW(workReg, workReg); {
xPUNPCK.LWD(workReg, workReg); xMOV8 (workReg, ptr32[srcIndirect]);
xShiftR (workReg, 24); xPUNPCK.LBW(workReg, workReg);
} xPUNPCK.LWD(workReg, workReg);
xShiftR (workReg, 24);
}
xPSHUF.D (destReg, workReg, _v0); xPSHUF.D (destReg, workReg, _v0);
} }
@ -133,58 +137,63 @@ void VifUnpackSSE_Base::xUPK_V2_32() const {
} }
void VifUnpackSSE_Base::xUPK_V2_16() const { void VifUnpackSSE_Base::xUPK_V2_16() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX16 (destReg); {
} xPMOVXX16 (destReg);
else { }
xMOV32 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LWD(destReg, destReg); {
xShiftR (destReg, 16); xMOV32 (destReg, ptr32[srcIndirect]);
} xPUNPCK.LWD(destReg, destReg);
xShiftR (destReg, 16);
}
xPSHUF.D (destReg, destReg, 0x44); //v1v0v1v0 xPSHUF.D (destReg, destReg, 0x44); //v1v0v1v0
} }
void VifUnpackSSE_Base::xUPK_V2_8() const { void VifUnpackSSE_Base::xUPK_V2_8() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX8 (destReg); {
} xPMOVXX8 (destReg);
else { }
xMOV16 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LBW(destReg, destReg); {
xPUNPCK.LWD(destReg, destReg); xMOV16 (destReg, ptr32[srcIndirect]);
xShiftR (destReg, 24); xPUNPCK.LBW(destReg, destReg);
} xPUNPCK.LWD(destReg, destReg);
xShiftR (destReg, 24);
}
xPSHUF.D (destReg, destReg, 0x44); //v1v0v1v0 xPSHUF.D (destReg, destReg, 0x44); //v1v0v1v0
} }
void VifUnpackSSE_Base::xUPK_V3_32() const { void VifUnpackSSE_Base::xUPK_V3_32() const {
xMOV128 (destReg, ptr32[srcIndirect]); xMOV128 (destReg, ptr32[srcIndirect]);
xPSHUF.D (destReg, destReg, 0xA4); //v2v2v1v0
} }
void VifUnpackSSE_Base::xUPK_V3_16() const { void VifUnpackSSE_Base::xUPK_V3_16() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX16 (destReg); {
} xPMOVXX16 (destReg);
else { }
xMOV64 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LWD(destReg, destReg); {
xShiftR (destReg, 16); xMOV64 (destReg, ptr32[srcIndirect]);
} xPUNPCK.LWD(destReg, destReg);
xPSHUF.D (destReg, destReg, 0xA4); //v2v2v1v0 xShiftR (destReg, 16);
}
} }
void VifUnpackSSE_Base::xUPK_V3_8() const { void VifUnpackSSE_Base::xUPK_V3_8() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX8 (destReg); {
} xPMOVXX8 (destReg);
else { }
xMOV32 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LBW(destReg, destReg); {
xPUNPCK.LWD(destReg, destReg); xMOV32 (destReg, ptr32[srcIndirect]);
xShiftR (destReg, 24); xPUNPCK.LBW(destReg, destReg);
} xPUNPCK.LWD(destReg, destReg);
xPSHUF.D (destReg, destReg, 0xA4); //v2v2v1v0 xShiftR (destReg, 24);
}
} }
void VifUnpackSSE_Base::xUPK_V4_32() const { void VifUnpackSSE_Base::xUPK_V4_32() const {
@ -192,26 +201,30 @@ void VifUnpackSSE_Base::xUPK_V4_32() const {
} }
void VifUnpackSSE_Base::xUPK_V4_16() const { void VifUnpackSSE_Base::xUPK_V4_16() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX16 (destReg); {
} xPMOVXX16 (destReg);
else { }
xMOV64 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LWD(destReg, destReg); {
xShiftR (destReg, 16); xMOV64 (destReg, ptr32[srcIndirect]);
} xPUNPCK.LWD(destReg, destReg);
xShiftR (destReg, 16);
}
} }
void VifUnpackSSE_Base::xUPK_V4_8() const { void VifUnpackSSE_Base::xUPK_V4_8() const {
if (x86caps.hasStreamingSIMD4Extensions) { if (x86caps.hasStreamingSIMD4Extensions)
xPMOVXX8 (destReg); {
} xPMOVXX8 (destReg);
else { }
xMOV32 (destReg, ptr32[srcIndirect]); else
xPUNPCK.LBW(destReg, destReg); {
xPUNPCK.LWD(destReg, destReg); xMOV32 (destReg, ptr32[srcIndirect]);
xShiftR (destReg, 24); xPUNPCK.LBW(destReg, destReg);
} xPUNPCK.LWD(destReg, destReg);
xShiftR (destReg, 24);
}
} }
void VifUnpackSSE_Base::xUPK_V4_5() const { void VifUnpackSSE_Base::xUPK_V4_5() const {