• Marko Mäkelä's avatar
    MDEV-14425 preparation: Provide ut_crc32_low() · 1312b4eb
    Marko Mäkelä authored
    The ut_crc32() function uses a hard-coded initial CRC-32C value of 0.
    Replace it with ut_crc32_low(), which allows to specify the initial
    checksum value, and provide an inlined compatibility wrapper ut_crc32().
    
    Also, remove non-inlined wrapper functions on ARMv8 and POWER8,
    and remove dead code (the generic implementation) on POWER8.
    
    Note: The original AMD64 instruction set architecture in 2003 only
    included SSE2. The CRC-32C instructions are part of the SSE4.2
    instruction set extension for IA-32 and AMD64, with first processors
    released in November 2007 (using the AMD Barcelona microarchitecture)
    and November 2008 (Intel Nehalem microarchiteture). It might be safe
    to assume that SSE4.2 is available on all currently used AMD64 based
    systems, but we are not taking that step yet.
    1312b4eb
ut0crc32.cc 15.8 KB