Fwd: PATCH: optimized expf for x86_32

Dmitrieva Liubov liubov.dmitrieva@gmail.com
Fri May 11 17:45:00 GMT 2012


Fixed version is attached.
Thanks.

--
Liubov Dmitrieva

2012/5/11 H.J. Lu <hjl.tools@gmail.com>:
> On Thu, May 10, 2012 at 11:06 PM, Dmitrieva Liubov
> <liubov.dmitrieva@gmail.com> wrote:
>> Fixed. New patch is attached.
>>
>> ChangeLog:
>>
>> 2012-05-10  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>
>>
>>      * sysdeps/i386/i686/fpu/multiarch/: New folder.
>>      * sysdeps/i386/i686/fpu/multiarch/Makefile: New file.
>>      * sysdeps/i386/i686fpu/multiarch/e_expf.S: New file.
>>      * sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: New file.
>>      * sysdeps/i386/i686/multiarch/Makefile: Update.
>>     Add ifunc support for libm.
>>
>>
>
> +ENTRY(__ieee754_expf)
> +       .type   __ieee754_expf, @gnu_indirect_function
> +       pushl   %ebx
> +       cfi_adjust_cfa_offset (4)
> +       cfi_rel_offset (ebx, 0)
> +       LOAD_PIC_REG(bx)
> +       cmpl    $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
> +       jne     1f
> +       call    __init_cpu_features
> +1:     leal    __ieee754_expf_ia32@GOTOFF(%ebx), %eax
> +       testl   $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
> +       jz      2f
> +       leal    __ieee754_expf_sse2@GOTOFF(%ebx), %eax
> +2:     popl    %ebx
> +       cfi_adjust_cfa_offset (-4);
> +       cfi_restore (ebx)
> +       ret
> +END(__ieee754_expf)
>
> This is wrong.  Since libm is outside of libc, you should use
> __get_cpu_features.
>
> +ifeq ($(subdir),math)
> +libm-sysdep_routines += init-arch
> +gen-as-const-headers += ifunc-defines.sym
> +endif
>
> Please remove them.
>
> --
> H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expf_x86_32.patch
Type: application/octet-stream
Size: 12708 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120511/71c4502d/attachment.obj>


More information about the Libc-alpha mailing list