Update to FreeBSD head 2017-10-01

Git mirror commit b2f0376b45428f13151d229c5ae9d4d8f74acbd1.

Update #3472.
This commit is contained in:
Sebastian Huber
2018-08-09 13:04:41 +02:00
parent c37f9fba70
commit e4a8065910
164 changed files with 2619 additions and 1406 deletions

View File

@@ -48,6 +48,8 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#ifdef _KERNEL
#include <sys/libkern.h>
#include <sys/systm.h>
@@ -59,6 +61,7 @@ __FBSDID("$FreeBSD$");
#if defined(__aarch64__)
#include <machine/cpu.h>
#endif
#endif /* _KERNEL */
const uint32_t crc32_tab[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
@@ -761,6 +764,7 @@ calculate_crc32c(uint32_t crc32c,
const unsigned char *buffer,
unsigned int length)
{
#ifdef _KERNEL
#if defined(__amd64__) || defined(__i386__)
if ((cpu_feature2 & CPUID2_SSE42) != 0) {
return (sse42_crc32c(crc32c, buffer, length));
@@ -778,6 +782,7 @@ calculate_crc32c(uint32_t crc32c,
return (armv8_crc32c(crc32c, buffer, length));
} else
#endif
#endif /* _KERNEL */
if (length < 4) {
return (singletable_crc32c(crc32c, buffer, length));
} else {