[PATCH]: Sparc SUN4V Niagara optimized memset/memcpy

Ulrich Drepper drepper@redhat.com
Wed Mar 1 15:49:00 GMT 2006


David S. Miller wrote:

> +ENTRY(memset)
> +	/* %o0=buf, %o1=pat, %o2=len */
> +	and		%o1, 0xff, %o3
> +	mov		%o2, %o1
> +	sllx		%o3, 8, %g1
> +	or		%g1, %o3, %o2
> +	sllx		%o2, 16, %g1
> +	or		%g1, %o2, %o2
> +	sllx		%o2, 32, %g1
> +	ba,pt		%XCC, 1f
> +	 or		%g1, %o2, %o2
> +
> +ENTRY(__bzero)

This is confusing data.  No two functions should overlap.  I suggest to
make bzero a little function calling memset similar to what you did with
bcopy.

Second, add cfi.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-hacker/attachments/20060301/cb2740ff/attachment.sig>


More information about the Libc-hacker mailing list