raw
ffa_ch1_genesis.kv      1 ------------------------------------------------------------------------------
ffa_ch1_genesis.kv 2 ------------------------------------------------------------------------------
ffa_ch1_genesis.kv 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch1_genesis.kv 4 -- --
ffa_ch15_gcd.kv 5 -- (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch1_genesis.kv 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch1_genesis.kv 7 -- --
ffa_ch1_genesis.kv 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch1_genesis.kv 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch1_genesis.kv 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch1_genesis.kv 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch1_genesis.kv 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch1_genesis.kv 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch1_genesis.kv 14 -- that you use - for any purpose. --
ffa_ch1_genesis.kv 15 -- --
ffa_ch1_genesis.kv 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch1_genesis.kv 17 ------------------------------------------------------------------------------
ffa_ch1_genesis.kv 18 ------------------------------------------------------------------------------
ffa_ch1_genesis.kv 19
ffa_ch1_genesis.kv 20 with Words; use Words;
ffa_ch1_genesis.kv 21
ffa_ch1_genesis.kv 22 -- Fundamental Operations on Words:
ffa_ch1_genesis.kv 23 package Word_Ops is
ffa_ch1_genesis.kv 24
ffa_ch1_genesis.kv 25 pragma Pure;
ffa_ch1_genesis.kv 26
ffa_ch1_genesis.kv 27 -- Branch-free calculation of 'carry' from a machine-word addition.
ffa_ch1_genesis.kv 28 function W_Carry(A : in Word; B : in Word; S : in Word)
ffa_ch1_genesis.kv 29 return WBool;
ffa_ch11_tuning_a... 30 pragma Inline_Always(W_Carry);
ffa_ch1_genesis.kv 31
ffa_ch1_genesis.kv 32 -- Branch-free calculation of 'borrow' from a machine-word subtraction.
ffa_ch1_genesis.kv 33 function W_Borrow(A : in Word; B : in Word; D : in Word)
ffa_ch1_genesis.kv 34 return WBool;
ffa_ch11_tuning_a... 35 pragma Inline_Always(W_Borrow);
ffa_ch1_genesis.kv 36
ffa_ch1_genesis.kv 37 -- Without any branching: if Sel == 0, return A; if Sel == 1, return B.
ffa_ch1_genesis.kv 38 function W_Mux(A : in Word; B : in Word; Sel : in WBool)
ffa_ch1_genesis.kv 39 return Word;
ffa_ch11_tuning_a... 40 pragma Inline_Always(W_Mux);
ffa_ch1_genesis.kv 41
ffa_ch1_genesis.kv 42 end Word_Ops;