File fix-avx-sle.patch of Package 7zip
Index: 7zip/C/SwapBytes.c
===================================================================
--- 7zip.orig/C/SwapBytes.c
+++ 7zip/C/SwapBytes.c
@@ -305,11 +305,14 @@ ShufBytes_256(void *items8, const void *
msvc 19.30+ (VS2022): replaces _mm256_set_m128i(m,m) to vbroadcastf128(m) as we want
*/
// _mm256_broadcastsi128_si256(*mask128_ptr);
- /*
- #define MY_mm256_set_m128i(hi, lo) _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1)
- MY_mm256_set_m128i
- */
- _mm256_set_m128i(
+ #if defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION < 80000)
+ #warning "gcc < 8: using _mm256_set_m128i substitute"
+ #define MY_mm256_set_m128i(hi, lo) _mm256_insertf128_si256(_mm256_castsi128_si256(lo), (hi), 1)
+ #else
+ #define MY_mm256_set_m128i _mm256_set_m128i
+ #endif
+ //_mm256_set_m128i(
+ MY_mm256_set_m128i(
*(const __m128i *)mask128_ptr,
*(const __m128i *)mask128_ptr);
#endif