函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\math\reciprocal_div.c Create Date:2022-07-27 07:40:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:reciprocal_value_adv

函数原型:struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec)

返回类型:struct reciprocal_value_adv

参数:

类型参数名称
u32d
u8prec
38  l等于ls - find last set bit in word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffs, but returns the position of the most significant set bit.* fls(value) returns 0 if value is 0 or the position of the last
43  WARN(l == 32, "ceil(log2(0x%08x)) == 32, %s doesn't support such divisor", d, __func__)
46  post_shift等于l
47  mlow等于1ULL左移32加l
48  do_div() is NOT a C function(mlow, d)
49  mhigh等于1ULL左移32加l位的值加1ULL左移32加lprec位的值
50  do_div() is NOT a C function(mhigh, d)
52 post_shift大于0循环
53  lo等于mlow右移1位, hi等于mhigh右移1位
55  如果lo大于等于hi退出
58  mlow等于lo
59  mhigh等于hi
62  m等于mhigh
63  sh等于post_shift
64  exp等于l
65  is_wide_m等于mhigh大于U32_MAX
67  返回:R