Add crc32 function to libiberty

Ross Ridge rridge@csclub.uwaterloo.ca
Sun Jul 26 05:13:00 GMT 2009


Ross Ridge writes:
> What probably should be documented is how GDB differs from the standard
> CRC-32 algorithim by not XOR'ing the final value with 0xFFFFFFFF.

Dave Korn writes:
>What you innocently describe as "not XOR'ing the final value with
>0xFFFFFFFF", others call a variant CRC-32 algorithm.

Uhuh.  I also said that it "differs from the standard CRC-32 algorithm"
which is tantamount to calling it a variant.

>We should document all our CRC algorithms in terms of the parameterized
>model defined in chapter 15 of the referenced document.

Sure.  My point is that describing it a modified CRC-32 algorithm does
a better job documenting it than just giving the polynomial.  

Anyways there's another difference from the standard CRC-32 algorithm
that no one has seemed to have noticed, so unless there's someone here
who really knows his CRCs, maybe it's better to just document it as
"the CRC algorithm GDB uses" and otherwise consider it a black box.

					Ross Ridge



More information about the Gcc-patches mailing list