X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Farch%2Fppc_64%2Frte_byteorder.h;h=544de3c22d333202083fedd778d5181ea04c066c;hb=119583797b6ae44990934d7b965e76463530ca7a;hp=80436f246041aa636df7d5c76a2ce1670b7b50c7;hpb=72c605807ae855ac64b64a388fe81005336db7c1;p=dpdk.git diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h b/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h index 80436f2460..544de3c22d 100644 --- a/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_byteorder.h @@ -42,6 +42,7 @@ extern "C" { #endif +#include #include "generic/rte_byteorder.h" /* @@ -51,7 +52,7 @@ extern "C" { */ static inline uint16_t rte_arch_bswap16(uint16_t _x) { - return ((_x >> 8) | ((_x << 8) & 0xff00)); + return (_x >> 8) | ((_x << 8) & 0xff00); } /* @@ -61,8 +62,8 @@ static inline uint16_t rte_arch_bswap16(uint16_t _x) */ static inline uint32_t rte_arch_bswap32(uint32_t _x) { - return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) | - ((_x << 24) & 0xff000000)); + return (_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) | + ((_x << 24) & 0xff000000); } /* @@ -73,10 +74,10 @@ static inline uint32_t rte_arch_bswap32(uint32_t _x) /* 64-bit mode */ static inline uint64_t rte_arch_bswap64(uint64_t _x) { - return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | + return (_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) | ((_x >> 8) & 0xff000000) | ((_x << 8) & (0xffULL << 32)) | ((_x << 24) & (0xffULL << 40)) | - ((_x << 40) & (0xffULL << 48)) | ((_x << 56))); + ((_x << 40) & (0xffULL << 48)) | ((_x << 56)); } #ifndef RTE_FORCE_INTRINSICS