Subject: Re: lib/29248: memchr.S
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Geoff Wing <gcw@pobox.com>
List: netbsd-bugs
Date: 02/06/2005 05:44:02
The following reply was made to PR lib/29248; it has been noted by GNATS.

From: Geoff Wing <gcw@pobox.com>
To: "J.T. Conklin" <jtc@acorntoolworks.com>
Cc: NetBSD GNATS <gnats-bugs@netbsd.org>
Subject: Re: lib/29248: memchr.S
Date: Sun, 6 Feb 2005 16:43:53 +1100

 OK,
 this fixes my problems.  Maybe memset.S strchr.S strrchr.S also need similar
 clearing on %ecx.
 
 Regards,
 Geoff
 
 --- memchr.S.org	2005-02-05 10:50:39.000000000 +1100
 +++ memchr.S	2005-02-06 16:37:43.000000000 +1100
 @@ -29,10 +29,12 @@
  	incl	%eax
  	decl	%esi
  	jnz	.Lalign
 +	jmp     .Lzero
  
  .Lword_aligned:
  	/* copy char to all bytes in word */
  	movb	%cl,%ch
 +	andl    $0x0000ffff,%ecx
  	movl	%ecx,%edx
  	sall	$16,%ecx
  	orl	%edx,%ecx