diff options
author | David Carlier <dcarlier@afilias.info> | 2019-05-23 04:32:44 +0000 |
---|---|---|
committer | Inada Naoki <songofacandy@gmail.com> | 2019-05-23 13:32:44 +0900 |
commit | 51aa35e9e17eef60d04add9619fe2a7eb938358c (patch) | |
tree | 87251bf2800e940f6872fa45d84342bb1dc455ec /Modules/_blake2/impl/blake2s-round.h | |
parent | 20e1e2582e5e69e43af88ff58699c8883d146acb (diff) | |
download | cpython-git-51aa35e9e17eef60d04add9619fe2a7eb938358c.tar.gz |
bpo-33164: update blake2 implementation (GH-6286)
Diffstat (limited to 'Modules/_blake2/impl/blake2s-round.h')
-rw-r--r-- | Modules/_blake2/impl/blake2s-round.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/Modules/_blake2/impl/blake2s-round.h b/Modules/_blake2/impl/blake2s-round.h index 7470d928a2..1e2f2b7f59 100644 --- a/Modules/_blake2/impl/blake2s-round.h +++ b/Modules/_blake2/impl/blake2s-round.h @@ -1,22 +1,23 @@ /* BLAKE2 reference source code package - optimized C implementations - - Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the - terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at - your option. The terms of these licenses can be found at: - - - CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0 - - OpenSSL license : https://www.openssl.org/source/license.html - - Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0 - - More information about the BLAKE2 hash function can be found at - https://blake2.net. + + Written in 2012 by Samuel Neves <sneves@dei.uc.pt> + + To the extent possible under law, the author(s) have dedicated all copyright + and related and neighboring rights to this software to the public domain + worldwide. This software is distributed without any warranty. + + You should have received a copy of the CC0 Public Domain Dedication along with + this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. */ #pragma once #ifndef __BLAKE2S_ROUND_H__ #define __BLAKE2S_ROUND_H__ -#define LOADU(p) _mm_loadu_si128( (const __m128i *)(p) ) +#define LOAD(p) _mm_load_si128( (__m128i *)(p) ) +#define STORE(p,r) _mm_store_si128((__m128i *)(p), r) + +#define LOADU(p) _mm_loadu_si128( (__m128i *)(p) ) #define STOREU(p,r) _mm_storeu_si128((__m128i *)(p), r) #define TOF(reg) _mm_castsi128_ps((reg)) @@ -68,7 +69,7 @@ #if defined(HAVE_XOP) #include "blake2s-load-xop.h" -#elif defined(HAVE_SSE41) +#elif defined(HAVE_SSE4_1) #include "blake2s-load-sse41.h" #else #include "blake2s-load-sse2.h" |