From 546d6cff4447a56bbf7c0e1a8b6f89dba5d3183b Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 23 Jun 2017 02:07:32 +0200 Subject: Crypto: Add optimized SHA-512 and SHA-256 assembly implementations for x86_64 and x86. This improves speed by 30%. --- src/Common/Tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Common/Tests.c') diff --git a/src/Common/Tests.c b/src/Common/Tests.c index cf0c8699..c70954a6 100644 --- a/src/Common/Tests.c +++ b/src/Common/Tests.c @@ -584,7 +584,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE) #if defined (DEVICE_DRIVER) && !defined (_WIN64) KFLOATING_SAVE floatingPointState; NTSTATUS saveStatus = STATUS_SUCCESS; - if (bUseSSE && (HasSSE2() || HasSSE41())) + if (bUseSSE && (HasISSE() || HasSSE2())) saveStatus = KeSaveFloatingPointState (&floatingPointState); #endif while (vector[i].hexInput && vector[i].hexOutput) @@ -601,7 +601,7 @@ BOOL RunHashTest (HashFunction fn, HashTestVector* vector, BOOL bUseSSE) } #if defined (DEVICE_DRIVER) && !defined (_WIN64) - if (NT_SUCCESS (saveStatus) && bUseSSE && (HasSSE2() || HasSSE41())) + if (NT_SUCCESS (saveStatus) && bUseSSE && (HasISSE() || HasSSE2())) KeRestoreFloatingPointState (&floatingPointState); #endif -- cgit v1.2.3