This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add crc32 function to libiberty
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 25 Jul 2009 20:54:54 +0100
- Subject: Re: Add crc32 function to libiberty
- References: <20090725053212.E758E73F78@caffeine.csclub.uwaterloo.ca>
Ross Ridge wrote:
> [Bah, sent my previous message to the wrong list]
>
> DJ Delorie writes:
>> The fact that you describe it as "the one and only" - and then
>> describe a *second* polynomial - kinda proves my point about needing
>> documentation.
>
> While there are many possible 32-bit CRC polynomials, the name "CRC-32"
> describes just one. CRC-32C has a different polynomial and a different
> name. There isn't any ambiguity like there is with CRC-16.
>
> What probably should be documented is how GDB differs from the standard
> CRC-32 algorithim by not XOR'ing the final value with 0xFFFFFFFF.
What you innocently describe as "not XOR'ing the final value with
0xFFFFFFFF", others call a variant CRC-32 algorithm. We should document all
our CRC algorithms in terms of the parameterized model defined in chapter 15
of the referenced document.
cheers,
DaveK