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] Clean up SSE variable shifts


On Tue, Aug 24, 2010 at 6:50 AM, Ulrich Drepper <drepper@redhat.com> wrote:
> ----- "Hongjiu Lu" <hongjiu.lu@intel.com> wrote:
>> Replace palignr with unaligned load, replace intrinsic with pshufb +
>> unaligned load
>
> I guess we should use this code then. ?Do you want to send a patch?
>
> --

Here is a patch.  Tested on 32bit/64bit Intel/Core i7.


-- 
H.J.
---
2010-08-24  Richard Henderson  <rth@redhat.com>
	    Ulrich Drepper  <drepper@redhat.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
	varshift.
	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Likewise.

	* sysdeps/x86_64/multiarch/strcspn-c.c: Include "varshift.h".
	Replace _mm_srli_si128 with __m128i_shift_right.  Replace
	_mm_alignr_epi8 with _mm_loadu_si128.
	* sysdeps/x86_64/multiarch/strspn-c.c: Likwise.

	* sysdeps/x86_64/multiarch/strstr.c: Include "varshift.h".
	(__m128i_shift_right): Removed.

	* sysdeps/i386/i686/multiarch/varshift.h: New.
	* sysdeps/i386/i686/multiarch/varshift.S: Likwise.
	* sysdeps/x86_64/multiarch/varshift.h: Likwise.
	* sysdeps/x86_64/multiarch/varshift.S: Likwise.

Attachment: libc-varshift-1.patch
Description: Text document


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