Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Multiply the natural numbers u (pointed to by UP) and v (pointed to by VP),* both with SIZE limbs, and store the result at PRODP. 2 * SIZE limbs are* always stored. Return the most significant limb.* Argument constraints:* 1

Proto:static mpi_limb_t mul_n_basecase(mpi_ptr_t prodp, mpi_ptr_t up, mpi_ptr_t vp, mpi_size_t size)

Type:mpi_limb_t

Parameter:

TypeParameterName
mpi_ptr_tprodp
mpi_ptr_tup
mpi_ptr_tvp
mpi_size_tsize
63  v_limb = vp[0]
64  If v_limb <= 1 Then
65  If v_limb == 1 Then Copy N limbs from S to D. (prodp, up, size)
67  Else Zero N limbs at D (prodp, size)
69  cy = 0
70  Else cy = mpihelp_mul_1(prodp, up, size, v_limb)
73  prodp[size] = cy
74  prodp++
78  When i < size cycle
79  v_limb = vp[i]
80  If v_limb <= 1 Then
81  cy = 0
82  If v_limb == 1 Then cy = mpihelp_add_n(prodp, prodp, up, size)
84  Else cy = mpihelp_addmul_1(prodp, up, size, v_limb)
87  prodp[size] = cy
88  prodp++
91  Return cy