aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc32_x86.S
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-04-13 11:27:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-04-13 11:27:40 +0300
commit02ddf09bc3079b3e17297729b9e43f14d407b8fc (patch)
tree4a3b92a91c5eacbd7ea6229dd02ffeae6688b02f /src/liblzma/check/crc32_x86.S
parentFix off-by-one in LZ decoder. (diff)
downloadxz-02ddf09bc3079b3e17297729b9e43f14d407b8fc.tar.xz
Put the interesting parts of XZ Utils into the public domain.
Some minor documentation cleanups were made at the same time.
Diffstat (limited to 'src/liblzma/check/crc32_x86.S')
-rw-r--r--src/liblzma/check/crc32_x86.S21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/liblzma/check/crc32_x86.S b/src/liblzma/check/crc32_x86.S
index ec28cf5d..b3c7538f 100644
--- a/src/liblzma/check/crc32_x86.S
+++ b/src/liblzma/check/crc32_x86.S
@@ -1,11 +1,18 @@
/*
* Speed-optimized CRC32 using slicing-by-eight algorithm
- * Instruction set: i386
- * Optimized for: i686
*
- * This code has been put into the public domain by its authors:
- * Original code by Igor Pavlov <http://7-zip.org/>
- * Position-independent version by Lasse Collin <lasse.collin@tukaani.org>
+ * This uses only i386 instructions, but it is optimized for i686 and later
+ * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). For i586
+ * (e.g. Pentium), slicing-by-four would be better, and even the C version
+ * of slicing-by-eight built with gcc -march=i586 tends to be a little bit
+ * better than this. Very few probably run this code on i586 or older x86
+ * so this shouldn't be a problem in practice.
+ *
+ * Authors: Igor Pavlov (original version)
+ * Lasse Collin (AT&T syntax, PIC support, better portability)
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
*
* This code needs lzma_crc32_table, which can be created using the
* following C code:
@@ -15,10 +22,10 @@ uint32_t lzma_crc32_table[8][256];
void
init_table(void)
{
- // IEEE-802.3 (CRC32)
+ // IEEE-802.3
static const uint32_t poly32 = UINT32_C(0xEDB88320);
- // Castagnoli (CRC32C)
+ // Castagnoli
// static const uint32_t poly32 = UINT32_C(0x82F63B78);
// Koopman