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:
Pavel I. Kryukov 2018-02-18 16:48:44 +03:00 коммит произвёл Simon Tatham
Родитель 5d9d075aac
Коммит f872551cd8
2 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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)