mVU: Align x86ptr based on AVX2 caps

This commit is contained in:
refractionpcsx2 2022-12-29 17:05:05 +00:00
parent d359e8420b
commit 51107ee9dd
2 changed files with 4 additions and 9 deletions

View File

@ -31,14 +31,6 @@
#error PCSX2 requires compiling for at least SSE 4.1
#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
// Reduce code duplication by not compiling multiple versions
#if _M_SSE >= 0x500

View File

@ -482,7 +482,10 @@ void mVUtestCycles(microVU& mVU, microFlagCycles& mFC)
mVUendProgram(mVU, &mFC, 0);
{
xAlignPtr(SSE_ALIGN_N);
if(x86caps.hasAVX2)
xAlignPtr(32);
else
xAlignPtr(16);
u8* curx86Ptr = x86Ptr;
x86SetPtr(writeback);