raw
zfp_genesis             1 ------------------------------------------------------------------------------
zfp_genesis 2 ------------------------------------------------------------------------------
zfp_genesis 3 -- You do not have, nor can you ever acquire the right to use, copy or --
zfp_genesis 4 -- distribute this software ; Should you use this software for any purpose, --
zfp_genesis 5 -- or copy and distribute it to anyone or in any manner, you are breaking --
zfp_genesis 6 -- the laws of whatever soi-disant jurisdiction, and you promise to --
zfp_genesis 7 -- continue doing so for the indefinite future. In any case, please --
zfp_genesis 8 -- always : read and understand any software ; verify any PGP signatures --
zfp_genesis 9 -- that you use - for any purpose. --
zfp_genesis 10 -- --
zfp_genesis 11 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
zfp_genesis 12 ------------------------------------------------------------------------------
zfp_genesis 13 ------------------------------------------------------------------------------
zfp_genesis 14
zfp_genesis 15 pragma Compiler_Unit_Warning;
zfp_genesis 16
zfp_genesis 17 package Interfaces is
zfp_genesis 18 pragma No_Elaboration_Code_All;
zfp_genesis 19 pragma Pure;
zfp_genesis 20
zfp_genesis 21 -- All identifiers in this unit are implementation defined
zfp_genesis 22
zfp_genesis 23 pragma Implementation_Defined;
zfp_genesis 24
zfp_genesis 25 type Integer_8 is range -2 ** 7 .. 2 ** 7 - 1;
zfp_genesis 26 for Integer_8'Size use 8;
zfp_genesis 27
zfp_genesis 28 type Integer_16 is range -2 ** 15 .. 2 ** 15 - 1;
zfp_genesis 29 for Integer_16'Size use 16;
zfp_genesis 30
zfp_genesis 31 type Integer_32 is range -2 ** 31 .. 2 ** 31 - 1;
zfp_genesis 32 for Integer_32'Size use 32;
zfp_genesis 33
zfp_genesis 34 type Integer_64 is new Long_Long_Integer;
zfp_genesis 35 for Integer_64'Size use 64;
zfp_genesis 36 -- Note: we use Long_Long_Integer'First instead of -2 ** 63 to allow this
zfp_genesis 37 -- unit to compile when using custom target configuration files where the
zfp_genesis 38 -- maximum integer is 32 bits. This is useful for static analysis tools
zfp_genesis 39 -- such as SPARK or CodePeer. In the normal case Long_Long_Integer is
zfp_genesis 40 -- always 64-bits so we get the desired 64-bit type.
zfp_genesis 41
zfp_genesis 42 type Unsigned_8 is mod 2 ** 8;
zfp_genesis 43 for Unsigned_8'Size use 8;
zfp_genesis 44
zfp_genesis 45 type Unsigned_16 is mod 2 ** 16;
zfp_genesis 46 for Unsigned_16'Size use 16;
zfp_genesis 47
zfp_genesis 48 type Unsigned_24 is mod 2 ** 24;
zfp_genesis 49 for Unsigned_24'Size use 24;
zfp_genesis 50 -- Declare this type for compatibility with legacy Ada compilers.
zfp_genesis 51 -- This is particularly useful in the context of CodePeer analysis.
zfp_genesis 52
zfp_genesis 53 type Unsigned_32 is mod 2 ** 32;
zfp_genesis 54 for Unsigned_32'Size use 32;
zfp_genesis 55
zfp_genesis 56 type Unsigned_64 is mod 2 ** Long_Long_Integer'Size;
zfp_genesis 57 for Unsigned_64'Size use 64;
zfp_genesis 58 -- See comment on Integer_64 above
zfp_genesis 59
zfp_genesis 60 function Shift_Left
zfp_genesis 61 (Value : Unsigned_8;
zfp_genesis 62 Amount : Natural) return Unsigned_8;
zfp_genesis 63
zfp_genesis 64 function Shift_Right
zfp_genesis 65 (Value : Unsigned_8;
zfp_genesis 66 Amount : Natural) return Unsigned_8;
zfp_genesis 67
zfp_genesis 68 function Shift_Right_Arithmetic
zfp_genesis 69 (Value : Unsigned_8;
zfp_genesis 70 Amount : Natural) return Unsigned_8;
zfp_genesis 71
zfp_genesis 72 function Rotate_Left
zfp_genesis 73 (Value : Unsigned_8;
zfp_genesis 74 Amount : Natural) return Unsigned_8;
zfp_genesis 75
zfp_genesis 76 function Rotate_Right
zfp_genesis 77 (Value : Unsigned_8;
zfp_genesis 78 Amount : Natural) return Unsigned_8;
zfp_genesis 79
zfp_genesis 80 function Shift_Left
zfp_genesis 81 (Value : Unsigned_16;
zfp_genesis 82 Amount : Natural) return Unsigned_16;
zfp_genesis 83
zfp_genesis 84 function Shift_Right
zfp_genesis 85 (Value : Unsigned_16;
zfp_genesis 86 Amount : Natural) return Unsigned_16;
zfp_genesis 87
zfp_genesis 88 function Shift_Right_Arithmetic
zfp_genesis 89 (Value : Unsigned_16;
zfp_genesis 90 Amount : Natural) return Unsigned_16;
zfp_genesis 91
zfp_genesis 92 function Rotate_Left
zfp_genesis 93 (Value : Unsigned_16;
zfp_genesis 94 Amount : Natural) return Unsigned_16;
zfp_genesis 95
zfp_genesis 96 function Rotate_Right
zfp_genesis 97 (Value : Unsigned_16;
zfp_genesis 98 Amount : Natural) return Unsigned_16;
zfp_genesis 99
zfp_genesis 100 function Shift_Left
zfp_genesis 101 (Value : Unsigned_32;
zfp_genesis 102 Amount : Natural) return Unsigned_32;
zfp_genesis 103
zfp_genesis 104 function Shift_Right
zfp_genesis 105 (Value : Unsigned_32;
zfp_genesis 106 Amount : Natural) return Unsigned_32;
zfp_genesis 107
zfp_genesis 108 function Shift_Right_Arithmetic
zfp_genesis 109 (Value : Unsigned_32;
zfp_genesis 110 Amount : Natural) return Unsigned_32;
zfp_genesis 111
zfp_genesis 112 function Rotate_Left
zfp_genesis 113 (Value : Unsigned_32;
zfp_genesis 114 Amount : Natural) return Unsigned_32;
zfp_genesis 115
zfp_genesis 116 function Rotate_Right
zfp_genesis 117 (Value : Unsigned_32;
zfp_genesis 118 Amount : Natural) return Unsigned_32;
zfp_genesis 119
zfp_genesis 120 function Shift_Left
zfp_genesis 121 (Value : Unsigned_64;
zfp_genesis 122 Amount : Natural) return Unsigned_64;
zfp_genesis 123
zfp_genesis 124 function Shift_Right
zfp_genesis 125 (Value : Unsigned_64;
zfp_genesis 126 Amount : Natural) return Unsigned_64;
zfp_genesis 127
zfp_genesis 128 function Shift_Right_Arithmetic
zfp_genesis 129 (Value : Unsigned_64;
zfp_genesis 130 Amount : Natural) return Unsigned_64;
zfp_genesis 131
zfp_genesis 132 function Rotate_Left
zfp_genesis 133 (Value : Unsigned_64;
zfp_genesis 134 Amount : Natural) return Unsigned_64;
zfp_genesis 135
zfp_genesis 136 function Rotate_Right
zfp_genesis 137 (Value : Unsigned_64;
zfp_genesis 138 Amount : Natural) return Unsigned_64;
zfp_genesis 139
zfp_genesis 140 pragma Import (Intrinsic, Shift_Left);
zfp_genesis 141 pragma Import (Intrinsic, Shift_Right);
zfp_genesis 142 pragma Import (Intrinsic, Shift_Right_Arithmetic);
zfp_genesis 143 pragma Import (Intrinsic, Rotate_Left);
zfp_genesis 144 pragma Import (Intrinsic, Rotate_Right);
zfp_genesis 145
zfp_genesis 146 -- IEEE Floating point types
zfp_genesis 147
zfp_genesis 148 type IEEE_Float_32 is digits 6;
zfp_genesis 149 for IEEE_Float_32'Size use 32;
zfp_genesis 150
zfp_genesis 151 type IEEE_Float_64 is digits 15;
zfp_genesis 152 for IEEE_Float_64'Size use 64;
zfp_genesis 153
zfp_genesis 154 -- If there is an IEEE extended float available on the machine, we assume
zfp_genesis 155 -- that it is available as Long_Long_Float.
zfp_genesis 156
zfp_genesis 157 -- Note: it is harmless, and explicitly permitted, to include additional
zfp_genesis 158 -- types in interfaces, so it is not wrong to have IEEE_Extended_Float
zfp_genesis 159 -- defined even if the extended format is not available.
zfp_genesis 160
zfp_genesis 161 type IEEE_Extended_Float is new Long_Long_Float;
zfp_genesis 162
zfp_genesis 163 end Interfaces;