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: PATCH: Use IFUNC on x86-64 memset


On Fri, Nov 5, 2010 at 6:02 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> On Fri, Nov 5, 2010 at 19:10, H.J. Lu <hongjiu.lu@intel.com> wrote:
>> + ? ? ?/* Intel processors prefers SSE instructions for memory/string
>> + ? ? ? ?routines if they are avaiable. ?*/
>> + ? ? ?__cpu_features.feature[index_Prefer_SSE] |= bit_Prefer_SSE;
>
> In general OK but I don't like the name of the bit. ?There might be
> later conflicting decisions, i.e., maybe sometimes SSE is not
> preferred. ?Then the macro name s misleading.
>
> The comment you have here already says it better. ?Use
> _Prefer_SSE_for_memop or something of that kind.
>

Here is the updated patch.

Thanks.

-- 
H.J.
----
2010-11-05  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/x86_64/memset.S: Check USE_MULTIARCH and USE_SSE2 for
	IFUNC support.

	* sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
	memset-x86-64.

	* sysdeps/x86_64/multiarch/bzero.S: New.
	* sysdeps/x86_64/multiarch/cacheinfo.c:Likewise.
	* sysdeps/x86_64/multiarch/memset-x86-64.S: Likewise.
	* sysdeps/x86_64/multiarch/memset.S: Likewise.
	* sysdeps/x86_64/multiarch/memset_chk.S: Likewise.

	* sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features):
	Set bit_Prefer_SSE_for_memop for Intel processors.

	* sysdeps/x86_64/multiarch/init-arch.h (bit_Prefer_SSE_for_memop):
	New.
	(index_Prefer_SSE_for_memop): Likewise.
	(HAS_PREFER_SSE_FOR_MEMOP): Likewise.

Attachment: libc-memset-ifunc-2.patch
Description: Text document


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