From f02882ce60b0646168cd4d561293cf489c205866 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 30 Jan 2019 00:14:38 +0100 Subject: Help compiler optimize some crypto code on 64-bit build since x64 capable CPUs always support SSE and SSE2 --- src/Crypto/cpu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h index cddec05c..8856a3e2 100644 --- a/src/Crypto/cpu.h +++ b/src/Crypto/cpu.h @@ -208,8 +208,13 @@ int CpuId(uint32 input, uint32 *output); // been enabled by DetectX86Features. void DisableCPUExtendedFeatures (); +#ifdef CRYPTOPP_BOOL_X64 +#define HasSSE2() 1 +#define HasISSE() 1 +#else #define HasSSE2() g_hasSSE2 #define HasISSE() g_hasISSE +#endif #define HasMMX() g_hasMMX #define HasSSE42() g_hasSSE42 #define HasSSE41() g_hasSSE41 -- cgit v1.2.3