From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DA1465A85 for ; Thu, 5 Mar 2015 14:15:53 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 05 Mar 2015 05:15:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,347,1422950400"; d="scan'208";a="694351526" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 05 Mar 2015 05:15:52 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t25DFnbI010898; Thu, 5 Mar 2015 21:15:49 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t25DFkE6013343; Thu, 5 Mar 2015 21:15:48 +0800 Received: (from dayuqiu@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t25DFkXN013339; Thu, 5 Mar 2015 21:15:46 +0800 From: Michael Qiu To: dev@dpdk.org Date: Thu, 5 Mar 2015 21:15:37 +0800 Message-Id: <1425561339-13300-2-git-send-email-michael.qiu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1425561339-13300-1-git-send-email-michael.qiu@intel.com> References: <1425561339-13300-1-git-send-email-michael.qiu@intel.com> Subject: [dpdk-dev] [PATCH 1/3] librte_hash: Fix unsupported instruction `crc32' in i686 platform X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 13:15:54 -0000 CC rte_hash.o Error: unsupported instruction `crc32' The root cause is that i686 platform does not support 'crc32q' Need make it only available in x86_64 platform Signed-off-by: Michael Qiu --- lib/librte_hash/rte_hash_crc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h index d28bb2a..4e9546f 100644 --- a/lib/librte_hash/rte_hash_crc.h +++ b/lib/librte_hash/rte_hash_crc.h @@ -374,6 +374,7 @@ crc32c_sse42_u32(uint32_t data, uint32_t init_val) return init_val; } +#ifdef RTE_ARCH_X86_64 static inline uint32_t crc32c_sse42_u64(uint64_t data, uint64_t init_val) { @@ -383,6 +384,7 @@ crc32c_sse42_u64(uint64_t data, uint64_t init_val) : [data] "rm" (data)); return init_val; } +#endif static inline uint32_t crc32c_sse42_u64_mimic(uint64_t data, uint64_t init_val) @@ -476,8 +478,10 @@ rte_hash_crc_4byte(uint32_t data, uint32_t init_val) static inline uint32_t rte_hash_crc_8byte(uint64_t data, uint32_t init_val) { +#ifdef RTE_ARCH_X86_64 if (likely(crc32_alg == CRC32_SSE42_x64)) return crc32c_sse42_u64(data, init_val); +#endif if (likely(crc32_alg & CRC32_SSE42)) return crc32c_sse42_u64_mimic(data, init_val); -- 1.9.3