Commit 99382d2f authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

util: Move architecture detection to crc32c.c



This is only needed within the c file. It doesn't
need to be in the public header.

Change-Id: I0e072ea5eddc6edc84faecee9ef50fb2c20dbb24
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442426


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 608d80a0
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -46,22 +46,6 @@
extern "C" {
#endif

#if defined(__aarch64__) || defined(__AARCH64__)
#ifdef __ARM_FEATURE_CRC32
#define SPDK_HAVE_ARM_CRC
#include <arm_acle.h>
#endif
#endif

#if defined(__x86_64__) && defined(__SSE4_2__)
#ifdef SPDK_CONFIG_ISAL
#define SPDK_HAVE_ISAL
#include <isa-l/include/crc.h>
#else
#define SPDK_HAVE_SSE4_2
#include <x86intrin.h>
#endif
#endif
/**
 * IEEE CRC-32 polynomial (bit reflected)
 */
+17 −0
Original line number Diff line number Diff line
@@ -33,6 +33,23 @@

#include "spdk/crc32.h"

#if defined(__aarch64__) || defined(__AARCH64__)
#ifdef __ARM_FEATURE_CRC32
#define SPDK_HAVE_ARM_CRC
#include <arm_acle.h>
#endif
#endif

#if defined(__x86_64__) && defined(__SSE4_2__)
#ifdef SPDK_CONFIG_ISAL
#define SPDK_HAVE_ISAL
#include <isa-l/include/crc.h>
#else
#define SPDK_HAVE_SSE4_2
#include <x86intrin.h>
#endif
#endif

#ifdef SPDK_HAVE_ISAL

uint32_t