mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 09:59:42 +00:00
Re-enable AES-NI/CLMUL when using Clang Integrated Assembler (part of Issue 226)
This commit is contained in:
parent
737f5b0b72
commit
d83a7e08a9
12
gcm.cpp
12
gcm.cpp
@ -12,11 +12,9 @@
|
||||
#ifndef CRYPTOPP_IMPORTS
|
||||
#ifndef CRYPTOPP_GENERATE_X64_MASM
|
||||
|
||||
// Clang 3.3 integrated assembler crash on Linux. MacPorts GCC compile error.
|
||||
#if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
// Clang 3.3 integrated assembler crash on Linux.
|
||||
#if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400))
|
||||
# undef CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
|
||||
# undef CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE
|
||||
# undef CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
|
||||
#endif
|
||||
|
||||
// SunCC 5.13 and below crash with AES-NI/CLMUL and C++{03|11}. Disable one or the other.
|
||||
@ -889,7 +887,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
AS2( pxor xmm5, xmm2 )
|
||||
|
||||
AS2( psrldq xmm0, 15 )
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000)
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
AS2( movd edi, xmm0 )
|
||||
#elif (defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION)) && defined(CRYPTOPP_X64_ASM_AVAILABLE)
|
||||
AS2( mov WORD_REG(di), xmm0 )
|
||||
@ -904,7 +902,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
AS2( pxor xmm4, xmm5 )
|
||||
|
||||
AS2( psrldq xmm1, 15 )
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000)
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
AS2( movd edi, xmm1 )
|
||||
#elif (defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION)) && defined(CRYPTOPP_X64_ASM_AVAILABLE)
|
||||
AS2( mov WORD_REG(di), xmm1 )
|
||||
@ -915,7 +913,7 @@ size_t GCM_Base::AuthenticateBlocks(const byte *data, size_t len)
|
||||
AS2( shl eax, 8 )
|
||||
|
||||
AS2( psrldq xmm0, 15 )
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000)
|
||||
#if (CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70000) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER)
|
||||
AS2( movd edi, xmm0 )
|
||||
#elif (defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION)) && defined(CRYPTOPP_X64_ASM_AVAILABLE)
|
||||
AS2( mov WORD_REG(di), xmm0 )
|
||||
|
Loading…
Reference in New Issue
Block a user