-
+ 531BBAA56146A75CF0632ABD688C4FB260DE0F3BCBA9C841A6F4868D3B8A3769FE05C42C5E290A1C573425F5583647EE2C41F6FE24E428B66C745ED52467DCE6ffa/libffa/w_shifts.ads(0 . 0)(1 . 58)
817 ------------------------------------------------------------------------------
818 ------------------------------------------------------------------------------
819 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
820 -- --
821 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
822 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
823 -- --
824 -- You do not have, nor can you ever acquire the right to use, copy or --
825 -- distribute this software ; Should you use this software for any purpose, --
826 -- or copy and distribute it to anyone or in any manner, you are breaking --
827 -- the laws of whatever soi-disant jurisdiction, and you promise to --
828 -- continue doing so for the indefinite future. In any case, please --
829 -- always : read and understand any software ; verify any PGP signatures --
830 -- that you use - for any purpose. --
831 -- --
832 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
833 ------------------------------------------------------------------------------
834 ------------------------------------------------------------------------------
835
836 with Words; use Words;
837
838 -- For some peculiar reason, the Ada standards group made
839 -- the fundamental Shift and Rotate bitwise ops into ~optional~ components!
840
841 -- However on GNAT we can force them to exist, as described in:
842 -- https://gcc.gnu.org/onlinedocs/gnat_rm/Shifts-and-Rotates.html
843
844 -- On a non-GNAT compiler, you're own your own.
845
846 package W_Shifts is
847
848 pragma Pure;
849
850 function Shift_Left
851 (Value : Word;
852 Amount : Natural)
853 return Word;
854 pragma Import(Intrinsic, Shift_Left);
855
856 function Shift_Right
857 (Value : Word;
858 Amount : Natural)
859 return Word;
860 pragma Import(Intrinsic, Shift_Right);
861
862 function Rotate_Left
863 (Value : Word;
864 Amount : Natural)
865 return Word;
866 pragma Import(Intrinsic, Rotate_Left);
867
868 function Rotate_Right
869 (Value : Word;
870 Amount : Natural)
871 return Word;
872 pragma Import(Intrinsic, Rotate_Right);
873
874 end W_Shifts;