This is the mail archive of the libc-alpha@sources.redhat.com 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] memset.S and PowerPC


Steven Munroe <sjmunroe@vnet.ibm.com> writes:

> David Mueller wrote>
>
>> AFAICS the memset.S in sysdeps/powerpc is broken for PowerPC 
>> implementations with cache line sizes other than 8 words.
>> My current work-around is to delete this specific memset.S file. Is 
>> there a smarter way of doing it?
>
> Here is a simple patch that makes memset.S safe for all PowerPC 
> implementations. It is a bit slower for bzero but is still faster 
> then the ./generic/memset.c
>
>>>>>>>>>>>>
> *** glibc-2.2.5/sysdeps/powerpc/memset.S	Thu Jul  5 23:56:01 2001
> --- libc225/sysdeps/powerpc/memset.S	Tue May 21 16:02:00 2002
> ***************
> *** 106,110 ****
>   	clrrwi.	rALIGN, rLEN, 5
>   	mtcrf	0x01, rLEN	/* 40th instruction from .align */
> ! 	beq	cr1, L(zloopstart) /* special case for clearing memory using dcbz */
>   	srwi	rTMP, rALIGN, 5
>   	mtctr	rTMP
> --- 106,113 ----
>   	clrrwi.	rALIGN, rLEN, 5
>   	mtcrf	0x01, rLEN	/* 40th instruction from .align */
> ! /* SJM this is a problem since it assumes that all data caches are 32 bytes
> !     so disable this code for now
> ! 	beq	cr1, L(zloopstart) * special case for clearing memory using dcbz */
> ! 	nop

Please do not fix code this way.  glibc follows the GNU Coding
standards and those define how comments should be done.  Especially do
not add your initials, that will be clear from the cvs commit message
and the correspoding ChangeLog entry.  Also do not just uncomment
code, write instead a meaningfull ChangeLog entry.

Do you really want a nop here?  Can you send a clean, working patch,
please?

Thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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