Help compiler optimize some crypto code on 64-bit build since x64 capable CPUs always support SSE and SSE2

This commit is contained in:
Mounir IDRASSI 2019-01-30 00:14:38 +01:00
parent b294cc2e1c
commit f02882ce60
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F
1 changed files with 5 additions and 0 deletions

View File

@ -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