Skip to content

Commit

Permalink
Disable Altivec for BLAKE2s on AIX 7.1 and XLC 12.01 (GH weidai11#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Nov 21, 2018
1 parent a65d55a commit 0998b40
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions blake2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
# undef CRYPTOPP_ARM_NEON_AVAILABLE
#endif

// BLAKE2s bug on AIX 7.1 (POWER7) with XLC 12.01
// https://github.com/weidai11/cryptopp/issues/743
#if defined(__xlC__) && (__xlC__ < 0x0d01)
# define CRYPTOPP_DISABLE_ALTIVEC 1
# undef CRYPTOPP_POWER7_AVAILABLE
# undef CRYPTOPP_ALTIVEC_AVAILABLE
#endif

NAMESPACE_BEGIN(CryptoPP)

// Export the tables to the SIMD files
Expand Down
8 changes: 8 additions & 0 deletions blake2b_simd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
# undef CRYPTOPP_ARM_NEON_AVAILABLE
#endif

// BLAKE2s bug on AIX 7.1 (POWER7) with XLC 12.01
// https://github.com/weidai11/cryptopp/issues/743
#if defined(__xlC__) && (__xlC__ < 0x0d01)
# define CRYPTOPP_DISABLE_ALTIVEC 1
# undef CRYPTOPP_POWER7_AVAILABLE
# undef CRYPTOPP_ALTIVEC_AVAILABLE
#endif

#if (CRYPTOPP_SSE41_AVAILABLE)
# include <emmintrin.h>
# include <tmmintrin.h>
Expand Down
8 changes: 8 additions & 0 deletions blake2s_simd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
# undef CRYPTOPP_ARM_NEON_AVAILABLE
#endif

// BLAKE2s bug on AIX 7.1 (POWER7) with XLC 12.01
// https://github.com/weidai11/cryptopp/issues/743
#if defined(__xlC__) && (__xlC__ < 0x0d01)
# define CRYPTOPP_DISABLE_ALTIVEC 1
# undef CRYPTOPP_POWER7_AVAILABLE
# undef CRYPTOPP_ALTIVEC_AVAILABLE
#endif

#if (CRYPTOPP_SSE41_AVAILABLE)
# include <emmintrin.h>
# include <tmmintrin.h>
Expand Down

0 comments on commit 0998b40

Please sign in to comment.