This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fwd: PATCH: optimized expf for x86_32
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.