tests/sys/kern/crc32: Check for SSE4.2 before using it
authorAlex Richardson <arichardson@FreeBSD.org>
Tue, 2 Feb 2021 09:52:52 +0000 (09:52 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Tue, 2 Feb 2021 09:53:39 +0000 (09:53 +0000)
commit83c20b8a2da04937cf4af127366b3dc92c855784
tree58182915f7e11feb7dc6d7d8518fd6e79035db48
parentc69047ca7526090cc2aa92c57d9f21a77a82fc2e
tests/sys/kern/crc32: Check for SSE4.2 before using it

This avoids a SIGILL when running these tests on QEMU (which
defaults to a basic amd64 CPU without SSE4.2).

This commit also tests the table-based implementations in addition to
testing the hw-accelerated crc32 versions.

Reviewed By: cem, kib, markj
Differential Revision: https://reviews.freebsd.org/D28395
sys/libkern/gsb_crc32.c
sys/sys/gsb_crc32.h
tests/sys/kern/Makefile
tests/sys/kern/libkern_crc32.c