diff --git a/sshsh256.c b/sshsh256.c index 7bb70bd3..eefff7cf 100644 --- a/sshsh256.c +++ b/sshsh256.c @@ -440,7 +440,7 @@ int main(void) { https://github.com/noloader/SHA-Intrinsics */ FUNC_ISA -static void SHA256_ni(SHA256_State * s, const unsigned char *q, int len) { +static void SHA256_ni_(SHA256_State * s, const unsigned char *q, int len) { if (s->blkused && s->blkused+len < BLKSIZE) { /* * Trivial case: just add to the block. @@ -647,6 +647,14 @@ static void SHA256_ni(SHA256_State * s, const unsigned char *q, int len) { } } +/* + * Workaround LLVM bug https://bugs.llvm.org/show_bug.cgi?id=34980 + */ +static void SHA256_ni(SHA256_State * s, const unsigned char *q, int len) +{ + SHA256_ni_(s, q, len); +} + #else /* COMPILER_SUPPORTS_AES_NI */ static void SHA256_ni(SHA256_State * s, const unsigned char *q, int len) diff --git a/sshsha.c b/sshsha.c index 0b31e6d9..b116afc0 100644 --- a/sshsha.c +++ b/sshsha.c @@ -521,7 +521,7 @@ int supports_sha_ni(void) https://github.com/noloader/SHA-Intrinsics */ FUNC_ISA -static void sha1_ni(SHA_State * s, const unsigned char *q, int len) +static void sha1_ni_(SHA_State * s, const unsigned char *q, int len) { if (s->blkused && s->blkused + len < 64) { /* @@ -725,6 +725,14 @@ static void sha1_ni(SHA_State * s, const unsigned char *q, int len) } } +/* + * Workaround LLVM bug https://bugs.llvm.org/show_bug.cgi?id=34980 + */ +static void sha1_ni(SHA_State * s, const unsigned char *q, int len) +{ + sha1_ni_(s, q, len); +} + #else /* COMPILER_SUPPORTS_AES_NI */ static void sha1_ni(SHA_State * s, const unsigned char *q, int len)