crc: add CRC64 rocksoft implementation

- Added reference implementation
- Added base implementation
- Added functional and performance tests

Change-Id: I60c5097bd5fb89ee7a50910e71d449d50d155d0a
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Pablo de Lara 2023-03-30 10:50:32 +01:00
parent 16056ff4e4
commit 2bbce31943
17 changed files with 755 additions and 6 deletions

View File

@ -134,6 +134,10 @@ objs = \
bin\crc64_jones_refl_by16_10.obj \
bin\crc64_jones_norm_by8.obj \
bin\crc64_jones_norm_by16_10.obj \
bin\crc64_rocksoft_refl_by8.obj \
bin\crc64_rocksoft_refl_by16_10.obj \
bin\crc64_rocksoft_norm_by8.obj \
bin\crc64_rocksoft_norm_by16_10.obj \
bin\crc32_gzip_refl_by8.obj \
bin\crc32_gzip_refl_by8_02.obj \
bin\crc32_gzip_refl_by16_10.obj \

View File

@ -10,7 +10,7 @@ applications. ISA-L includes:
encode/decode matrix in GF(2^8).
* CRC - Fast implementations of cyclic redundancy check. Six different
polynomials supported.
- iscsi32, ieee32, t10dif, ecma64, iso64, jones64.
- iscsi32, ieee32, t10dif, ecma64, iso64, jones64, rocksoft64.
* Raid - calculate and operate on XOR and P+Q parity found in common RAID
implementations.
* Compression - Fast deflate-compatible data compression.

View File

@ -65,6 +65,10 @@ lsrc_x86_64 += \
crc/crc64_jones_refl_by16_10.asm \
crc/crc64_jones_norm_by8.asm \
crc/crc64_jones_norm_by16_10.asm \
crc/crc64_rocksoft_refl_by8.asm \
crc/crc64_rocksoft_refl_by16_10.asm \
crc/crc64_rocksoft_norm_by8.asm \
crc/crc64_rocksoft_norm_by16_10.asm \
crc/crc32_gzip_refl_by8.asm \
crc/crc32_gzip_refl_by8_02.asm \
crc/crc32_gzip_refl_by16_10.asm

View File

@ -40,7 +40,9 @@ lsrc_aarch64 += \
crc/aarch64/crc64_iso_refl_pmull.S \
crc/aarch64/crc64_iso_norm_pmull.S \
crc/aarch64/crc64_jones_refl_pmull.S \
crc/aarch64/crc64_jones_norm_pmull.S
crc/aarch64/crc64_jones_norm_pmull.S \
crc/aarch64/crc64_rocksoft.c
#CRC32/CRC32C for micro-architecture
lsrc_aarch64 += \

View File

@ -0,0 +1,41 @@
/**********************************************************************
Copyright(c) 2023 Intel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Intel Corporation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**********************************************************************/
#include "crc64.h"
#include <stdint.h>
uint64_t crc64_rocksoft_refl(uint64_t seed, const uint8_t * buf, uint64_t len)
{
return crc64_rocksoft_refl_base(seed, buf, len);
}
uint64_t crc64_rocksoft_norm(uint64_t seed, const uint8_t * buf, uint64_t len)
{
return crc64_rocksoft_norm_base(seed, buf, len);
}

View File

