[0/4] alpha: add IFUNC-based multiarch dispatch

Message ID 20260906-gm-series1-ifunc-infra-v1-0-d409f053327f@gmail.com (mailing list archive)
Headers
Series alpha: add IFUNC-based multiarch dispatch |

Message

Matt Turner Sept. 6, 2026, 7:06 p.m. UTC
  This series adds IFUNC support to the Alpha port and uses it to
dispatch memcpy, memset, and several string functions at runtime
between the existing CPU-specific assembly (EV6/EV67) and a generic
fallback, selected via implver/amask rather than AT_HWCAP.

Future work will improve the generic C implementations enough to let
us drop some of the assembly routines entirely, relying on the
compiler instead; this series is the dispatch infrastructure that
work will build on.

Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Matt Turner (4):
      alpha: treat STO_ALPHA_STD_GPLOAD as a function in abilist.awk
      alpha: add IFUNC support to the dynamic linker
      alpha: add multiarch infrastructure for IFUNC dispatch
      alpha: add multiarch IFUNC dispatchers

 elf/elf.h                                       |  1 +
 scripts/abilist.awk                             |  4 +-
 sysdeps/alpha/alphaev6/multiarch/Implies        |  1 +
 sysdeps/alpha/alphaev67/multiarch/Implies       |  1 +
 sysdeps/alpha/dl-irel.h                         | 51 +++++++++++++++++++
 sysdeps/alpha/dl-machine.h                      | 40 +++++++++++++--
 sysdeps/alpha/multiarch/Makefile                | 22 ++++++++
 sysdeps/alpha/multiarch/dl-symbol-redir-ifunc.h | 35 +++++++++++++
 sysdeps/alpha/multiarch/ifunc-impl-list.c       | 68 +++++++++++++++++++++++++
 sysdeps/alpha/multiarch/init-arch.h             | 65 +++++++++++++++++++++++
 sysdeps/alpha/multiarch/memcpy.c                | 49 ++++++++++++++++++
 sysdeps/alpha/multiarch/memcpy_ev6.S            | 34 +++++++++++++
 sysdeps/alpha/multiarch/memcpy_generic.c        | 26 ++++++++++
 sysdeps/alpha/multiarch/memset.c                | 49 ++++++++++++++++++
 sysdeps/alpha/multiarch/memset_ev5.S            | 33 ++++++++++++
 sysdeps/alpha/multiarch/memset_ev6.S            | 34 +++++++++++++
 sysdeps/alpha/multiarch/rawmemchr.c             | 55 ++++++++++++++++++++
 sysdeps/alpha/multiarch/rawmemchr_ev5.S         | 36 +++++++++++++
 sysdeps/alpha/multiarch/rawmemchr_ev67.S        | 37 ++++++++++++++
 sysdeps/alpha/multiarch/stpcpy.c                | 62 ++++++++++++++++++++++
 sysdeps/alpha/multiarch/stpcpy_ev5.S            | 39 ++++++++++++++
 sysdeps/alpha/multiarch/stpcpy_ev67.S           | 40 +++++++++++++++
 sysdeps/alpha/multiarch/stpncpy.c               | 55 ++++++++++++++++++++
 sysdeps/alpha/multiarch/stpncpy_ev5.S           | 36 +++++++++++++
 sysdeps/alpha/multiarch/stpncpy_ev67.S          | 37 ++++++++++++++
 sysdeps/alpha/multiarch/strcat.c                | 49 ++++++++++++++++++
 sysdeps/alpha/multiarch/strcat_ev5.S            | 33 ++++++++++++
 sysdeps/alpha/multiarch/strcat_ev67.S           | 34 +++++++++++++
 sysdeps/alpha/multiarch/strchr.c                | 50 ++++++++++++++++++
 sysdeps/alpha/multiarch/strchr_ev5.S            | 36 +++++++++++++
 sysdeps/alpha/multiarch/strchr_ev67.S           | 37 ++++++++++++++
 sysdeps/alpha/multiarch/strlen.c                | 49 ++++++++++++++++++
 sysdeps/alpha/multiarch/strlen_ev5.S            | 33 ++++++++++++
 sysdeps/alpha/multiarch/strlen_ev67.S           | 34 +++++++++++++
 sysdeps/alpha/multiarch/strncat.c               | 49 ++++++++++++++++++
 sysdeps/alpha/multiarch/strncat_ev5.S           | 30 +++++++++++
 sysdeps/alpha/multiarch/strncat_ev67.S          | 29 +++++++++++
 37 files changed, 1366 insertions(+), 7 deletions(-)
---
base-commit: fe03757f67e25bc8fea1473572beb30a05508d08
change-id: 20260906-gm-series1-ifunc-infra-92cf5cef6f75

Best regards,
  

Comments

Matt Turner Sept. 16, 2026, 12:17 p.m. UTC | #1
On Sun, Sep 6, 2026 at 3:06 PM Matt Turner <mattst88@gmail.com> wrote:
>
> This series adds IFUNC support to the Alpha port and uses it to
> dispatch memcpy, memset, and several string functions at runtime
> between the existing CPU-specific assembly (EV6/EV67) and a generic
> fallback, selected via implver/amask rather than AT_HWCAP.
>
> Future work will improve the generic C implementations enough to let
> us drop some of the assembly routines entirely, relying on the
> compiler instead; this series is the dispatch infrastructure that
> work will build on.
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>
> ---
> Matt Turner (4):
>       alpha: treat STO_ALPHA_STD_GPLOAD as a function in abilist.awk
>       alpha: add IFUNC support to the dynamic linker
>       alpha: add multiarch infrastructure for IFUNC dispatch
>       alpha: add multiarch IFUNC dispatchers
>

Ping for review (ignore PATCH 1/4. It should be dropped from the series)