This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RFC: Automatically test IFUNC implementations
On Wed, Sep 26, 2012 at 8:40 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 09/26/2012 12:18 AM, Andreas Jaeger wrote:
>> So, if let's say memcpy_1 and memcpy_2 are for different machines, you
>> would need to create a temporary list and fill that with either of these?
>> Would this work with your framework?
>
> return test ? memcpy_1_list : memcpy_2_list;
>
> Both are just as static const as HJL's examples.
>
That is true. The only requirement for __libc_func is:
/* Return the NULL terminated array of IFUNC implementations supported
on target machine. */
extern const struct libc_func_test *__libc_func (const char *);
Each architecture has total freedom how to implement
__libc_func. test_init calls __libc_func to get the list of IFUNC
implementations supported on target and FOR_EACH_IMPL
tests them one by one.
--
H.J.