[Top] [All Lists]

Re: MIPS checksum bug

To: "Maciej W. Rozycki" <>
Subject: Re: MIPS checksum bug
From: Ralf Baechle <>
Date: Fri, 19 Sep 2008 00:07:35 +0200
Cc: Atsushi Nemoto <>,,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
User-agent: Mutt/1.5.18 (2008-05-17)
On Wed, Sep 17, 2008 at 07:21:23PM +0100, Maciej W. Rozycki wrote:

> > >  Hmm, what's the purpose of doing the fold in csum_partial() then?
> > 
> > Well, maybe odd-byte handling requires 16-bit holded values?
>  It should be enough to swap odd and even bytes in the word in the
> unaligned path.  Though perhaps extra code to do masking would make it no
> shorter/faster than what we have now; however the aligned path would
> benefit.  Hmm...

Which is a truely weird operation - but MIPS R2 happens to have a wonderful
instruction for this operation, WSBH / DSBH.


<Prev in Thread] Current Thread [Next in Thread>