LCOV - code coverage report
Current view: top level - include/vdso - math64.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 8 8 100.0 %
Date: 2021-04-22 12:43:58 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #ifndef __VDSO_MATH64_H
       3             : #define __VDSO_MATH64_H
       4             : 
       5             : static __always_inline u32
       6        9455 : __iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder)
       7             : {
       8        1144 :         u32 ret = 0;
       9             : 
      10       12327 :         while (dividend >= divisor) {
      11             :                 /* The following asm() prevents the compiler from
      12             :                    optimising this loop into a modulo operation.  */
      13        2872 :                 asm("" : "+rm"(dividend));
      14             : 
      15        2872 :                 dividend -= divisor;
      16        2872 :                 ret++;
      17             :         }
      18             : 
      19        9455 :         *remainder = dividend;
      20             : 
      21        9455 :         return ret;
      22             : }
      23             : 
      24             : #endif /* __VDSO_MATH64_H */

Generated by: LCOV version 1.14