VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2021-01-01 23:58:06 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2021-01-02 01:16:31 +0100
commit9881744c95737264c7cd9f13b3c70042c03584aa (patch)
treed3400963fd7884c674a622c052e23b585f3e9043 /src/Crypto/cpu.h
parentdc3700e8bb53bac72eb429554ef6a017ae071fde (diff)
downloadVeraCrypt-9881744c95737264c7cd9f13b3c70042c03584aa.tar.gz
VeraCrypt-9881744c95737264c7cd9f13b3c70042c03584aa.zip
Windows: Add support for ARM64 platform (e.g. Microsoft Surface Pro X). System encryption still not implemented on ARM64
Diffstat (limited to 'src/Crypto/cpu.h')
-rw-r--r--src/Crypto/cpu.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h
index e7affaef..e4e05a0c 100644
--- a/src/Crypto/cpu.h
+++ b/src/Crypto/cpu.h
@@ -30,15 +30,19 @@
#if defined(__cplusplus)
extern "C" {
#endif
+#if defined(_M_X64) || defined (_M_IX86) || defined (_M_IX86_FP)
extern unsigned __int64 __rdtsc();
+#endif
#if defined(__cplusplus)
}
#endif
#else
#include <intrin.h>
+#if defined(_M_X64) || defined (_M_IX86) || defined (_M_IX86_FP)
#pragma intrinsic(__rdtsc)
#endif
#endif
+#endif
#ifdef CRYPTOPP_GENERATE_X64_MASM
@@ -260,8 +264,28 @@ void DisableCPUExtendedFeatures ();
#else
+#define HasSSE2() 0
+#define HasISSE() 0
+
+#define HasMMX() 0
+#define HasSSE42() 0
+#define HasSSE41() 0
+#define HasSAVX() 0
+#define HasSAVX2() 0
+#define HasSBMI2() 0
+#define HasSSSE3() 0
+#define HasAESNI() 0
+#define HasCLMUL() 0
+#define IsP4() 0
+#define HasRDRAND() 0
+#define HasRDSEED() 0
+#define IsCpuIntel() 0
+#define IsCpuAMD() 0
#define GetCacheLineSize() CRYPTOPP_L1_CACHE_LINE_SIZE
+#define DetectX86Features()
+#define DisableCPUExtendedFeatures()
+
#endif
#endif