6.12 __crc32cb, __crc32ch, __crc32cw, __crc32cd Intrinsic Function
Calculates a CRC32C checksum from a checksum (or initial value) crc and one item of data.
Note: The 32-bit Arm/Thumb instructions do not include CRC32CX, so
__crc32cd
is implemented as two calls to
__crc32cw
. These intrinsic functions are defined according to the Arm C Language Extensions (ACLE).
For XC32, __crc32cd
is not supported.
Suggested Replacement
__builtin_arm_crc32cb
__builtin_arm_crc32ch
__builtin_arm_crc32cw
Caveats
None.
Examples
Consider migrating IAR code such
as:
unsigned int __crc32cb(unsigned int crc, unsigned char data);
unsigned int __crc32ch(unsigned int crc, unsigned short data);
unsigned int __crc32cw(unsigned int crc, unsigned int data);
unsigned int __crc32cd(unsigned int crc, unsigned long long data);
to
MPLAB XC codes similar
to:unsigned int __builtin_arm_crc32cb(unsigned int crc, unsigned char data);
unsigned int __builtin_arm_crc32ch(unsigned int crc, unsigned short data);
unsigned int __builtin_arm_crc32cw(unsigned int crc, unsigned int data);
unsigned int __builtin_arm_crc32cd(unsigned int crc, unsigned long long data);
Further Information
None.