1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- I N T E R F A C E S --
11 -- This specification is adapted from the Ada Reference Manual for use with --
12 -- GNAT. In accordance with the copyright of that document, you can freely --
13 -- copy and modify this specification, provided that if you redistribute a --
14 -- modified version, any changes that you have made are clearly indicated. --
16 ------------------------------------------------------------------------------
18 -- Assumes integer sizes of 8, 16, 32 and 64 are available, and that the
19 -- floating-point formats are IEEE compatible.
21 -- There is a specialized version of this package for OpenVMS.
24 pragma Pure
(Interfaces
);
26 type Integer_8
is range -2 ** 7 .. 2 ** 7 - 1;
27 for Integer_8
'Size use 8;
29 type Integer_16
is range -2 ** 15 .. 2 ** 15 - 1;
30 for Integer_16
'Size use 16;
32 type Integer_32
is range -2 ** 31 .. 2 ** 31 - 1;
33 for Integer_32
'Size use 32;
35 type Integer_64
is range -2 ** 63 .. 2 ** 63 - 1;
36 for Integer_64
'Size use 64;
38 type Unsigned_8
is mod 2 ** 8;
39 for Unsigned_8
'Size use 8;
41 type Unsigned_16
is mod 2 ** 16;
42 for Unsigned_16
'Size use 16;
44 type Unsigned_32
is mod 2 ** 32;
45 for Unsigned_32
'Size use 32;
47 type Unsigned_64
is mod 2 ** 64;
48 for Unsigned_64
'Size use 64;
60 function Shift_Right_Arithmetic
85 function Shift_Right_Arithmetic
101 (Value
: Unsigned_32
;
106 (Value
: Unsigned_32
;
110 function Shift_Right_Arithmetic
111 (Value
: Unsigned_32
;
116 (Value
: Unsigned_32
;
120 function Rotate_Right
121 (Value
: Unsigned_32
;
126 (Value
: Unsigned_64
;
131 (Value
: Unsigned_64
;
135 function Shift_Right_Arithmetic
136 (Value
: Unsigned_64
;
141 (Value
: Unsigned_64
;
145 function Rotate_Right
146 (Value
: Unsigned_64
;
150 pragma Import
(Intrinsic
, Shift_Left
);
151 pragma Import
(Intrinsic
, Shift_Right
);
152 pragma Import
(Intrinsic
, Shift_Right_Arithmetic
);
153 pragma Import
(Intrinsic
, Rotate_Left
);
154 pragma Import
(Intrinsic
, Rotate_Right
);
156 -- Floating point types. We assume that we are on an IEEE machine, and
157 -- that the types Short_Float and Long_Float in Standard refer to the
158 -- 32-bit short and 64-bit long IEEE forms. Furthermore, if there is
159 -- an extended float, we assume that it is available as Long_Long_Float.
160 -- Note: it is harmless, and explicitly permitted, to include additional
161 -- types in interfaces, so it is not wrong to have IEEE_Extended_Float
162 -- defined even if the extended format is not available.
164 type IEEE_Float_32
is new Short_Float;
165 type IEEE_Float_64
is new Long_Float;
166 type IEEE_Extended_Float
is new Long_Long_Float;