Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\math\reciprocal_div.c Create Date:2022-07-28 06:43:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reciprocal_value_adv

Proto:struct reciprocal_value_adv reciprocal_value_adv(u32 d, u8 prec)

Type:struct reciprocal_value_adv

Parameter:

TypeParameterName
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 + l - prec )
50  do_div() is NOT a C function(mhigh, d)
52  When post_shift > 0 cycle
53  lo = mlow >> 1 , hi = mhigh >> 1
55  If lo >= hi Then Break
58  mlow = lo
59  mhigh = hi
62  m = mhigh
63  sh = post_shift
64  exp = l
65  is_wide_m = mhigh > U32_MAX
67  Return R