VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-29 23:14:38 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-29 23:46:10 (GMT)
commitf02882ce60b0646168cd4d561293cf489c205866 (patch)
tree9d66b452eade72a4a28054f09482067554821475
parentb294cc2e1c83e780680d55e519926592a93362f6 (diff)
downloadVeraCrypt-f02882ce60b0646168cd4d561293cf489c205866.zip
VeraCrypt-f02882ce60b0646168cd4d561293cf489c205866.tar.gz
Help compiler optimize some crypto code on 64-bit build since x64 capable CPUs always support SSE and SSE2
-rw-r--r--src/Crypto/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h
index cddec05..8856a3e 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