[PATCH] X86-64: Add _dl_runtime_resolve_avx[512]_opt [BZ #20508]

Florian Weimer fweimer@redhat.com
Tue Oct 4 15:24:00 GMT 2016


On 10/04/2016 04:47 PM, H.J. Lu wrote:
> On Tue, Oct 4, 2016 at 3:52 AM, Florian Weimer <fweimer@redhat.com> wrote:
>> On 09/27/2016 07:35 PM, H.J. Lu wrote:
>>
>>>> Any comments? I will check it in next week if there is no objection.
>>>
>>>
>>> I'd like to backport it to 2.23 and 2.24 branches.  Any objections?
>>
>>
>> Just this change, or the requirement for an AVX512F-capable assembler as
>> well?
>>
>
> Good question.  This is also needed:
>
> commit f43cb35c9b3c35addc6dc0f1427caf51786ca1d2
> Author: H.J. Lu <hjl.tools@gmail.com>
> Date:   Fri Jul 1 05:54:43 2016 -0700
>
>     Require binutils 2.24 to build x86-64 glibc [BZ #20139]
>
>     If assembler doesn't support AVX512DQ, _dl_runtime_resolve_avx is used
>     to save the first 8 vector registers, which only saves the lower 256
>     bits of vector register, for lazy binding.  When it is called on AVX512
>     platform, the upper 256 bits of ZMM registers are clobbered.  Parameters
>     passed in ZMM registers will be wrong when the function is called the
>     first time.  This patch requires binutils 2.24, whose assembler can store
>     and load ZMM registers, to build x86-64 glibc.  Since mathvec library
>     needs assembler support for AVX512DQ,  we disable mathvec if assembler
>     doesn't support AVX512DQ.

That's not really backportable, I'm afraid.  Our users don't expect we 
break builds in this way.

Florian



More information about the Libc-alpha mailing list