Lines Matching refs:z_word_t
66 z_crc_t must be at least 32 bits. z_word_t must be at least as long as
67 z_crc_t. It is assumed here that z_word_t is either 32 bits or 64 bits, and
72 Define W and the associated z_word_t type. If W is not defined, then a
93 typedef Z_U8 z_word_t;
97 typedef Z_U4 z_word_t;
110 Swap the bytes in a z_word_t to convert between little and big endian. Any
115 local z_word_t byte_swap(z_word_t word) {
198 local z_word_t FAR crc_big_table[256];
200 local z_word_t FAR crc_braid_big_table[W][256];
201 local void braid(z_crc_t [][256], z_word_t [][256], int, int);
205 local void write_table32hi(FILE *, const z_word_t FAR *, int);
206 local void write_table64(FILE *, const z_word_t FAR *, int);
342 z_word_t's, and so requires a 64-bit type be available. In that case,
343 z_word_t must be defined to be 64-bits. This code then also generates
344 and writes out the tables for the case that z_word_t is 32 bits.
352 z_word_t big[8][256];
368 /* write out big-endian CRC table for 64-bit z_word_t to crc32.h */
375 "local const z_word_t FAR crc_big_table[] = {\n"
381 /* write out big-endian CRC table for 32-bit z_word_t to crc32.h */
386 "local const z_word_t FAR crc_big_table[] = {\n"
403 /* write out braid tables for 64-bit z_word_t to crc32.h */
417 "local const z_word_t FAR crc_braid_big_table[][256] = {\n");
429 /* write out braid tables for 32-bit z_word_t to crc32.h */
443 "local const z_word_t FAR crc_braid_big_table[][256] = {\n");
492 local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) {
508 local void write_table64(FILE *out, const z_word_t FAR *table, int k) {
527 z_word_t
530 local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) {
580 z_word_t crc1, crc2;
581 const z_word_t *word;
582 z_word_t val0, val1, val2;
604 word = (z_word_t const *)buf;
678 local z_crc_t crc_word(z_word_t data) {
685 local z_word_t crc_word_big(z_word_t data) {
713 z_word_t const *words;
717 /* Compute the CRC up to a z_word_t boundary. */
723 /* Compute the CRC on as many N z_word_t blocks as are available. */
726 words = (z_word_t const *)buf;
737 z_word_t word0;
740 z_word_t word1;
743 z_word_t word2;
746 z_word_t word3;
749 z_word_t word4;
752 z_word_t word5;
864 z_word_t crc0, word0, comb;
866 z_word_t crc1, word1;
868 z_word_t crc2, word2;
870 z_word_t crc3, word3;
872 z_word_t crc4, word4;
874 z_word_t crc5, word5;