Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Shift U (pointed to by UP and USIZE digits long) CNT bits to the left* and store the USIZE least significant digits of the result at WP.* Return the bits shifted out from the most significant digit.* Argument constraints:* 1. 0 < CNT < BITS_PER_MP_LIMB* 2

Proto:mpi_limb_t mpihelp_lshift(mpi_ptr_t wp, mpi_ptr_t up, mpi_size_t usize, unsigned int cnt)

Type:mpi_limb_t

Parameter:

TypeParameterName
mpi_ptr_twp
mpi_ptr_tup
mpi_size_tusize
unsigned intcnt
35  sh_1 = cnt
36  wp += 1
37  sh_2 = BITS_PER_MPI_LIMB - sh_1
38  i = usize - 1
39  low_limb = up[i]
40  retval = low_limb >> sh_2
41  high_limb = low_limb
42  When --i >= 0 cycle
43  low_limb = up[i]
44  wp[i] = high_limb << sh_1 | low_limb >> sh_2
45  high_limb = low_limb
47  wp[i] = high_limb << sh_1
49  Return retval
Caller
NameDescribe
mpi_powmRES = BASE ^ EXP mod MOD