From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Fri, 13 Jun 2008 16:04:52 +0900 Subject: [U-Boot-Users] [PATCH] mips: Bring over optimized memset() routine from Linux. In-Reply-To: <484E5C9D.8000209@necel.com> References: <20080604194815.A02FD6E7BD@mcmullan-linux.hq.netapp.com> <484E5C9D.8000209@necel.com> Message-ID: <48521C14.4010504@necel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Shinya Kuribayashi wrote: >> + andi a1, 0xff /* spread fillword */ >> + LONG_SLL t1, a1, 8 >> + or a1, t1 >> + LONG_SLL t1, a1, 16 >> +#if LONGSIZE == 8 >> + or a1, t1 >> + LONG_SLL t1, a1, 32 >> +#endif >> + or a1, t1 >> +1: >> + >> +FEXPORT(__bzero) >> + sltiu t0, a2, LONGSIZE /* very small region? */ >> + bnez t0, .Lsmall_memset >> + andi t0, a0, LONGMASK /* aligned? */ > > ^ > > [further part snipped] > > Please fix wrong indentations with proper tabs. I know this is exactly > the same as Linux's memset, but we prefer to fix it correctly in U-Boot. I found that above is an intended space to indicate that the instruction is in the delay slot. I think it's probably a good old convention in MIPS assembly programming, and would like to leave it as it is, IMHO. Anyway, sorry for my ignorance and please ignore my comments on this. -- Shinya Kuribayashi NEC Electronics