diff options
author | tuexen <tuexen@FreeBSD.org> | 2017-06-01 09:00:38 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2017-06-01 09:00:38 +0000 |
commit | 2f7fd785bc7cf75ead8ffac67a74edeb62c7d0c7 (patch) | |
tree | fd124a7e73656e650bf6662869bc348476d31ff6 /sys/sys | |
parent | e6c0f4792f47e2613dbb38acb329c8f57dd3bbab (diff) | |
download | FreeBSD-src-2f7fd785bc7cf75ead8ffac67a74edeb62c7d0c7.zip FreeBSD-src-2f7fd785bc7cf75ead8ffac67a74edeb62c7d0c7.tar.gz |
MFC r317512:
armv8 has support for optional CRC32C instructions. This patch checks if they are
available and if that is true make use of them.
Thank you very much to Andrew Turner for providing help and review the patch!
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D10499
Diffstat (limited to 'sys/sys')
-rw-r--r-- | sys/sys/libkern.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index a960df8..b622dd8 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -182,6 +182,9 @@ calculate_crc32c(uint32_t crc32c, const unsigned char *buffer, #if defined(__amd64__) || defined(__i386__) uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); #endif +#if defined(__aarch64__) +uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned int); +#endif #endif |