DPDK  19.02.0
rte_table_hash_func_arm64.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017-2018 Linaro Limited
3  */
4 
5 #ifndef __INCLUDE_RTE_TABLE_HASH_FUNC_ARM64_H__
6 #define __INCLUDE_RTE_TABLE_HASH_FUNC_ARM64_H__
7 
8 #define _CRC32CX(crc, val) \
9  __asm__("crc32cx %w[c], %w[c], %x[v]":[c] "+r" (crc):[v] "r" (val))
10 
11 static inline uint64_t
12 rte_crc32_u64(uint64_t crc, uint64_t v)
13 {
14  uint32_t crc32 = crc;
15 
16  _CRC32CX(crc32, v);
17 
18  return crc32;
19 }
20 
21 #endif