VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-30 00:14:38 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-01-30 00:46:10 +0100
commitf02882ce60b0646168cd4d561293cf489c205866 (patch)
tree9d66b452eade72a4a28054f09482067554821475 /src/Crypto/cpu.h
parentb294cc2e1c83e780680d55e519926592a93362f6 (diff)
downloadVeraCrypt-f02882ce60b0646168cd4d561293cf489c205866.tar.gz
VeraCrypt-f02882ce60b0646168cd4d561293cf489c205866.zip
Help compiler optimize some crypto code on 64-bit build since x64 capable CPUs always support SSE and SSE2
Diffstat (limited to 'src/Crypto/cpu.h')
-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 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