LCOV - code coverage report
Current view: top level - lib/eal/x86/include - rte_byteorder_64.h (source / functions) Hit Total Coverage
Test: Code coverage Lines: 1 3 33.3 %
Date: 2024-01-22 15:35:40 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  * Copyright(c) 2010-2014 Intel Corporation
       3                 :            :  */
       4                 :            : 
       5                 :            : #ifndef _RTE_BYTEORDER_X86_H_
       6                 :            : #error do not include this file directly, use <rte_byteorder.h> instead
       7                 :            : #endif
       8                 :            : 
       9                 :            : #ifndef _RTE_BYTEORDER_X86_64_H_
      10                 :            : #define _RTE_BYTEORDER_X86_64_H_
      11                 :            : 
      12                 :            : #include <stdint.h>
      13                 :            : #include <rte_common.h>
      14                 :            : 
      15                 :            : /*
      16                 :            :  * An architecture-optimized byte swap for a 64-bit value.
      17                 :            :  *
      18                 :            :  * Do not use this function directly. The preferred function is rte_bswap64().
      19                 :            :  */
      20                 :            : /* 64-bit mode */
      21                 :          0 : static inline uint64_t rte_arch_bswap64(uint64_t _x)
      22                 :            : {
      23                 :            :         uint64_t x = _x;
      24                 :          4 :         asm volatile ("bswap %[x]"
      25                 :            :                       : [x] "+r" (x)
      26                 :            :                       );
      27                 :          0 :         return x;
      28                 :            : }
      29                 :            : 
      30                 :            : #endif /* _RTE_BYTEORDER_X86_64_H_ */

Generated by: LCOV version 1.14