зеркало из https://github.com/github/putty.git
Work around LLVM bug 34980
Clang generates an internal failure if the same function has different target attributes in definition and declaration. To work around that, we made a proxy predeclared function without target attribute.
This commit is contained in:
Родитель
5d9d075aac
Коммит
f872551cd8
10
sshsh256.c
10
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)
|
||||
|
|
10
sshsha.c
10
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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче