diff --git a/Source/ee/Vif.h b/Source/ee/Vif.h index 36f29021c5..e594123bff 100644 --- a/Source/ee/Vif.h +++ b/Source/ee/Vif.h @@ -9,6 +9,11 @@ #include "../Profiler.h" #include "zip/ZipArchiveWriter.h" #include "zip/ZipArchiveReader.h" +#include "SimdDefs.h" + +#ifdef FRAMEWORK_SIMD_USE_SSE +#include +#endif class CINTC; @@ -584,6 +589,12 @@ class CVif { (*dst) = writeValue; } +#ifdef FRAMEWORK_SIMD_USE_SSE + else if((colMask == 0) && (mode == MODE_OFFSET)) + { + *reinterpret_cast<__m128i*>(dst) = _mm_add_epi32(*reinterpret_cast<__m128i*>(&writeValue), *reinterpret_cast<__m128i*>(&m_R)); + } +#endif else { for(unsigned int i = 0; i < 4; i++) @@ -699,7 +710,7 @@ class CVif CODE m_CODE; uint8 m_NUM; uint32 m_MODE; - uint32 m_R[4]; + alignas(16) uint32 m_R[4]; uint32 m_C[4]; uint32 m_MASK; uint32 m_MARK;