VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/DriveFilter.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 00:07:32 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-06-23 00:11:21 (GMT)
commit546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b (patch)
tree7f8bfb3f7e7c6a0aab662fe6dec944cd6ee1a874 /src/Driver/DriveFilter.c
parentab7b5dc685eab3235dd748d8791cb39085ab0394 (diff)
downloadVeraCrypt-546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b.zip
VeraCrypt-546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b.tar.gz
Crypto: Add optimized SHA-512 and SHA-256 assembly implementations for x86_64 and x86. This improves speed by 30%.
Diffstat (limited to 'src/Driver/DriveFilter.c')
-rw-r--r--src/Driver/DriveFilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index 8195fe3..d46bd92 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -330,7 +330,7 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte*
#if !defined (_WIN64)
KFLOATING_SAVE floatingPointState;
NTSTATUS saveStatus = STATUS_SUCCESS;
- if (HasISSE())
+ if (HasISSE()|| (HasSSE2() && HasMMX()))
saveStatus = KeSaveFloatingPointState (&floatingPointState);
#endif
WHIRLPOOL_add (ioBuffer, TC_BOOT_SECTOR_PIM_VALUE_OFFSET, &whirlpool);
@@ -368,7 +368,7 @@ static void ComputeBootLoaderFingerprint(PDEVICE_OBJECT LowerDeviceObject, byte*
}
#if !defined (_WIN64)
- if (NT_SUCCESS (saveStatus) && HasISSE())
+ if (NT_SUCCESS (saveStatus) && (HasISSE() || (HasSSE2() && HasMMX())))
KeRestoreFloatingPointState (&floatingPointState);
#endif
}