Disable the new hashing aligned build option by default. Does not increase performance... the memcpy is faster than the alignment check on modern CPU's. Embedded systems may benefit from this though, so leaving support for it in place.

This commit is contained in:
David Garske
2019-09-26 11:49:33 -07:00
parent 4c709f1f2c
commit 6bfe6761d8
3 changed files with 0 additions and 20 deletions

View File

@ -154,14 +154,8 @@ static int Transform_Len(wc_Md5* md5, const byte* data, word32 len)
#define HAVE_MD5_CUST_API
#else
#define NEED_SOFT_MD5
#endif /* End Hardware Acceleration */
#ifndef WC_MD5_DATA_ALIGNMENT
/* default to 32-bit alignement */
#define WC_MD5_DATA_ALIGNMENT 4
#endif
#ifdef NEED_SOFT_MD5
#define XTRANSFORM(S,B) Transform((S),(B))

View File

@ -326,14 +326,8 @@
return ret;
}
#endif /* End Hardware Acceleration */
#ifndef WC_SHA_DATA_ALIGNMENT
/* default to 32-bit alignement */
#define WC_SHA_DATA_ALIGNMENT 4
#endif
/* Software implementation */
#ifdef USE_SHA_SOFTWARE_IMPL

View File

@ -201,9 +201,6 @@ static int InitSha256(wc_Sha256* sha256)
/* in case intel instructions aren't available, plus we need the K[] global */
#define NEED_SOFT_SHA256
/* requires 128-bit alignment */
#define WC_SHA256_DATA_ALIGNMENT 16
/*****
Intel AVX1/AVX2 Macro Control Structure
@ -614,11 +611,6 @@ static int InitSha256(wc_Sha256* sha256)
}
#endif /* End Hardware Acceleration */
#ifndef WC_SHA256_DATA_ALIGNMENT
/* default is 32-bit alignment required */
#define WC_SHA256_DATA_ALIGNMENT 4
#endif
#ifdef NEED_SOFT_SHA256
static const ALIGN32 word32 K[64] = {