Merge 77b17ae943d9f3118a07aebb8685120d795751b7 into c057c7f0f0f486656939359b863528fd58f838c3

This commit is contained in:
g. economou 2025-06-05 15:56:52 -04:00 committed by GitHub
commit 53dc53e301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -31,7 +31,7 @@
#include "ue2common.h" #include "ue2common.h"
#include "util/arch.h" #include "util/arch.h"
#if !defined(HAVE_SSE42) #if (!defined(HAVE_SSE42)) || defined(VS_SIMDE_BACKEND)
/*** /***
*** What follows is derived from Intel's Slicing-by-8 CRC32 impl, which is BSD *** What follows is derived from Intel's Slicing-by-8 CRC32 impl, which is BSD
@ -586,7 +586,7 @@ u32 crc32c_sb8_64_bit(u32 running_crc, const unsigned char* p_buf,
// Externally visible function // Externally visible function
u32 Crc32c_ComputeBuf(u32 inCrc32, const void *buf, size_t bufLen) { u32 Crc32c_ComputeBuf(u32 inCrc32, const void *buf, size_t bufLen) {
#if defined(HAVE_SSE42) #if defined(HAVE_SSE42) && (!defined(VS_SIMDE_BACKEND))
u32 crc = crc32c_sse42(inCrc32, (const unsigned char *)buf, bufLen); u32 crc = crc32c_sse42(inCrc32, (const unsigned char *)buf, bufLen);
#else #else
u32 crc = crc32c_sb8_64_bit(inCrc32, (const unsigned char *)buf, bufLen); u32 crc = crc32c_sb8_64_bit(inCrc32, (const unsigned char *)buf, bufLen);

View File

@ -30,8 +30,12 @@
#ifndef UTIL_ARCH_X86_CRC32_H_ #ifndef UTIL_ARCH_X86_CRC32_H_
#define UTIL_ARCH_X86_CRC32_H_ #define UTIL_ARCH_X86_CRC32_H_
#if defined(VS_SIMDE_BACKEND)
#include "util/simd_types.h"
#else
#include "util/arch/x86/x86.h" #include "util/arch/x86/x86.h"
#include "util/intrinsics.h" #include "util/intrinsics.h"
#endif
#ifdef ARCH_64_BIT #ifdef ARCH_64_BIT
#define CRC_WORD 8 #define CRC_WORD 8

View File

@ -39,7 +39,10 @@
#ifndef VECTORSIZE #ifndef VECTORSIZE
#define VECTORSIZE 16 #define VECTORSIZE 16
#endif #endif
#ifndef SIMDE_ENABLE_NATIVE_ALIASES
#define SIMDE_ENABLE_NATIVE_ALIASES #define SIMDE_ENABLE_NATIVE_ALIASES
#endif
#if !defined(VS_SIMDE_NATIVE) #if !defined(VS_SIMDE_NATIVE)
#define SIMDE_NO_NATIVE #define SIMDE_NO_NATIVE
#endif #endif