glibc/sysdeps
Evan Green a29bb320a1
riscv: Enable multi-arg ifunc resolvers
RISC-V is apparently the first architecture to pass more than one
argument to ifunc resolvers. The helper macros in libc-symbols.h,
__ifunc_resolver(), __ifunc(), and __ifunc_hidden(), are incompatible
with this. These macros have an "arg" (non-final) parameter that
represents the parameter signature of the ifunc resolver. The result is
an inability to pass the required comma through in a single preprocessor
argument.

Rearrange the __ifunc_resolver() macro to be variadic, and pass the
types as those variable parameters. Move the guts of __ifunc() and
__ifunc_hidden() into new macros, __ifunc_args(), and
__ifunc_args_hidden(), that pass the variable arguments down through to
__ifunc_resolver(). Then redefine __ifunc() and __ifunc_hidden(), which
are used in a bunch of places, to simply shuffle the arguments down into
__ifunc_args[_hidden]. Finally, define a riscv-ifunc.h header, which
provides convenience macros to those looking to write ifunc selectors
that use both arguments.

Signed-off-by: Evan Green <evan@rivosinc.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-03-01 07:14:59 -08:00
..
aarch64 aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR 2024-02-26 09:45:50 -03:00
alpha string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arc string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
arm arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405) 2024-02-23 08:50:00 -03:00
csky Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
generic string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
gnu Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hppa Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
htl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
hurd Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
i386 x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers 2024-02-28 09:02:56 -08:00
ieee754 Rename c2x / gnu2x tests to c23 / gnu23 2024-02-01 17:55:57 +00:00
loongarch Apply the Makefile sorting fix 2024-02-15 11:19:56 -08:00
m68k string: Use builtins for ffs and ffsll 2024-02-01 09:31:33 -03:00
mach Implement setcontext/getcontext/makecontext/swapcontext for Hurd x86_64 2024-02-17 21:45:35 +01:00
microblaze Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
mips math: Update mips64 ulps 2024-02-22 21:28:25 +01:00
nios2 Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
nptl Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
or1k Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
posix Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
powerpc powerpc: Remove power7 strstr optimization 2024-02-23 08:50:00 -03:00
pthread Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
riscv riscv: Enable multi-arg ifunc resolvers 2024-03-01 07:14:59 -08:00
s390 s390: Improve static-pie configure tests 2024-02-28 10:09:53 -03:00
sh Refer to C23 in place of C2X in glibc 2024-02-01 11:02:01 +00:00
sparc sparc: Treat the version field in the FPU control word as reserved 2024-02-19 10:55:50 -03:00
unix riscv: Add __riscv_hwprobe pointer to ifunc calls 2024-03-01 07:14:58 -08:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
x86 x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers 2024-02-29 04:30:01 -08:00
x86_64 x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers 2024-02-29 04:30:01 -08:00