@ -815,6 +815,268 @@ static const uint64_t crc64_jones_norm_table[256] = {
0xb972e5c276c2d83dULL, 0x14e137f7e20bed94ULL
};
static const uint64_t crc64_rocksoft_refl_table[256] = {
0x0000000000000000ULL, 0x7f6ef0c830358979ULL,
0xfedde190606b12f2ULL, 0x81b31158505e9b8bULL,
0xc962e5739841b68fULL, 0xb60c15bba8743ff6ULL,
0x37bf04e3f82aa47dULL, 0x48d1f42bc81f2d04ULL,
0xa61cecb46814fe75ULL, 0xd9721c7c5821770cULL,
0x58c10d24087fec87ULL, 0x27affdec384a65feULL,
0x6f7e09c7f05548faULL, 0x1010f90fc060c183ULL,
0x91a3e857903e5a08ULL, 0xeecd189fa00bd371ULL,
0x78e0ff3b88be6f81ULL, 0x078e0ff3b88be6f8ULL,
0x863d1eabe8d57d73ULL, 0xf953ee63d8e0f40aULL,
0xb1821a4810ffd90eULL, 0xceecea8020ca5077ULL,
0x4f5ffbd87094cbfcULL, 0x30310b1040a14285ULL,
0xdefc138fe0aa91f4ULL, 0xa192e347d09f188dULL,
0x2021f21f80c18306ULL, 0x5f4f02d7b0f40a7fULL,
0x179ef6fc78eb277bULL, 0x68f0063448deae02ULL,
0xe943176c18803589ULL, 0x962de7a428b5bcf0ULL,
0xf1c1fe77117cdf02ULL, 0x8eaf0ebf2149567bULL,
0x0f1c1fe77117cdf0ULL, 0x7072ef2f41224489ULL,
0x38a31b04893d698dULL, 0x47cdebccb908e0f4ULL,
0xc67efa94e9567b7fULL, 0xb9100a5cd963f206ULL,
0x57dd12c379682177ULL, 0x28b3e20b495da80eULL,
0xa900f35319033385ULL, 0xd66e039b2936bafcULL,
0x9ebff7b0e12997f8ULL, 0xe1d10778d11c1e81ULL,
0x606216208142850aULL, 0x1f0ce6e8b1770c73ULL,
0x8921014c99c2b083ULL, 0xf64ff184a9f739faULL,
0x77fce0dcf9a9a271ULL, 0x08921014c99c2b08ULL,
0x4043e43f0183060cULL, 0x3f2d14f731b68f75ULL,
0xbe9e05af61e814feULL, 0xc1f0f56751dd9d87ULL,
0x2f3dedf8f1d64ef6ULL, 0x50531d30c1e3c78fULL,
0xd1e00c6891bd5c04ULL, 0xae8efca0a188d57dULL,
0xe65f088b6997f879ULL, 0x9931f84359a27100ULL,
0x1882e91b09fcea8bULL, 0x67ec19d339c963f2ULL,
0xd75adabd7a6e2d6fULL, 0xa8342a754a5ba416ULL,
0x29873b2d1a053f9dULL, 0x56e9cbe52a30b6e4ULL,
0x1e383fcee22f9be0ULL, 0x6156cf06d21a1299ULL,
0xe0e5de5e82448912ULL, 0x9f8b2e96b271006bULL,
0x71463609127ad31aULL, 0x0e28c6c1224f5a63ULL,
0x8f9bd7997211c1e8ULL, 0xf0f5275142244891ULL,
0xb824d37a8a3b6595ULL, 0xc74a23b2ba0eececULL,
0x46f932eaea507767ULL, 0x3997c222da65fe1eULL,
0xafba2586f2d042eeULL, 0xd0d4d54ec2e5cb97ULL,
0x5167c41692bb501cULL, 0x2e0934dea28ed965ULL,
0x66d8c0f56a91f461ULL, 0x19b6303d5aa47d18ULL,
0x980521650afae693ULL, 0xe76bd1ad3acf6feaULL,
0x09a6c9329ac4bc9bULL, 0x76c839faaaf135e2ULL,
0xf77b28a2faafae69ULL, 0x8815d86aca9a2710ULL,
0xc0c42c4102850a14ULL, 0xbfaadc8932b0836dULL,
0x3e19cdd162ee18e6ULL, 0x41773d1952db919fULL,
0x269b24ca6b12f26dULL, 0x59f5d4025b277b14ULL,
0xd846c55a0b79e09fULL, 0xa72835923b4c69e6ULL,
0xeff9c1b9f35344e2ULL, 0x90973171c366cd9bULL,
0x1124202993385610ULL, 0x6e4ad0e1a30ddf69ULL,
0x8087c87e03060c18ULL, 0xffe938b633338561ULL,
0x7e5a29ee636d1eeaULL, 0x0134d92653589793ULL,
0x49e52d0d9b47ba97ULL, 0x368bddc5ab7233eeULL,
0xb738cc9dfb2ca865ULL, 0xc8563c55cb19211cULL,
0x5e7bdbf1e3ac9decULL, 0x21152b39d3991495ULL,
0xa0a63a6183c78f1eULL, 0xdfc8caa9b3f20667ULL,
0x97193e827bed2b63ULL, 0xe877ce4a4bd8a21aULL,
0x69c4df121b863991ULL, 0x16aa2fda2bb3b0e8ULL,
0xf86737458bb86399ULL, 0x8709c78dbb8deae0ULL,
0x06bad6d5ebd3716bULL, 0x79d4261ddbe6f812ULL,
0x3105d23613f9d516ULL, 0x4e6b22fe23cc5c6fULL,
0xcfd833a67392c7e4ULL, 0xb0b6c36e43a74e9dULL,
0x9a6c9329ac4bc9b5ULL, 0xe50263e19c7e40ccULL,
0x64b172b9cc20db47ULL, 0x1bdf8271fc15523eULL,
0x530e765a340a7f3aULL, 0x2c608692043ff643ULL,
0xadd397ca54616dc8ULL, 0xd2bd67026454e4b1ULL,
0x3c707f9dc45f37c0ULL, 0x431e8f55f46abeb9ULL,
0xc2ad9e0da4342532ULL, 0xbdc36ec59401ac4bULL,
0xf5129aee5c1e814fULL, 0x8a7c6a266c2b0836ULL,
0x0bcf7b7e3c7593bdULL, 0x74a18bb60c401ac4ULL,
0xe28c6c1224f5a634ULL, 0x9de29cda14c02f4dULL,
0x1c518d82449eb4c6ULL, 0x633f7d4a74ab3dbfULL,
0x2bee8961bcb410bbULL, 0x548079a98c8199c2ULL,
0xd53368f1dcdf0249ULL, 0xaa5d9839ecea8b30ULL,
0x449080a64ce15841ULL, 0x3bfe706e7cd4d138ULL,
0xba4d61362c8a4ab3ULL, 0xc52391fe1cbfc3caULL,
0x8df265d5d4a0eeceULL, 0xf29c951de49567b7ULL,
0x732f8445b4cbfc3cULL, 0x0c41748d84fe7545ULL,
0x6bad6d5ebd3716b7ULL, 0x14c39d968d029fceULL,
0x95708ccedd5c0445ULL, 0xea1e7c06ed698d3cULL,
0xa2cf882d2576a038ULL, 0xdda178e515432941ULL,
0x5c1269bd451db2caULL, 0x237c997575283bb3ULL,
0xcdb181ead523e8c2ULL, 0xb2df7122e51661bbULL,
0x336c607ab548fa30ULL, 0x4c0290b2857d7349ULL,
0x04d364994d625e4dULL, 0x7bbd94517d57d734ULL,
0xfa0e85092d094cbfULL, 0x856075c11d3cc5c6ULL,
0x134d926535897936ULL, 0x6c2362ad05bcf04fULL,
0xed9073f555e26bc4ULL, 0x92fe833d65d7e2bdULL,
0xda2f7716adc8cfb9ULL, 0xa54187de9dfd46c0ULL,
0x24f29686cda3dd4bULL, 0x5b9c664efd965432ULL,
0xb5517ed15d9d8743ULL, 0xca3f8e196da80e3aULL,
0x4b8c9f413df695b1ULL, 0x34e26f890dc31cc8ULL,
0x7c339ba2c5dc31ccULL, 0x035d6b6af5e9b8b5ULL,
0x82ee7a32a5b7233eULL, 0xfd808afa9582aa47ULL,
0x4d364994d625e4daULL, 0x3258b95ce6106da3ULL,
0xb3eba804b64ef628ULL, 0xcc8558cc867b7f51ULL,
0x8454ace74e645255ULL, 0xfb3a5c2f7e51db2cULL,
0x7a894d772e0f40a7ULL, 0x05e7bdbf1e3ac9deULL,
0xeb2aa520be311aafULL, 0x944455e88e0493d6ULL,
0x15f744b0de5a085dULL, 0x6a99b478ee6f8124ULL,
0x224840532670ac20ULL, 0x5d26b09b16452559ULL,
0xdc95a1c3461bbed2ULL, 0xa3fb510b762e37abULL,
0x35d6b6af5e9b8b5bULL, 0x4ab846676eae0222ULL,
0xcb0b573f3ef099a9ULL, 0xb465a7f70ec510d0ULL,
0xfcb453dcc6da3dd4ULL, 0x83daa314f6efb4adULL,
0x0269b24ca6b12f26ULL, 0x7d0742849684a65fULL,
0x93ca5a1b368f752eULL, 0xeca4aad306bafc57ULL,
0x6d17bb8b56e467dcULL, 0x12794b4366d1eea5ULL,
0x5aa8bf68aecec3a1ULL, 0x25c64fa09efb4ad8ULL,
0xa4755ef8cea5d153ULL, 0xdb1bae30fe90582aULL,
0xbcf7b7e3c7593bd8ULL, 0xc399472bf76cb2a1ULL,
0x422a5673a732292aULL, 0x3d44a6bb9707a053ULL,
0x759552905f188d57ULL, 0x0afba2586f2d042eULL,
0x8b48b3003f739fa5ULL, 0xf42643c80f4616dcULL,
0x1aeb5b57af4dc5adULL, 0x6585ab9f9f784cd4ULL,
0xe436bac7cf26d75fULL, 0x9b584a0fff135e26ULL,
0xd389be24370c7322ULL, 0xace74eec0739fa5bULL,
0x2d545fb4576761d0ULL, 0x523aaf7c6752e8a9ULL,
0xc41748d84fe75459ULL, 0xbb79b8107fd2dd20ULL,
0x3acaa9482f8c46abULL, 0x45a459801fb9cfd2ULL,
0x0d75adabd7a6e2d6ULL, 0x721b5d63e7936bafULL,
0xf3a84c3bb7cdf024ULL, 0x8cc6bcf387f8795dULL,
0x620ba46c27f3aa2cULL, 0x1d6554a417c62355ULL,
0x9cd645fc4798b8deULL, 0xe3b8b53477ad31a7ULL,
0xab69411fbfb21ca3ULL, 0xd407b1d78f8795daULL,
0x55b4a08fdfd90e51ULL, 0x2ada5047efec8728ULL
};
static const uint64_t crc64_rocksoft_norm_table[256] = {
0x0000000000000000ULL, 0xad93d23594c93659ULL,
0xf6b4765ebd5b5aebULL, 0x5b27a46b29926cb2ULL,
0x40fb3e88ee7f838fULL, 0xed68ecbd7ab6b5d6ULL,
0xb64f48d65324d964ULL, 0x1bdc9ae3c7edef3dULL,
0x81f67d11dcff071eULL, 0x2c65af2448363147ULL,
0x77420b4f61a45df5ULL, 0xdad1d97af56d6bacULL,
0xc10d439932808491ULL, 0x6c9e91aca649b2c8ULL,
0x37b935c78fdbde7aULL, 0x9a2ae7f21b12e823ULL,
0xae7f28162d373865ULL, 0x03ecfa23b9fe0e3cULL,
0x58cb5e48906c628eULL, 0xf5588c7d04a554d7ULL,
0xee84169ec348bbeaULL, 0x4317c4ab57818db3ULL,
0x183060c07e13e101ULL, 0xb5a3b2f5eadad758ULL,
0x2f895507f1c83f7bULL, 0x821a873265010922ULL,
0xd93d23594c936590ULL, 0x74aef16cd85a53c9ULL,
0x6f726b8f1fb7bcf4ULL, 0xc2e1b9ba8b7e8aadULL,
0x99c61dd1a2ece61fULL, 0x3455cfe43625d046ULL,
0xf16d8219cea74693ULL, 0x5cfe502c5a6e70caULL,
0x07d9f44773fc1c78ULL, 0xaa4a2672e7352a21ULL,
0xb196bc9120d8c51cULL, 0x1c056ea4b411f345ULL,
0x4722cacf9d839ff7ULL, 0xeab118fa094aa9aeULL,
0x709bff081258418dULL, 0xdd082d3d869177d4ULL,
0x862f8956af031b66ULL, 0x2bbc5b633bca2d3fULL,
0x3060c180fc27c202ULL, 0x9df313b568eef45bULL,
0xc6d4b7de417c98e9ULL, 0x6b4765ebd5b5aeb0ULL,
0x5f12aa0fe3907ef6ULL, 0xf281783a775948afULL,
0xa9a6dc515ecb241dULL, 0x04350e64ca021244ULL,
0x1fe994870deffd79ULL, 0xb27a46b29926cb20ULL,
0xe95de2d9b0b4a792ULL, 0x44ce30ec247d91cbULL,
0xdee4d71e3f6f79e8ULL, 0x7377052baba64fb1ULL,
0x2850a14082342303ULL, 0x85c3737516fd155aULL,
0x9e1fe996d110fa67ULL, 0x338c3ba345d9cc3eULL,
0x68ab9fc86c4ba08cULL, 0xc5384dfdf88296d5ULL,
0x4f48d6060987bb7fULL, 0xe2db04339d4e8d26ULL,
0xb9fca058b4dce194ULL, 0x146f726d2015d7cdULL,
0x0fb3e88ee7f838f0ULL, 0xa2203abb73310ea9ULL,
0xf9079ed05aa3621bULL, 0x54944ce5ce6a5442ULL,
0xcebeab17d578bc61ULL, 0x632d792241b18a38ULL,
0x380add496823e68aULL, 0x95990f7cfcead0d3ULL,
0x8e45959f3b073feeULL, 0x23d647aaafce09b7ULL,
0x78f1e3c1865c6505ULL, 0xd56231f41295535cULL,
0xe137fe1024b0831aULL, 0x4ca42c25b079b543ULL,
0x1783884e99ebd9f1ULL, 0xba105a7b0d22efa8ULL,
0xa1ccc098cacf0095ULL, 0x0c5f12ad5e0636ccULL,
0x5778b6c677945a7eULL, 0xfaeb64f3e35d6c27ULL,
0x60c18301f84f8404ULL, 0xcd5251346c86b25dULL,
0x9675f55f4514deefULL, 0x3be6276ad1dde8b6ULL,
0x203abd891630078bULL, 0x8da96fbc82f931d2ULL,
0xd68ecbd7ab6b5d60ULL, 0x7b1d19e23fa26b39ULL,
0xbe25541fc720fdecULL, 0x13b6862a53e9cbb5ULL,
0x489122417a7ba707ULL, 0xe502f074eeb2915eULL,
0xfede6a97295f7e63ULL, 0x534db8a2bd96483aULL,
0x086a1cc994042488ULL, 0xa5f9cefc00cd12d1ULL,
0x3fd3290e1bdffaf2ULL, 0x9240fb3b8f16ccabULL,
0xc9675f50a684a019ULL, 0x64f48d65324d9640ULL,
0x7f281786f5a0797dULL, 0xd2bbc5b361694f24ULL,
0x899c61d848fb2396ULL, 0x240fb3eddc3215cfULL,
0x105a7c09ea17c589ULL, 0xbdc9ae3c7edef3d0ULL,
0xe6ee0a57574c9f62ULL, 0x4b7dd862c385a93bULL,
0x50a1428104684606ULL, 0xfd3290b490a1705fULL,
0xa61534dfb9331cedULL, 0x0b86e6ea2dfa2ab4ULL,
0x91ac011836e8c297ULL, 0x3c3fd32da221f4ceULL,
0x671877468bb3987cULL, 0xca8ba5731f7aae25ULL,
0xd1573f90d8974118ULL, 0x7cc4eda54c5e7741ULL,
0x27e349ce65cc1bf3ULL, 0x8a709bfbf1052daaULL,
0x9e91ac0c130f76feULL, 0x33027e3987c640a7ULL,
0x6825da52ae542c15ULL, 0xc5b608673a9d1a4cULL,
0xde6a9284fd70f571ULL, 0x73f940b169b9c328ULL,
0x28dee4da402baf9aULL, 0x854d36efd4e299c3ULL,
0x1f67d11dcff071e0ULL, 0xb2f403285b3947b9ULL,
0xe9d3a74372ab2b0bULL, 0x44407576e6621d52ULL,
0x5f9cef95218ff26fULL, 0xf20f3da0b546c436ULL,
0xa92899cb9cd4a884ULL, 0x04bb4bfe081d9eddULL,
0x30ee841a3e384e9bULL, 0x9d7d562faaf178c2ULL,
0xc65af24483631470ULL, 0x6bc9207117aa2229ULL,
0x7015ba92d047cd14ULL, 0xdd8668a7448efb4dULL,
0x86a1cccc6d1c97ffULL, 0x2b321ef9f9d5a1a6ULL,
0xb118f90be2c74985ULL, 0x1c8b2b3e760e7fdcULL,
0x47ac8f555f9c136eULL, 0xea3f5d60cb552537ULL,
0xf1e3c7830cb8ca0aULL, 0x5c7015b69871fc53ULL,
0x0757b1ddb1e390e1ULL, 0xaac463e8252aa6b8ULL,
0x6ffc2e15dda8306dULL, 0xc26ffc2049610634ULL,
0x9948584b60f36a86ULL, 0x34db8a7ef43a5cdfULL,
0x2f07109d33d7b3e2ULL, 0x8294c2a8a71e85bbULL,
0xd9b366c38e8ce909ULL, 0x7420b4f61a45df50ULL,
0xee0a530401573773ULL, 0x43998131959e012aULL,
0x18be255abc0c6d98ULL, 0xb52df76f28c55bc1ULL,
0xaef16d8cef28b4fcULL, 0x0362bfb97be182a5ULL,
0x58451bd25273ee17ULL, 0xf5d6c9e7c6bad84eULL,
0xc1830603f09f0808ULL, 0x6c10d43664563e51ULL,
0x3737705d4dc452e3ULL, 0x9aa4a268d90d64baULL,
0x8178388b1ee08b87ULL, 0x2cebeabe8a29bddeULL,
0x77cc4ed5a3bbd16cULL, 0xda5f9ce03772e735ULL,
0x40757b122c600f16ULL, 0xede6a927b8a9394fULL,
0xb6c10d4c913b55fdULL, 0x1b52df7905f263a4ULL,
0x008e459ac21f8c99ULL, 0xad1d97af56d6bac0ULL,
0xf63a33c47f44d672ULL, 0x5ba9e1f1eb8de02bULL,
0xd1d97a0a1a88cd81ULL, 0x7c4aa83f8e41fbd8ULL,
0x276d0c54a7d3976aULL, 0x8afede61331aa133ULL,
0x91224482f4f74e0eULL, 0x3cb196b7603e7857ULL,
0x679632dc49ac14e5ULL, 0xca05e0e9dd6522bcULL,
0x502f071bc677ca9fULL, 0xfdbcd52e52befcc6ULL,
0xa69b71457b2c9074ULL, 0x0b08a370efe5a62dULL,
0x10d4399328084910ULL, 0xbd47eba6bcc17f49ULL,
0xe6604fcd955313fbULL, 0x4bf39df8019a25a2ULL,
0x7fa6521c37bff5e4ULL, 0xd2358029a376c3bdULL,
0x891224428ae4af0fULL, 0x2481f6771e2d9956ULL,
0x3f5d6c94d9c0766bULL, 0x92cebea14d094032ULL,
0xc9e91aca649b2c80ULL, 0x647ac8fff0521ad9ULL,
0xfe502f0deb40f2faULL, 0x53c3fd387f89c4a3ULL,
0x08e45953561ba811ULL, 0xa5778b66c2d29e48ULL,
0xbeab1185053f7175ULL, 0x1338c3b091f6472cULL,
0x481f67dbb8642b9eULL, 0xe58cb5ee2cad1dc7ULL,
0x20b4f813d42f8b12ULL, 0x8d272a2640e6bd4bULL,
0xd6008e4d6974d1f9ULL, 0x7b935c78fdbde7a0ULL,
0x604fc69b3a50089dULL, 0xcddc14aeae993ec4ULL,
0x96fbb0c5870b5276ULL, 0x3b6862f013c2642fULL,
0xa142850208d08c0cULL, 0x0cd157379c19ba55ULL,
0x57f6f35cb58bd6e7ULL, 0xfa6521692142e0beULL,
0xe1b9bb8ae6af0f83ULL, 0x4c2a69bf726639daULL,
0x170dcdd45bf45568ULL, 0xba9e1fe1cf3d6331ULL,
0x8ecbd005f918b377ULL, 0x235802306dd1852eULL,
0x787fa65b4443e99cULL, 0xd5ec746ed08adfc5ULL,
0xce30ee8d176730f8ULL, 0x63a33cb883ae06a1ULL,
0x388498d3aa3c6a13ULL, 0x95174ae63ef55c4aULL,
0x0f3dad1425e7b469ULL, 0xa2ae7f21b12e8230ULL,
0xf989db4a98bcee82ULL, 0x541a097f0c75d8dbULL,
0x4fc6939ccb9837e6ULL, 0xe25541a95f5101bfULL,
0xb972e5c276c36d0dULL, 0x14e137f7e20a5b54ULL
};
uint64_t crc64_ecma_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len)
{
uint64_t i, crc = ~seed;
@ -886,3 +1148,27 @@ uint64_t crc64_jones_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len)
return ~crc;
}
uint64_t crc64_rocksoft_refl_base(uint64_t seed, const uint8_t * buf, uint64_t len)
{
uint64_t i, crc = ~seed;
for (i = 0; i < len; i++) {
uint8_t byte = buf[i];
crc = crc64_rocksoft_refl_table[(uint8_t) crc ^ byte] ^ (crc >> 8);
}
return ~crc;
}
uint64_t crc64_rocksoft_norm_base(uint64_t seed, const uint8_t * buf, uint64_t len)
{
uint64_t i, crc = ~seed;
for (i = 0; i < len; i++) {
uint8_t byte = buf[i];
crc = crc64_rocksoft_norm_table[((crc >> 56) ^ byte) & 0xff] ^ (crc << 8);
}
return ~crc;
}

