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 -- For some peculiar reason, the Ada standards group made
ffa_ch1_genesis.kv 23 -- the fundamental Shift and Rotate bitwise ops into ~optional~ components!
ffa_ch1_genesis.kv 24
ffa_ch1_genesis.kv 25 -- However on GNAT we can force them to exist, as described in:
ffa_ch1_genesis.kv 26 -- https://gcc.gnu.org/onlinedocs/gnat_rm/Shifts-and-Rotates.html
ffa_ch1_genesis.kv 27
ffa_ch1_genesis.kv 28 -- On a non-GNAT compiler, you're own your own.
ffa_ch1_genesis.kv 29
ffa_ch1_genesis.kv 30 package W_Shifts is
ffa_ch1_genesis.kv 31
ffa_ch1_genesis.kv 32 pragma Pure;
ffa_ch1_genesis.kv 33
ffa_ch1_genesis.kv 34 function Shift_Left
ffa_ch1_genesis.kv 35 (Value : Word;
ffa_ch1_genesis.kv 36 Amount : Natural)
ffa_ch1_genesis.kv 37 return Word;
ffa_ch1_genesis.kv 38 pragma Import(Intrinsic, Shift_Left);
ffa_ch11_tuning_a... 39 pragma Inline_Always(Shift_Left);
ffa_ch1_genesis.kv 40
ffa_ch1_genesis.kv 41 function Shift_Right
ffa_ch1_genesis.kv 42 (Value : Word;
ffa_ch1_genesis.kv 43 Amount : Natural)
ffa_ch1_genesis.kv 44 return Word;
ffa_ch1_genesis.kv 45 pragma Import(Intrinsic, Shift_Right);
ffa_ch11_tuning_a... 46 pragma Inline_Always(Shift_Right);
ffa_ch1_genesis.kv 47
ffa_ch1_genesis.kv 48 function Rotate_Left
ffa_ch1_genesis.kv 49 (Value : Word;
ffa_ch1_genesis.kv 50 Amount : Natural)
ffa_ch1_genesis.kv 51 return Word;
ffa_ch1_genesis.kv 52 pragma Import(Intrinsic, Rotate_Left);
ffa_ch11_tuning_a... 53 pragma Inline_Always(Rotate_Left);
ffa_ch1_genesis.kv 54
ffa_ch1_genesis.kv 55 function Rotate_Right
ffa_ch1_genesis.kv 56 (Value : Word;
ffa_ch1_genesis.kv 57 Amount : Natural)
ffa_ch1_genesis.kv 58 return Word;
ffa_ch1_genesis.kv 59 pragma Import(Intrinsic, Rotate_Right);
ffa_ch11_tuning_a... 60 pragma Inline_Always(Rotate_Right);
ffa_ch1_genesis.kv 61
ffa_ch1_genesis.kv 62 end W_Shifts;