1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef _RTE_BYTEORDER_X86_H_
6 #error do not include this file directly, use <rte_byteorder.h> instead
9 #ifndef _RTE_BYTEORDER_I686_H_
10 #define _RTE_BYTEORDER_I686_H_
13 #include <rte_byteorder.h>
16 * An architecture-optimized byte swap for a 64-bit value.
18 * Do not use this function directly. The preferred function is rte_bswap64().
20 /* Compat./Leg. mode */
21 static inline uint64_t rte_arch_bswap64(uint64_t x)
24 ret |= ((uint64_t)rte_arch_bswap32(x & 0xffffffffUL) << 32);
25 ret |= ((uint64_t)rte_arch_bswap32((x >> 32) & 0xffffffffUL));
29 #endif /* _RTE_BYTEORDER_I686_H_ */