From c0de47b1e16eddac320719527cf5d136d689dda4 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 17 Aug 2026 02:08:29 +1000 Subject: [PATCH] [idd] wcwrite: gate SIMD stores on SSE2 --- idd/LGCommon/WCWrite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idd/LGCommon/WCWrite.cpp b/idd/LGCommon/WCWrite.cpp index 1f97a8e0..b5e18087 100644 --- a/idd/LGCommon/WCWrite.cpp +++ b/idd/LGCommon/WCWrite.cpp @@ -44,7 +44,7 @@ namespace WCWrite } #if defined(_M_IX86) || defined(_M_X64) - __declspec(noinline) void CopySSE41( + __declspec(noinline) void CopySSE2( void * destination, const void * source, size_t size) { uint8_t * dst = static_cast(destination); @@ -104,7 +104,7 @@ namespace WCWrite return &CopyFallback; __cpuidex(registers, 1, 0); - const bool sse41 = (registers[2] & (1 << 19)) != 0; + const bool sse2 = (registers[3] & (1 << 26)) != 0; const bool avx = (registers[2] & (1 << 28)) != 0; const bool osxsave = (registers[2] & (1 << 27)) != 0; @@ -116,7 +116,7 @@ namespace WCWrite return &Detail::CopyAVX2; } - return sse41 ? &CopySSE41 : &CopyFallback; + return sse2 ? &CopySSE2 : &CopyFallback; } #else CopyFn SelectCopy()