Skip to content

Commit

Permalink
gh-116116: Backport blake2 change to fix building with clang-cl on wi…
Browse files Browse the repository at this point in the history
…ndows-i686 (GH-116117)

(cherry picked from commit 9b9e819)

Co-authored-by: Yuriy Chernyshov <thegeorg@yandex-team.com>
  • Loading branch information
miss-islington and georgthegreat committed Mar 4, 2024
1 parent 0a9356c commit ee7ba53
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
@@ -0,0 +1,2 @@
Backport ``libb2``'s PR #42 to fix compiling CPython on 32-bit Windows
with ``clang-cl``.
8 changes: 4 additions & 4 deletions Misc/sbom.spdx.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Modules/_blake2/impl/blake2b.c
Expand Up @@ -27,7 +27,7 @@
#if defined(HAVE_SSE2)
#include <emmintrin.h>
// MSVC only defines _mm_set_epi64x for x86_64...
#if defined(_MSC_VER) && !defined(_M_X64)
#if defined(_MSC_VER) && !defined(_M_X64) && !defined(__clang__)
static inline __m128i _mm_set_epi64x( const uint64_t u1, const uint64_t u0 )
{
return _mm_set_epi32( u1 >> 32, u1, u0 >> 32, u0 );
Expand Down
2 changes: 1 addition & 1 deletion Modules/_blake2/impl/blake2s.c
Expand Up @@ -27,7 +27,7 @@
#if defined(HAVE_SSE2)
#include <emmintrin.h>
// MSVC only defines _mm_set_epi64x for x86_64...
#if defined(_MSC_VER) && !defined(_M_X64)
#if defined(_MSC_VER) && !defined(_M_X64) && !defined(__clang__)
static inline __m128i _mm_set_epi64x( const uint64_t u1, const uint64_t u0 )
{
return _mm_set_epi32( u1 >> 32, u1, u0 >> 32, u0 );
Expand Down

0 comments on commit ee7ba53

Please sign in to comment.