VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Crypto/cpu.c')
-rw-r--r--src/Crypto/cpu.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/Crypto/cpu.c b/src/Crypto/cpu.c
index 30263361..e611e9bb 100644
--- a/src/Crypto/cpu.c
+++ b/src/Crypto/cpu.c
@@ -139,13 +139,8 @@ static int TrySSE2()
#if CRYPTOPP_BOOL_X64
return 1;
#elif defined(CRYPTOPP_MS_STYLE_INLINE_ASSEMBLY) && !defined(_UEFI)
volatile int result = 1;
-#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64)
- KFLOATING_SAVE floatingPointState;
- if (NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)))
- {
-#endif
__try
{
#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
AS2(por xmm0, xmm0) // executing SSE2 instruction
@@ -157,14 +152,8 @@ static int TrySSE2()
__except (EXCEPTION_EXECUTE_HANDLER)
{
result = 0;
}
-#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64)
- KeRestoreFloatingPointState (&floatingPointState);
- }
- else
- return 0;
-#endif
return result;
#elif !defined(_UEFI)
// longjmp and clobber warnings. Volatile is required.
// http://github.com/weidai11/cryptopp/issues/24
@@ -292,19 +281,9 @@ static int Detect_MS_HyperV_AES ()
memcpy (HvProductName, &cpuid[1], 12);
HvProductName[12] = 0;
if (_stricmp(HvProductName, "Microsoft Hv") == 0)
{
-#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64)
- KFLOATING_SAVE floatingPointState;
- if (NT_SUCCESS (KeSaveFloatingPointState (&floatingPointState)))
- {
-#endif
hasAesNI = TryAESNI ();
-
-#if defined (TC_WINDOWS_DRIVER) && !defined (_WIN64)
- KeRestoreFloatingPointState (&floatingPointState);
- }
-#endif
}
return hasAesNI;
}