summaryrefslogtreecommitdiff
path: root/libiberty/crc32.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2009-07-25 11:28:20 +0000
committerDJ Delorie <dj@redhat.com>2009-07-25 11:28:20 +0000
commitbdc0e08dbcf16b52410ce016ab9ed036a32e7e2d (patch)
tree1076d6f0bcbea3b111ff97d6e630f9b62beef32e /libiberty/crc32.c
parent6e88169156860fb7a726b875af919cade2c940b5 (diff)
merge from gcc
Diffstat (limited to 'libiberty/crc32.c')
-rw-r--r--libiberty/crc32.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/libiberty/crc32.c b/libiberty/crc32.c
index 2171a3d1c7..c12916b521 100644
--- a/libiberty/crc32.c
+++ b/libiberty/crc32.c
@@ -150,12 +150,25 @@ protocol for the @samp{qCRC} command. In order to get the same
results as gdb for a block of data, you must pass the first CRC
parameter as @code{0xffffffff}.
+This CRC can be specified as:
+
+ Width : 32
+ Poly : 0x04c11db7
+ Init : parameter, typically 0xffffffff
+ RefIn : false
+ RefOut : false
+ XorOut : 0
+
+This differs from the "standard" CRC-32 algorithm in that the values
+are not reflected, and there is no final XOR value. These differences
+make it easy to compose the values of multiple blocks.
+
@end deftypefn
*/
unsigned int
-crc32 (const unsigned char *buf, int len, unsigned int init)
+xcrc32 (const unsigned char *buf, int len, unsigned int init)
{
unsigned int crc = init;
while (len--)