-
+ 28A09B8F85E67C25816A78E1EED67A34FFFDDE6A8F2879736FE1B6C6A00ABF037D6C7A09AD85EB8CC3C13AB9F01C2D8FA7C97821EA649F0A292E1CF591B81323
ffa/libffa/fz_shift.ads
(0 . 0)(1 . 78)
542 ------------------------------------------------------------------------------
543 ------------------------------------------------------------------------------
544 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
545 -- --
546 -- (C) 2017 Stanislav Datskovskiy ( www.loper-os.org ) --
547 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
548 -- --
549 -- You do not have, nor can you ever acquire the right to use, copy or --
550 -- distribute this software ; Should you use this software for any purpose, --
551 -- or copy and distribute it to anyone or in any manner, you are breaking --
552 -- the laws of whatever soi-disant jurisdiction, and you promise to --
553 -- continue doing so for the indefinite future. In any case, please --
554 -- always : read and understand any software ; verify any PGP signatures --
555 -- that you use - for any purpose. --
556 -- --
557 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
558 ------------------------------------------------------------------------------
559 ------------------------------------------------------------------------------
560
561 with Words; use Words;
562 with FZ_Type; use FZ_Type;
563
564
565 package FZ_Shift is
566
567 pragma Pure;
568
569 --------------------------------------------------------------
570 -- Shift Right
571 --------------------------------------------------------------
572
573 -- ShiftedN := N >> Count (with Overflow Input and Output)
574 procedure FZ_ShiftRight_O_I(N : in FZ;
575 ShiftedN : out FZ;
576 Count : in WBit_Index;
577 Overflow : out Word;
578 OF_in : in Word);
579 pragma Precondition(N'Length = ShiftedN'Length);
580
581 -- ShiftedN := N >> Count (with Overflow Output only)
582 procedure FZ_ShiftRight_O(N : in FZ;
583 ShiftedN : out FZ;
584 Count : in WBit_Index;
585 Overflow : out Word);
586 pragma Precondition(N'Length = ShiftedN'Length);
587
588 -- ShiftedN := N >> Count (no Overflow output or input)
589 procedure FZ_ShiftRight(N : in FZ;
590 ShiftedN : out FZ;
591 Count : in WBit_Index);
592 pragma Precondition(N'Length = ShiftedN'Length);
593
594 --------------------------------------------------------------
595 -- Shift Left
596 --------------------------------------------------------------
597
598 -- ShiftedN := N << Count (with Overflow Input and Output)
599 procedure FZ_ShiftLeft_O_I(N : in FZ;
600 ShiftedN : out FZ;
601 Count : in WBit_Index;
602 Overflow : out Word;
603 OF_in : in Word);
604 pragma Precondition(N'Length = ShiftedN'Length);
605
606 -- ShiftedN := N << Count (with Overflow Output only)
607 procedure FZ_ShiftLeft_O(N : in FZ;
608 ShiftedN : out FZ;
609 Count : in WBit_Index;
610 Overflow : out Word);
611 pragma Precondition(N'Length = ShiftedN'Length);
612
613 -- ShiftedN := N << Count (no Overflow output or input)
614 procedure FZ_ShiftLeft(N : in FZ;
615 ShiftedN : out FZ;
616 Count : in WBit_Index);
617 pragma Precondition(N'Length = ShiftedN'Length);
618
619 end FZ_Shift;