Home
last modified time | relevance | path

Searched refs:crc (Results 1 – 25 of 301) sorted by relevance

12345678910>>...13

/external/e2fsprogs/lib/ext2fs/
Dcrc32c.c77 crc32_body(uint32_t crc, unsigned char const *buf, size_t len, in crc32_body() argument
81 # define DO_CRC(x) (crc = t0[(crc ^ (x)) & 255] ^ (crc >> 8)) in crc32_body()
87 # define DO_CRC(x) (crc = t0[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)) in crc32_body()
116 q = crc ^ *++b; /* use pre increment for speed */ in crc32_body()
118 crc = DO_CRC4; in crc32_body()
120 crc = DO_CRC8; in crc32_body()
122 crc ^= DO_CRC4; in crc32_body()
133 return crc; in crc32_body()
147 static inline uint32_t crc32_le_generic(uint32_t crc, unsigned char const *p, in crc32_le_generic() argument
154 crc ^= *p++; in crc32_le_generic()
[all …]
Dgen_crc32ctable.c36 uint32_t crc = 1; in crc32cinit_le() local
41 crc = (crc >> 1) ^ ((crc & 1) ? CRC32C_POLY_LE : 0); in crc32cinit_le()
43 crc32ctable_le[0][i + j] = crc ^ crc32ctable_le[0][j]; in crc32cinit_le()
46 crc = crc32ctable_le[0][i]; in crc32cinit_le()
48 crc = crc32ctable_le[0][crc & 0xff] ^ (crc >> 8); in crc32cinit_le()
49 crc32ctable_le[j][i] = crc; in crc32cinit_le()
60 uint32_t crc = 0x80000000; in crc32init_be() local
65 crc = (crc << 1) ^ ((crc & 0x80000000) ? CRCPOLY_BE : 0); in crc32init_be()
67 crc32table_be[0][i + j] = crc ^ crc32table_be[0][j]; in crc32init_be()
70 crc = crc32table_be[0][i]; in crc32init_be()
[all …]
Dcsum.c63 __u32 crc; in ext2fs_mmp_csum_set() local
68 crc = ext2fs_mmp_csum(fs, mmp); in ext2fs_mmp_csum_set()
69 mmp->mmp_checksum = ext2fs_cpu_to_le32(crc); in ext2fs_mmp_csum_set()
112 __u32 flag, crc; in ext2fs_superblock_csum_set() local
122 crc = ext2fs_superblock_csum(fs, sb); in ext2fs_superblock_csum_set()
123 sb->s_checksum = ext2fs_cpu_to_le32(crc); in ext2fs_superblock_csum_set()
132 __u32 *crc) in ext2fs_ext_attr_block_csum() argument
139 *crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)&block, in ext2fs_ext_attr_block_csum()
141 *crc = ext2fs_crc32c_le(*crc, (unsigned char *)buf, fs->blocksize); in ext2fs_ext_attr_block_csum()
169 __u32 crc; in ext2fs_ext_attr_block_csum_set() local
[all …]
/external/valgrind/none/tests/amd64/
Dcrc32.c15 UInt i, crc = (b & 0xFF) ^ crcIn; in do_s_crc32b() local
17 crc = (crc >> 1) ^ ((crc & 1) ? 0x82f63b78 : 0); in do_s_crc32b()
18 return crc; in do_s_crc32b()
23 UInt i, crc = (w & 0xFFFF) ^ crcIn; in do_s_crc32w() local
25 crc = (crc >> 1) ^ ((crc & 1) ? 0x82f63b78 : 0); in do_s_crc32w()
26 return crc; in do_s_crc32w()
31 UInt i, crc = l ^ crcIn; in do_s_crc32l() local
33 crc = (crc >> 1) ^ ((crc & 1) ? 0x82f63b78 : 0); in do_s_crc32l()
34 return crc; in do_s_crc32l()
39 UInt crc = do_s_crc32l(crcIn, (UInt)q); in do_s_crc32q() local
[all …]
/external/flac/libFLAC/
Dcrc.c114 void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc) in FLAC__crc8_update() argument
116 *crc = FLAC__crc8_table[*crc ^ data]; in FLAC__crc8_update()
119 void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc) in FLAC__crc8_update_block() argument
122 *crc = FLAC__crc8_table[*crc ^ *data++]; in FLAC__crc8_update_block()
127 FLAC__uint8 crc = 0; in FLAC__crc8() local
130 crc = FLAC__crc8_table[crc ^ *data++]; in FLAC__crc8()
132 return crc; in FLAC__crc8()
137 unsigned crc = 0; in FLAC__crc16() local
140 crc = ((crc<<8) ^ FLAC__crc16_table[(crc>>8) ^ *data++]) & 0xffff; in FLAC__crc16()
142 return crc; in FLAC__crc16()
/external/gptfdisk/
Dcrc32.cc34 unsigned long crc; in chksum_crc32() local
37 crc = 0xFFFFFFFF; in chksum_crc32()
40 crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_tab[(crc ^ *block++) & 0xFF]; in chksum_crc32()
42 return (crc ^ 0xFFFFFFFF); in chksum_crc32()
52 unsigned long crc, poly; in chksum_crc32gentab() local
58 crc = i; in chksum_crc32gentab()
61 if (crc & 1) in chksum_crc32gentab()
63 crc = (crc >> 1) ^ poly; in chksum_crc32gentab()
67 crc >>= 1; in chksum_crc32gentab()
70 crc_tab[i] = crc; in chksum_crc32gentab()
/external/llvm/test/MC/ARM/
Ddirective-arch_extension-crc.s10 .arch_extension crc
12 @ CHECK-V7-NEXT: .arch_extension crc
15 .type crc,%function
16 crc: label
18 @ CHECK-V7: error: instruction requires: crc armv8
20 @ CHECK-V7: error: instruction requires: crc armv8
22 @ CHECK-V7: error: instruction requires: crc armv8
25 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
29 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32-thumb.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
Dcrc32.s3 @ RUN: not llvm-mc -triple=thumbv8 -mattr=-crc -show-encoding < %s 2>&1 | FileCheck %s --check-pref…
11 @ CHECK-V7: error: instruction requires: crc armv8
12 @ CHECK-V7: error: instruction requires: crc armv8
13 @ CHECK-V7: error: instruction requires: crc armv8
14 @ CHECK-NOCRC: error: instruction requires: crc
15 @ CHECK-NOCRC: error: instruction requires: crc
16 @ CHECK-NOCRC: error: instruction requires: crc
25 @ CHECK-V7: error: instruction requires: crc armv8
26 @ CHECK-V7: error: instruction requires: crc armv8
27 @ CHECK-V7: error: instruction requires: crc armv8
[all …]
/external/toybox/toys/posix/
Dcksum.c32 static unsigned cksum_be(unsigned crc, unsigned char c)
34 return (crc<<8)^TT.crc_table[(crc>>24)^c];
37 static unsigned cksum_le(unsigned crc, unsigned char c) in cksum_le() argument
39 return TT.crc_table[(crc^c)&0xff] ^ (crc>>8); in cksum_le()
44 unsigned crc = (toys.optflags & FLAG_P) ? 0xffffffff : 0; in do_cksum() local
46 unsigned (*cksum)(unsigned crc, unsigned char c); in do_cksum()
59 for (i=0; i<len; i++) crc=cksum(crc, toybuf[i]); in do_cksum()
67 crc = cksum(crc, llen); in do_cksum()
73 (toys.optflags & FLAG_I) ? crc : ~crc); in do_cksum()
/external/flac/libFLAC/include/private/
Dcrc.h43 #define FLAC__CRC8_UPDATE(data, crc) (crc) = FLAC__crc8_table[(crc) ^ (data)]; argument
44 void FLAC__crc8_update(const FLAC__byte data, FLAC__uint8 *crc);
45 void FLAC__crc8_update_block(const FLAC__byte *data, unsigned len, FLAC__uint8 *crc);
54 #define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) & 0xffff) ^ FLAC__crc16_table[((crc)>>8) ^ (data… argument
57 #define FLAC__CRC16_UPDATE(data, crc) ((((crc)<<8) ^ FLAC__crc16_table[((crc)>>8) ^ (data)]) & 0xff…
/external/aac/libFDK/src/
DFDK_crc.cpp329 USHORT crc = *pCrc; /* get crc value */ in calcCrc_Bits() local
334 tmp ^= ( (crc & crcMask) ? 1 : 0 ); in calcCrc_Bits()
336 crc <<= 1; in calcCrc_Bits()
337 crc ^= tmp; in calcCrc_Bits()
343 tmp ^= ( (crc & crcMask) ? 1 : 0 ); in calcCrc_Bits()
345 crc <<= 1; in calcCrc_Bits()
346 crc ^= tmp; in calcCrc_Bits()
349 *pCrc = crc; /* update crc value */ in calcCrc_Bits()
374 USHORT crc = *pCrc; /* get crc value */ in calcCrc_Bytes() local
378 crc = (crc<<8)^pCrcLookup[((crc>>8)^((UCHAR)FDKreadBits(hBs,8)))&0xFF]; in calcCrc_Bytes()
[all …]
/external/icu/icu4j/tools/misc/src/com/ibm/icu/dev/tool/localeconverter/
DCalculateCRC32.java38 int crc; in buildCRCTable() local
42 crc = i; in buildCRCTable()
44 if ((crc & 1) == 1) { in buildCRCTable()
45 crc = (crc >>> 1) ^ CRC32_POLYNOMIAL; in buildCRCTable()
47 crc >>>= 1; in buildCRCTable()
50 CRCTable[i] = crc; in buildCRCTable()
62 public static int computeCRC32(String buffer, int crc){ in computeCRC32() argument
63 return computeCRC32(buffer.getBytes(), crc); in computeCRC32()
66 public static int computeCRC32(byte buffer[], int crc) { in computeCRC32() argument
67 return computeCRC32(buffer, 0, buffer.length, crc); in computeCRC32()
/external/fio/crc/
Dcrc32c-intel.c35 static uint32_t crc32c_intel_le_hw_byte(uint32_t crc, unsigned char const *data, in crc32c_intel_le_hw_byte() argument
41 :"=S"(crc) in crc32c_intel_le_hw_byte()
42 :"0"(crc), "c"(*data) in crc32c_intel_le_hw_byte()
47 return crc; in crc32c_intel_le_hw_byte()
63 uint32_t crc = ~0; in crc32c_intel() local
68 :"=S"(crc) in crc32c_intel()
69 :"0"(crc), "c"(*ptmp) in crc32c_intel()
75 crc = crc32c_intel_le_hw_byte(crc, (unsigned char *)ptmp, in crc32c_intel()
78 return crc; in crc32c_intel()
/external/lzma/C/
DLzHash.h18 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
23 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
26 hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; }
29 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
32 hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \
33 hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \
37 #define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF;
41 hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1);
44 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
49 UInt32 temp = p->crc[cur[0]] ^ cur[1]; \
[all …]
/external/fio/
DAndroid.mk37 crc_src_files := crc/crc7.c crc/crc16.c crc/crc32.c crc/crc64.c crc/crc32c.c crc/crc32c-intel.c \
38 crc/sha1.c crc/sha256.c crc/sha512.c crc/md5.c crc/test.c crc/xxhash.c \
39 crc/fnv.c crc/murmur3.c
/external/elfutils/lib/
Dcrc32.c90 crc32 (uint32_t crc, unsigned char *buf, size_t len) in crc32() argument
94 crc = ~crc; in crc32()
96 crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); in crc32()
97 return ~crc; in crc32()
/external/syslinux/lzo/src/
Dlzo_crc.c103 crc = table[((unsigned)crc ^ buf[i]) & 0xff] ^ (crc >> 8)
106 crc = table[(unsigned char)((unsigned char)crc ^ buf[i])] ^ (crc >> 8)
117 lzo_uint32_t crc; in lzo_crc32() local
128 crc = (c & LZO_UINT32_C(0xffffffff)) ^ LZO_UINT32_C(0xffffffff); in lzo_crc32()
142 return crc ^ LZO_UINT32_C(0xffffffff); in lzo_crc32()
/external/libpng/contrib/tools/
Dpng-fix-itxt.c46 unsigned long crc; in main() local
81 crc = crc32(0, Z_NULL, 0); in main()
93 crc = crc32(crc, buf+4, (uInt)length+4); in main()
98 if (((crc >> 24) & 0xffU) == buf[length+8] && in main()
99 ((crc >> 16) & 0xffU) == buf[length+9] && in main()
100 ((crc >> 8) & 0xffU) == buf[length+10] && in main()
101 ((crc ) & 0xffU) == buf[length+11]) in main()
113 crc = crc32(crc, buf+7+length, 1); in main()
/external/lzma/xz-embedded/
Dxz_crc64.c40 XZ_EXTERN uint64_t xz_crc64(const uint8_t *buf, size_t size, uint64_t crc) in xz_crc64() argument
42 crc = ~crc; in xz_crc64()
45 crc = xz_crc64_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8); in xz_crc64()
49 return ~crc; in xz_crc64()
Dxz_crc32.c49 XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc) in xz_crc32() argument
51 crc = ~crc; in xz_crc32()
54 crc = xz_crc32_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8); in xz_crc32()
58 return ~crc; in xz_crc32()
/external/llvm/test/MC/AArch64/
Dcyclone-crc.s7 CHECK: error: instruction requires: crc
9 CHECK: error: instruction requires: crc
11 CHECK: error: instruction requires: crc
13 CHECK: error: instruction requires: crc
20 CHECK: error: instruction requires: crc
22 CHECK: error: instruction requires: crc
24 CHECK: error: instruction requires: crc
26 CHECK: error: instruction requires: crc
/external/openssh/
Dcrc32.c99 u_int32_t i, crc; in ssh_crc32() local
101 crc = 0; in ssh_crc32()
103 crc = crc32tab[(crc ^ buf[i]) & 0xff] ^ (crc >> 8); in ssh_crc32()
104 return crc; in ssh_crc32()
/external/vboot_reference/firmware/lib/
Dcrc8.c17 unsigned crc = 0; in Crc8() local
21 crc ^= (*data << 8); in Crc8()
23 if (crc & 0x8000) in Crc8()
24 crc ^= (0x1070 << 3); in Crc8()
25 crc <<= 1; in Crc8()
29 return (uint8_t)(crc >> 8); in Crc8()
/external/vboot_reference/firmware/2lib/
D2crc8.c12 unsigned crc = 0; in vb2_crc8() local
20 crc ^= (*data << 8); in vb2_crc8()
22 if (crc & 0x8000) in vb2_crc8()
23 crc ^= (0x1070 << 3); in vb2_crc8()
24 crc <<= 1; in vb2_crc8()
28 return (uint8_t)(crc >> 8); in vb2_crc8()

12345678910>>...13