From: Cyril Chemparathy Date: Thu, 9 Jul 2015 08:25:11 +0000 (+0800) Subject: hash: check SSE flags only on x86 builds X-Git-Tag: spdx-start~8766 X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=67ea75ffc6bcaed5001e3b6f3e93debbfb0df500 hash: check SSE flags only on x86 builds This is necessary because the required CPU flags may not be defined on other architectures. Signed-off-by: Cyril Chemparathy Signed-off-by: Zhigang Lu Acked-by: Bruce Richardson --- diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index abdbd9ad42..1f6f5bfc18 100644 --- a/lib/librte_hash/rte_hash_crc.h +++ b/lib/librte_hash/rte_hash_crc.h @@ -425,12 +425,14 @@ static inline void rte_hash_crc_set_alg(uint8_t alg) { switch (alg) { +#if defined(RTE_ARCH_I686) || defined(RTE_ARCH_X86_64) case CRC32_SSE42_x64: if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T)) alg = CRC32_SSE42; case CRC32_SSE42: if (! rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_2)) alg = CRC32_SW; +#endif case CRC32_SW: crc32_alg = alg; default: