From d86f193da92f8df52b6ff9836587bff419251e1d Mon Sep 17 00:00:00 2001 From: Xyene Date: Fri, 15 Mar 2024 19:35:20 +0000 Subject: [PATCH] select: chase new glibc ifunc logic --- src/select.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/select.h b/src/select.h index d7e346a..658b9f7 100644 --- a/src/select.h +++ b/src/select.h @@ -1,4 +1,7 @@ static memcpy_t *CONCAT(select_, FUNCTION)(void) { + if (erms || fsrm) + return CONCAT(FUNCTION, _erms); + if (avx512f && !prefer_no_avx512) { if (avx512vl) { if (erms) @@ -28,16 +31,14 @@ static memcpy_t *CONCAT(select_, FUNCTION)(void) { } } - if (!ssse3 || fast_unaligned_copy) { - if (erms) - return CONCAT(FUNCTION, _sse2_unaligned_erms); - return CONCAT(FUNCTION, _sse2_unaligned); + if (ssse3 && !fast_unaligned_copy) { + return CONCAT(FUNCTION, _ssse3); } - if (fast_copy_backward) - return CONCAT(FUNCTION, _ssse3_back); + if (erms) + return CONCAT(FUNCTION, _sse2_unaligned_erms); - return CONCAT(FUNCTION, _ssse3); + return CONCAT(FUNCTION, _sse2_unaligned); } static int CONCAT(available_, FUNCTION)(memcpy_t **functions) { @@ -53,7 +54,6 @@ static int CONCAT(available_, FUNCTION)(memcpy_t **functions) { } if (ssse3 && xmm) { - functions[count++] = CONCAT(FUNCTION, _ssse3_back); functions[count++] = CONCAT(FUNCTION, _ssse3); }