From 2f7fd785bc7cf75ead8ffac67a74edeb62c7d0c7 Mon Sep 17 00:00:00 2001 From: tuexen Date: Thu, 1 Jun 2017 09:00:38 +0000 Subject: 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 --- sys/sys/libkern.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/sys') 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 -- cgit v1.1