On Tue, Apr 25, 2017 at 6:47 PM, Nathan Sidwell <nat...@acm.org> wrote:
> Hi,
> our current CRC routine processes 1 bit at a time, and permits arbitrary
> numbers of bits from 1 to 32.  However we only ever feed it multiples of 8
> bits to process.
>
> So part of this patch changes the interface to use a crc32_unsigned_n worker
> function, which crcs a N-byte integer.
>
> The other change is to do 4 bits at a time.  This is possible because the
> feedback syndrome is '0x04c11db7', which has the top 5 bits clear. But 5's
> an awkward number to work with, so just go with nibble at a time.
>
> bootstrapped on x86_64-linux, ok for trunk?

Please use 'inline' rather than 'static inline'.

Did you test the patch produces the same CRCs than before?  Did you do
any performance measurements?

Otherwise looks ok to me.  I wonder why we have this "copy" at all rather
than using libiberties xcrc32?

Thanks,
Richard.

> nathan
>
> --
> Nathan Sidwell

Reply via email to