mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-05 14:20:05 -05:00
Refactors even more and add an additional selftest.
This commit is contained in:
parent
8a904cbe7a
commit
cbddaa108d
13 changed files with 443 additions and 258 deletions
4
util.c
4
util.c
|
|
@ -1094,13 +1094,13 @@ uint32_t crc32c_gen(uint32_t crc, const unsigned char* ptr, unsigned size)
|
|||
|
||||
uint32_t crc32c_x86(uint32_t crc, const unsigned char* ptr, unsigned size)
|
||||
{
|
||||
#if defined(__x86_64__)
|
||||
#ifdef CONFIG_X86_64
|
||||
uint64_t crc64;
|
||||
#endif
|
||||
|
||||
crc ^= CRC_IV;
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#ifdef CONFIG_X86_64
|
||||
crc64 = crc;
|
||||
while (size >= 8) {
|
||||
asm volatile ("crc32q %1, %0\n" : "+r" (crc64) : "rm" (*(uint64_t*)ptr));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue