This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] memset.S and PowerPC
- From: Andreas Jaeger <aj at suse dot de>
- To: Steven Munroe <sjmunroe at vnet dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 18 Jun 2002 14:45:16 +0200
- Subject: Re: [PATCH] memset.S and PowerPC
- References: <200206141627.g5EGRTZ17877@skunk.rchland.ibm.com>
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