View File

@ -68,7 +68,9 @@ func_case_t test_funcs[] = {
{"crc64_iso_norm", crc64_iso_norm, crc64_iso_norm_base},
{"crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base},
{"crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base},
{"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base}
{"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base},
{"crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base},
{"crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base}
};
int main(int argc, char *argv[])

View File

@ -63,7 +63,11 @@ func_case_t test_funcs[] = {
{"crc64_iso_refl", crc64_iso_refl, crc64_iso_refl_base, crc64_iso_refl_ref},
{"crc64_jones_norm", crc64_jones_norm, crc64_jones_norm_base,
crc64_jones_norm_ref},
{"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base, crc64_jones_refl_ref}
{"crc64_jones_refl", crc64_jones_refl, crc64_jones_refl_base, crc64_jones_refl_ref},
{"crc64_rocksoft_norm", crc64_rocksoft_norm, crc64_rocksoft_norm_base,
crc64_rocksoft_norm_ref},
{"crc64_rocksoft_refl", crc64_rocksoft_refl, crc64_rocksoft_refl_base,
crc64_rocksoft_refl_ref}
};
// Generates pseudo-random data

View File

@ -55,6 +55,12 @@ extern crc64_jones_refl_base
extern crc64_jones_norm_by8
extern crc64_jones_norm_base
extern crc64_rocksoft_refl_by8
extern crc64_rocksoft_refl_base
extern crc64_rocksoft_norm_by8
extern crc64_rocksoft_norm_base
%if (AS_FEATURE_LEVEL) >= 10
extern crc64_iso_refl_by16_10
extern crc64_iso_norm_by16_10
@ -62,6 +68,8 @@ extern crc64_jones_refl_by16_10
extern crc64_jones_norm_by16_10
extern crc64_ecma_refl_by16_10
extern crc64_ecma_norm_by16_10
extern crc64_rocksoft_refl_by16_10
extern crc64_rocksoft_norm_by16_10
%endif
section .text
@ -82,3 +90,8 @@ mbin_interface crc64_jones_refl
mbin_dispatch_init7 crc64_jones_refl, crc64_jones_refl_base, crc64_jones_refl_by8, crc64_jones_refl_by8, crc64_jones_refl_by8, crc64_jones_refl_by8, crc64_jones_refl_by16_10
mbin_interface crc64_jones_norm
mbin_dispatch_init7 crc64_jones_norm, crc64_jones_norm_base, crc64_jones_norm_by8, crc64_jones_norm_by8, crc64_jones_norm_by8, crc64_jones_norm_by8, crc64_jones_norm_by16_10
mbin_interface crc64_rocksoft_refl
mbin_dispatch_init7 crc64_rocksoft_refl, crc64_rocksoft_refl_base, crc64_rocksoft_refl_by8, crc64_rocksoft_refl_by8, crc64_rocksoft_refl_by8, crc64_rocksoft_refl_by8, crc64_rocksoft_refl_by16_10
mbin_interface crc64_rocksoft_norm
mbin_dispatch_init7 crc64_rocksoft_norm, crc64_rocksoft_norm_base, crc64_rocksoft_norm_by8, crc64_rocksoft_norm_by8, crc64_rocksoft_norm_by8, crc64_rocksoft_norm_by8, crc64_rocksoft_norm_by16_10

View File

@ -1,5 +1,5 @@
/**********************************************************************
Copyright(c) 2011-2016 Intel Corporation All rights reserved.
Copyright(c) 2011-2023 Intel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -141,6 +141,39 @@ static inline uint64_t crc64_jones_norm_ref(uint64_t seed, const uint8_t * buf,
return ~rem;
}
// crc64_rocksoft reference function, slow crc64 from the definition.
static inline uint64_t crc64_rocksoft_refl_ref(uint64_t seed, const uint8_t * buf, uint64_t len)
{
uint64_t rem = ~seed;
unsigned int i, j;
uint64_t poly = 0x9a6c9329ac4bc9b5ULL; // Rocksoft coefficients reflected
for (i = 0; i < len; i++) {
rem = rem ^ (uint64_t) buf[i];
for (j = 0; j < MAX_ITER; j++) {
rem = (rem & 0x1ULL ? poly : 0) ^ (rem >> 1);
}
}
return ~rem;
}
static inline uint64_t crc64_rocksoft_norm_ref(uint64_t seed, const uint8_t * buf, uint64_t len)
{
uint64_t rem = ~seed;
unsigned int i, j;
uint64_t poly = 0xad93d23594c93659ULL; // Rocksoft coefficients
for (i = 0; i < len; i++) {
rem = rem ^ ((uint64_t) buf[i] << 56);
for (j = 0; j < MAX_ITER; j++) {
rem = (rem & 0x8000000000000000ULL ? poly : 0) ^ (rem << 1);
}
}
return ~rem;
}
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,61 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2023 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%define FUNCTION_NAME crc64_rocksoft_norm_by16_10
%define USE_CONSTS
%macro INCLUDE_CONSTS 0
rk_1: dq 0x215befd5f6cab253
rk_2: dq 0x7aa72c050f9667d8
rk1: dq 0x6b08c948f0dd2f08
rk2: dq 0x08578ba97f0476ae
rk3: dq 0x769362f0dbe943f4
rk4: dq 0x0473f99cf02ca70a
rk5: dq 0x6b08c948f0dd2f08
rk6: dq 0x0000000000000000
rk7: dq 0xddf3eeb298be6fc8
rk8: dq 0xad93d23594c93659
rk9: dq 0x7a76a57804234c52
rk10: dq 0xde8b0150a1beb44f
rk11: dq 0x12ecd688e48b5e58
rk12: dq 0x25d6d64f613c7e21
rk13: dq 0xe2801cfa1cf1efd9
rk14: dq 0xff203e17611aa1bc
rk15: dq 0xb4414e6a0488488c
rk16: dq 0xa42a30f19b669860
rk17: dq 0x0f3bfc1a64bec9d3
rk18: dq 0x1e0a4b0ee06bd77a
rk19: dq 0x644bd74573ba0f0e
rk20: dq 0x015e409234e87a1a
rk_1b: dq 0x6b08c948f0dd2f08
rk_2b: dq 0x08578ba97f0476ae
dq 0x0000000000000000
dq 0x0000000000000000
%endm
%include "crc64_iso_norm_by16_10.asm"

View File

@ -0,0 +1,75 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2023 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%define FUNCTION_NAME crc64_rocksoft_norm_by8
%define USE_CONSTS
%macro INCLUDE_CONSTS 0
rk1:
DQ 0x6b08c948f0dd2f08
rk2:
DQ 0x08578ba97f0476ae
rk3:
DQ 0x769362f0dbe943f4
rk4:
DQ 0x0473f99cf02ca70a
rk5:
DQ 0x6b08c948f0dd2f08
rk6:
DQ 0x0000000000000000
rk7:
DQ 0xddf3eeb298be6fc8
rk8:
DQ 0xad93d23594c93659
rk9:
DQ 0x7a76a57804234c52
rk10:
DQ 0xde8b0150a1beb44f
rk11:
DQ 0x12ecd688e48b5e58
rk12:
DQ 0x25d6d64f613c7e21
rk13:
DQ 0xe2801cfa1cf1efd9
rk14:
DQ 0xff203e17611aa1bc
rk15:
DQ 0xb4414e6a0488488c
rk16:
DQ 0xa42a30f19b669860
rk17:
DQ 0x0f3bfc1a64bec9d3
rk18:
DQ 0x1e0a4b0ee06bd77a
rk19:
DQ 0x644bd74573ba0f0e
rk20:
DQ 0x015e409234e87a1a
%endm
%include "crc64_iso_norm_by8.asm"

View File

@ -0,0 +1,61 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2023 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%define FUNCTION_NAME crc64_rocksoft_refl_by16_10
%define USE_CONSTS
%macro INCLUDE_CONSTS 0
rk_1: dq 0xa043808c0f782663
rk_2: dq 0x37ccd3e14069cabc
rk1: dq 0x21e9761e252621ac
rk2: dq 0xeadc41fd2ba3d420
rk3: dq 0x5f852fb61e8d92dc
rk4: dq 0xa1ca681e733f9c40
rk5: dq 0x21e9761e252621ac
rk6: dq 0x0000000000000000
rk7: dq 0x27ecfa329aef9f77
rk8: dq 0x34d926535897936a
rk9: dq 0x946588403d4adcbc
rk10: dq 0xd083dd594d96319d
rk11: dq 0x34f5a24e22d66e90
rk12: dq 0x3c255f5ebc414423
rk13: dq 0x03363823e6e791e5
rk14: dq 0x7b0ab10dd0f809fe
rk15: dq 0x62242240ace5045a
rk16: dq 0x0c32cdb31e18a84a
rk17: dq 0xa3ffdc1fe8e82a8b
rk18: dq 0xbdd7ac0ee1a4a0f0
rk19: dq 0xe1e0bb9d45d7a44c
rk20: dq 0xb0bc2e589204f500
rk1_b: dq 0x21e9761e252621ac
rk2_b: dq 0xeadc41fd2ba3d420
dq 0x0000000000000000
dq 0x0000000000000000
%endm
%include "crc64_iso_refl_by16_10.asm"

View File

@ -0,0 +1,75 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2023 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%define FUNCTION_NAME crc64_rocksoft_refl_by8
%define USE_CONSTS
%macro INCLUDE_CONSTS 0
rk1:
DQ 0x21e9761e252621ac
rk2:
DQ 0xeadc41fd2ba3d420
rk3:
DQ 0x5f852fb61e8d92dc
rk4:
DQ 0xa1ca681e733f9c40
rk5:
DQ 0x21e9761e252621ac
rk6:
DQ 0x0000000000000000
rk7:
DQ 0x27ecfa329aef9f77
rk8:
DQ 0x34d926535897936a
rk9:
DQ 0x946588403d4adcbc
rk10:
DQ 0xd083dd594d96319d
rk11:
DQ 0x34f5a24e22d66e90
rk12:
DQ 0x3c255f5ebc414423
rk13:
DQ 0x03363823e6e791e5
rk14:
DQ 0x7b0ab10dd0f809fe
rk15:
DQ 0x62242240ace5045a
rk16:
DQ 0x0c32cdb31e18a84a
rk17:
DQ 0xa3ffdc1fe8e82a8b
rk18:
DQ 0xbdd7ac0ee1a4a0f0
rk19:
DQ 0xe1e0bb9d45d7a44c
rk20:
DQ 0xb0bc2e589204f500
%endm
%include "crc64_iso_refl_by8.asm"

View File

@ -85,3 +85,13 @@ uint64_t crc64_jones_norm(uint64_t seed, const uint8_t * buf, uint64_t len)
{
return crc64_jones_norm_base(seed, buf, len);
}
uint64_t crc64_rocksoft_refl(uint64_t seed, const uint8_t * buf, uint64_t len)
{
return crc64_rocksoft_refl_base(seed, buf, len);
}
uint64_t crc64_rocksoft_norm(uint64_t seed, const uint8_t * buf, uint64_t len)
{
return crc64_rocksoft_norm_base(seed, buf, len);
}

View File

@ -1,5 +1,5 @@
/**********************************************************************
Copyright(c) 2011-2016 Intel Corporation All rights reserved.
Copyright(c) 2011-2023 Intel Corporation All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -130,6 +130,34 @@ uint64_t crc64_jones_norm(
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format, runs
* appropriate version.
*
* This function determines what instruction sets are enabled and
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format, runs
* appropriate version.
*
* This function determines what instruction sets are enabled and
* selects the appropriate version at runtime.
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/* Arch specific versions */
/**
@ -270,6 +298,52 @@ uint64_t crc64_jones_norm_base(
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format.
* @requires SSE3, CLMUL
*
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in reflected format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_refl_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format.
* @requires SSE3, CLMUL
*
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm_by8(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
/**
* @brief Generate CRC from "Rocksoft" coefficients in normal format, runs baseline version
* @returns 64 bit CRC
*/
uint64_t crc64_rocksoft_norm_base(
uint64_t init_crc, //!< initial CRC value, 64 bits
const unsigned char *buf, //!< buffer to calculate CRC on
uint64_t len //!< buffer length in bytes (64-bit data)
);
#ifdef __cplusplus
}
#endif

View File

@ -116,3 +116,7 @@ isal_adler32 @111
isal_deflate_process_dict @112
isal_deflate_reset_dict @113
gf_inv @114
crc64_rocksoft_norm_base @115
crc64_rocksoft_refl_base @116
crc64_rocksoft_norm @117
crc64_rocksoft_refl @118