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: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/442426 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
608d80a033
commit
99382d2f7f
@ -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)
|
||||
*/
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user