1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
5 -- I N T E R F A C E S --
9 -- Copyright (C) 2002-2009, Free Software Foundation, Inc. --
11 -- This specification is derived from the Ada Reference Manual for use with --
12 -- GNAT. The copyright notice above, and the license provisions that follow --
13 -- apply solely to the implementation dependent sections of this file. --
15 -- GNAT is free software; you can redistribute it and/or modify it under --
16 -- terms of the GNU General Public License as published by the Free Soft- --
17 -- ware Foundation; either version 3, or (at your option) any later ver- --
18 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
19 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
20 -- or FITNESS FOR A PARTICULAR PURPOSE. --
22 -- As a special exception under Section 7 of GPL version 3, you are granted --
23 -- additional permissions described in the GCC Runtime Library Exception, --
24 -- version 3.1, as published by the Free Software Foundation. --
26 -- You should have received a copy of the GNU General Public License and --
27 -- a copy of the GCC Runtime Library Exception along with this program; --
28 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
29 -- <http://www.gnu.org/licenses/>. --
31 -- GNAT was originally developed by the GNAT team at New York University. --
32 -- Extensive contributions were provided by Ada Core Technologies Inc. --
34 ------------------------------------------------------------------------------
39 type Integer_8
is range -2 ** 7 .. 2 ** 7 - 1;
40 for Integer_8
'Size use 8;
42 type Integer_16
is range -2 ** 15 .. 2 ** 15 - 1;
43 for Integer_16
'Size use 16;
45 type Integer_32
is range -2 ** 31 .. 2 ** 31 - 1;
46 for Integer_32
'Size use 32;
48 type Integer_64
is range -2 ** 63 .. 2 ** 63 - 1;
49 for Integer_64
'Size use 64;
51 type Unsigned_8
is mod 2 ** 8;
52 for Unsigned_8
'Size use 8;
54 type Unsigned_16
is mod 2 ** 16;
55 for Unsigned_16
'Size use 16;
57 type Unsigned_32
is mod 2 ** 32;
58 for Unsigned_32
'Size use 32;
60 type Unsigned_64
is mod 2 ** 64;
61 for Unsigned_64
'Size use 64;
65 Amount
: Natural) return Unsigned_8
;
69 Amount
: Natural) return Unsigned_8
;
71 function Shift_Right_Arithmetic
73 Amount
: Natural) return Unsigned_8
;
77 Amount
: Natural) return Unsigned_8
;
81 Amount
: Natural) return Unsigned_8
;
85 Amount
: Natural) return Unsigned_16
;
89 Amount
: Natural) return Unsigned_16
;
91 function Shift_Right_Arithmetic
93 Amount
: Natural) return Unsigned_16
;
97 Amount
: Natural) return Unsigned_16
;
100 (Value
: Unsigned_16
;
101 Amount
: Natural) return Unsigned_16
;
104 (Value
: Unsigned_32
;
105 Amount
: Natural) return Unsigned_32
;
108 (Value
: Unsigned_32
;
109 Amount
: Natural) return Unsigned_32
;
111 function Shift_Right_Arithmetic
112 (Value
: Unsigned_32
;
113 Amount
: Natural) return Unsigned_32
;
116 (Value
: Unsigned_32
;
117 Amount
: Natural) return Unsigned_32
;
119 function Rotate_Right
120 (Value
: Unsigned_32
;
121 Amount
: Natural) return Unsigned_32
;
124 (Value
: Unsigned_64
;
125 Amount
: Natural) return Unsigned_64
;
128 (Value
: Unsigned_64
;
129 Amount
: Natural) return Unsigned_64
;
131 function Shift_Right_Arithmetic
132 (Value
: Unsigned_64
;
133 Amount
: Natural) return Unsigned_64
;
136 (Value
: Unsigned_64
;
137 Amount
: Natural) return Unsigned_64
;
139 function Rotate_Right
140 (Value
: Unsigned_64
;
141 Amount
: Natural) return Unsigned_64
;
143 pragma Import
(Intrinsic
, Shift_Left
);
144 pragma Import
(Intrinsic
, Shift_Right
);
145 pragma Import
(Intrinsic
, Shift_Right_Arithmetic
);
146 pragma Import
(Intrinsic
, Rotate_Left
);
147 pragma Import
(Intrinsic
, Rotate_Right
);
149 -- IEEE Floating point types. Note that the form of these definitions
150 -- ensures that the work on VMS, even if the standard library is compiled
151 -- using a Float_Representation pragma for Vax_Float.
153 pragma Warnings
(Off
);
154 -- Turn off warnings for targets not providing IEEE floating-point types
156 type IEEE_Float_32
is digits 6;
157 pragma Float_Representation
(IEEE_Float
, IEEE_Float_32
);
159 type IEEE_Float_64
is digits 15;
160 pragma Float_Representation
(IEEE_Float
, IEEE_Float_64
);
162 -- If there is an IEEE extended float available on the machine, we assume
163 -- that it is available as Long_Long_Float.
165 -- Note: it is harmless, and explicitly permitted, to include additional
166 -- types in interfaces, so it is not wrong to have IEEE_Extended_Float
167 -- defined even if the extended format is not available.
169 type IEEE_Extended_Float
is new Long_Long_Float;