This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Rewrite x86-64 IFUNC selector in C



On 30/05/2017 17:13, H.J. Lu wrote:
> On Tue, May 30, 2017 at 12:50 PM, Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>> On 30/05/2017 13:24, H.J. Lu wrote:
>>> On Mon, May 29, 2017 at 1:34 PM, Adhemerval Zanella
>>> <adhemerval.zanella@linaro.org> wrote:
>>>>
>>>> I think we can simplify it further and use the already existent ifunc macros on
>>>> libc-symbols.h.  Also, for memmove I think we can organize the code better (at
>>>> least for ifunc) and build a extra object with a more meaningful name.  I used
>>>> your logic for the ifunc selection and extended for memmove as well.
>>>>
>>> Here is the combined patch.
>>
>>
>>> diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
>>> index 3736f54..8a6ff00 100644
>>> --- a/sysdeps/x86_64/multiarch/Makefile
>>> +++ b/sysdeps/x86_64/multiarch/Makefile
>>> @@ -19,6 +19,7 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 \
>>>                  strchr-sse2-no-bsf memcmp-ssse3 strstr-sse2-unaligned \
>>>                  strcspn-c strpbrk-c strspn-c varshift \
>>>                  memset-avx512-no-vzeroupper \
>>> +                memmove-sse2-unaligned-erms \
>>
>> I still think this is a misleading name file since it build not only memmove but
>> also memcpy and mempcpy implementations.  I would prefer to rename to a more
>> general name as in my suggestion.
> 
> I'd like to keep it consistent with memmove-avx-unaligned-erms.S and
> memmove-avx512-unaligned-erms.S.   As for making memcpy an alias
> of memmove, and embedding mempcpy, __memcpy_chk,
> __mempcpy_chk, __memmove_chk is an implementation detail.
> 

Alright, at least I think it should add some comments that the object
is building multiple symbols (it wasn't clear when I started to work
on the patch).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]