Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/kern/libkern_crc32.c
Show All 21 Lines | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/crc32.h> | |||||
#include <stdint.h> | #include <stdint.h> | ||||
#include <atf-c.h> | #include <atf-c.h> | ||||
#if defined(__amd64__) || defined(__i386__) | #if !defined(__amd64__) && !defined(__i386__) && !defined(__aarch64__) | ||||
extern uint32_t sse42_crc32c(uint32_t, const unsigned char *, unsigned); | |||||
#elif defined(__aarch64__) | |||||
extern uint32_t armv8_crc32c(uint32_t, const unsigned char *, unsigned); | |||||
#else | |||||
#error These tests are not supported on this platform | #error These tests are not supported on this platform | ||||
#endif | #endif | ||||
ATF_TC_WITHOUT_HEAD(crc32c_basic_correctness); | ATF_TC_WITHOUT_HEAD(crc32c_basic_correctness); | ||||
ATF_TC_BODY(crc32c_basic_correctness, tc) | ATF_TC_BODY(crc32c_basic_correctness, tc) | ||||
{ | { | ||||
const uint64_t inputs[] = { | const uint64_t inputs[] = { | ||||
0xf408c634b3a9142, | 0xf408c634b3a9142, | ||||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |