Skip to content

Commit

Permalink
select: chase new glibc ifunc logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene committed Mar 15, 2024
1 parent 50fb485 commit d86f193
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/select.h
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
}

Expand Down

0 comments on commit d86f193

Please sign in to comment.