mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Support SHA256_Transform_shani() with MSVC, too
Closes GH-15312.
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
# include <immintrin.h>
|
||||
|
||||
# if PHP_HASH_INTRIN_SHA_RESOLVER
|
||||
# if defined(PHP_HASH_INTRIN_SHA_RESOLVER) && defined(HAVE_FUNC_ATTRIBUTE_TARGET)
|
||||
static __m128i be32dec_128(const uint8_t * src) __attribute__((target("ssse3")));
|
||||
void SHA256_Transform_shani(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64]) __attribute__((target("ssse3,sha")));
|
||||
# endif
|
||||
|
||||
@@ -55,10 +55,10 @@ PHP_HASH_API void PHP_SHA256Update(PHP_SHA256_CTX *, const unsigned char *, size
|
||||
void SHA256_Transform_sse2(uint32_t state[PHP_STATIC_RESTRICT 8], const uint8_t block[PHP_STATIC_RESTRICT 64], uint32_t W[PHP_STATIC_RESTRICT 64], uint32_t S[PHP_STATIC_RESTRICT 8]);
|
||||
#endif
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IMMINTRIN_H)
|
||||
#if ((defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IMMINTRIN_H)) || defined(_M_X64) || defined(_M_IX86)
|
||||
# if defined(__SSSE3__) && defined(__SHA__)
|
||||
# define PHP_HASH_INTRIN_SHA_NATIVE 1
|
||||
# elif defined(HAVE_FUNC_ATTRIBUTE_TARGET)
|
||||
# elif defined(HAVE_FUNC_ATTRIBUTE_TARGET) || defined(_M_X64) || defined(_M_IX86)
|
||||
# define PHP_HASH_INTRIN_SHA_RESOLVER 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user