------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. -- -- -- -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) -- -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html -- -- -- -- You do not have, nor can you ever acquire the right to use, copy or -- -- distribute this software ; Should you use this software for any purpose, -- -- or copy and distribute it to anyone or in any manner, you are breaking -- -- the laws of whatever soi-disant jurisdiction, and you promise to -- -- continue doing so for the indefinite future. In any case, please -- -- always : read and understand any software ; verify any PGP signatures -- -- that you use - for any purpose. -- -- -- -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with FZ_Type; use FZ_Type; with Words; use Words; package FZ_BitOp is pragma Pure; -- Result := X & Y procedure FZ_And(X : in FZ; Y : in FZ; Result : out FZ); pragma Precondition(X'Length = Y'Length and X'Length = Result'Length); -- N := N & W, W is a word procedure FZ_And_W(N : in out FZ; W : in Word); -- Result := X | Y procedure FZ_Or(X : in FZ; Y : in FZ; Result : out FZ); pragma Precondition(X'Length = Y'Length and X'Length = Result'Length); -- N := N | W, W is a word procedure FZ_Or_W(N : in out FZ; W : in Word); -- Result := X ^ Y procedure FZ_Xor(X : in FZ; Y : in FZ; Result : out FZ); pragma Precondition(X'Length = Y'Length and X'Length = Result'Length); -- N := N ^ W, W is a word procedure FZ_Xor_W(N : in out FZ; W : in Word); -- NotN := ~N procedure FZ_Not(N : in FZ; NotN : out FZ); pragma Precondition(N'Length = NotN'Length); end FZ_BitOp;