mirror of https://github.com/PCSX2/pcsx2.git
mVU: Align x86ptr based on AVX2 caps
This commit is contained in:
parent
d359e8420b
commit
51107ee9dd
|
@ -31,14 +31,6 @@
|
||||||
#error PCSX2 requires compiling for at least SSE 4.1
|
#error PCSX2 requires compiling for at least SSE 4.1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Require 32 bit alignment for vectors for AVX2.
|
|
||||||
#if _M_SSE >= 0x501
|
|
||||||
#define SSE_ALIGN_N 32
|
|
||||||
#else
|
|
||||||
#define SSE_ALIGN_N 16
|
|
||||||
#endif
|
|
||||||
#define SSE_ALIGN alignas(SSE_ALIGN_N)
|
|
||||||
|
|
||||||
// Starting with AVX, processors have fast unaligned loads
|
// Starting with AVX, processors have fast unaligned loads
|
||||||
// Reduce code duplication by not compiling multiple versions
|
// Reduce code duplication by not compiling multiple versions
|
||||||
#if _M_SSE >= 0x500
|
#if _M_SSE >= 0x500
|
||||||
|
|
|
@ -482,7 +482,10 @@ void mVUtestCycles(microVU& mVU, microFlagCycles& mFC)
|
||||||
mVUendProgram(mVU, &mFC, 0);
|
mVUendProgram(mVU, &mFC, 0);
|
||||||
|
|
||||||
{
|
{
|
||||||
xAlignPtr(SSE_ALIGN_N);
|
if(x86caps.hasAVX2)
|
||||||
|
xAlignPtr(32);
|
||||||
|
else
|
||||||
|
xAlignPtr(16);
|
||||||
|
|
||||||
u8* curx86Ptr = x86Ptr;
|
u8* curx86Ptr = x86Ptr;
|
||||||
x86SetPtr(writeback);
|
x86SetPtr(writeback);
|
||||||
|
|
Loading…
Reference in New Issue