mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
Cleanup comments and old code artifacts
This commit is contained in:
parent
e8bed05b7d
commit
c49b6d4d71
10
GNUmakefile
10
GNUmakefile
@ -98,7 +98,7 @@ ifeq ($(IS_AIX),1)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Newlib needs _XOPEN_SOURCE=700 for signals
|
||||
# Newlib needs _XOPEN_SOURCE=600 for signals
|
||||
HAS_NEWLIB := $(shell $(CXX) -x c++ $(CXXFLAGS) -dM -E adhoc.cpp.proto 2>&1 | $(GREP) -i -c "__NEWLIB__")
|
||||
|
||||
###########################################################
|
||||
@ -267,25 +267,25 @@ endif # -DCRYPTOPP_DISABLE_SSSE3
|
||||
|
||||
# Begin SunCC
|
||||
ifeq ($(SUN_COMPILER),1)
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=ssse3 -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal value ignored")
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=ssse3 -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal")
|
||||
ifeq ($(COUNT),0)
|
||||
SSSE3_FLAG = -xarch=ssse3 -D__SSSE3__=1
|
||||
ARIA_FLAG = -xarch=ssse3 -D__SSSE3__=1
|
||||
LDFLAGS += -xarch=ssse3
|
||||
endif
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sse4_2 -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal value ignored")
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sse4_2 -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal")
|
||||
ifeq ($(COUNT),0)
|
||||
BLAKE2_FLAG = -xarch=sse4_2 -D__SSE4_2__=1
|
||||
CRC_FLAG = -xarch=sse4_2 -D__SSE4_2__=1
|
||||
LDFLAGS += -xarch=sse4_2
|
||||
endif
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=aes -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal value ignored")
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=aes -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal")
|
||||
ifeq ($(COUNT),0)
|
||||
GCM_FLAG = -xarch=aes -D__PCLMUL__=1
|
||||
AES_FLAG = -xarch=aes -D__AES__=1
|
||||
LDFLAGS += -xarch=aes
|
||||
endif
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sha -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal value ignored")
|
||||
COUNT := $(shell $(CXX) $(CXXFLAGS) -E -xarch=sha -xdumpmacros /dev/null 2>&1 | $(GREP) -i -c "illegal")
|
||||
ifeq ($(COUNT),0)
|
||||
SHA_FLAG = -xarch=sha -D__SHA__=1
|
||||
LDFLAGS += -xarch=sha
|
||||
|
@ -30,24 +30,16 @@
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#ifdef CRYPTOPP_GNU_STYLE_INLINE_ASSEMBLY
|
||||
# include <signal.h>
|
||||
# include <setjmp.h>
|
||||
#endif
|
||||
|
||||
#ifndef EXCEPTION_EXECUTE_HANDLER
|
||||
# define EXCEPTION_EXECUTE_HANDLER 1
|
||||
#endif
|
||||
|
||||
// Clang __m128i casts, http://bugs.llvm.org/show_bug.cgi?id=20670
|
||||
#define M128_CAST(x) ((__m128i *)(void *)(x))
|
||||
#define CONST_M128_CAST(x) ((const __m128i *)(const void *)(x))
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
// Sun Studio 12.3 and earlier lack SSE2's _mm_set_epi64x. Win32 lacks _mm_set_epi64x, Win64 supplies it except for VS2008.
|
||||
// Also see http://stackoverflow.com/a/38547909/608639
|
||||
#if CRYPTOPP_SSE2_INTRIN_AVAILABLE && ((__SUNPRO_CC >= 0x5100 && __SUNPRO_CC < 0x5130) || (defined(_MSC_VER) && _MSC_VER < 1600) || (defined(_M_IX86) && _MSC_VER >= 1600))
|
||||
// Sun Studio 12.3 and earlier lack SSE2's _mm_set_epi64x. Win32 lacks _mm_set_epi64x,
|
||||
// Win64 supplies it except for VS2008. See http://stackoverflow.com/a/38547909/608639
|
||||
#if CRYPTOPP_SSE2_INTRIN_AVAILABLE && ((__SUNPRO_CC >= 0x5100 && __SUNPRO_CC < 0x5130) || \
|
||||
(defined(_MSC_VER) && _MSC_VER < 1600) || (defined(_M_IX86) && _MSC_VER >= 1600))
|
||||
inline __m128i MM_SET_EPI64X(const word64 a, const word64 b)
|
||||
{
|
||||
const word64 t[2] = {b,a}; __m128i r;
|
||||
|
22
blake2.cpp
22
blake2.cpp
@ -89,32 +89,26 @@ typedef void (*pfnCompress64)(const byte*, BLAKE2_State<word64, true>&);
|
||||
|
||||
pfnCompress64 InitializeCompress64Fn()
|
||||
{
|
||||
return
|
||||
#if CRYPTOPP_SSE41_AVAILABLE
|
||||
if (HasSSE41())
|
||||
return &BLAKE2_Compress64_SSE4;
|
||||
else
|
||||
HasSSE41() ? &BLAKE2_Compress64_SSE4 :
|
||||
#endif
|
||||
#if CRYPTOPP_BOOL_ARM32 && CRYPTOPP_ARM_NEON_AVAILABLE
|
||||
if (HasNEON())
|
||||
return &BLAKE2_Compress64_NEON;
|
||||
else
|
||||
HasNEON() ? &BLAKE2_Compress64_NEON :
|
||||
#endif
|
||||
return &BLAKE2_Compress64_CXX;
|
||||
&BLAKE2_Compress64_CXX;
|
||||
}
|
||||
|
||||
pfnCompress32 InitializeCompress32Fn()
|
||||
{
|
||||
return
|
||||
#if CRYPTOPP_SSE41_AVAILABLE
|
||||
if (HasSSE41())
|
||||
return &BLAKE2_Compress32_SSE4;
|
||||
else
|
||||
HasSSE41() ? &BLAKE2_Compress32_SSE4 :
|
||||
#endif
|
||||
#if CRYPTOPP_BOOL_ARM32 && CRYPTOPP_ARM_NEON_AVAILABLE
|
||||
if (HasNEON())
|
||||
return &BLAKE2_Compress32_NEON;
|
||||
else
|
||||
HasNEON() ? &BLAKE2_Compress32_NEON :
|
||||
#endif
|
||||
return &BLAKE2_Compress32_CXX;
|
||||
&BLAKE2_Compress32_CXX;
|
||||
}
|
||||
|
||||
ANONYMOUS_NAMESPACE_END
|
||||
|
Loading…
Reference in New Issue
Block a user