18 lines
348 B
Ada
18 lines
348 B
Ada
package body VSSL.Extensible_Arithmetic is
|
|
|
|
procedure Multiply (
|
|
CO,
|
|
M : out Limb;
|
|
A,
|
|
B : in Limb;
|
|
CI : in Limb := 0)
|
|
is
|
|
P : Product;
|
|
begin
|
|
P := Product (A) * Product (B) + Product (CI);
|
|
M := Limb (P and (2**Limb_Size - 1));
|
|
CO := Limb (Shift_Right (P, Limb_Size));
|
|
end Multiply;
|
|
|
|
end VSSL.Extensible_Arithmetic;
|