objc/
[official-gcc.git] / gcc / ada / interfac-vms.ads
blob4376fd93c8a71927a02c0f8a1e84a4d0cb4320d4
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- I N T E R F A C E S --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2002-2003 Free Software Foundation, Inc. --
10 -- --
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. --
14 -- --
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 2, 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. See the GNU General Public License --
21 -- for more details. You should have received a copy of the GNU General --
22 -- Public License distributed with GNAT; see file COPYING. If not, write --
23 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
24 -- Boston, MA 02110-1301, USA. --
25 -- --
26 -- As a special exception, if other files instantiate generics from this --
27 -- unit, or you link this unit with other files to produce an executable, --
28 -- this unit does not by itself cause the resulting executable to be --
29 -- covered by the GNU General Public License. This exception does not --
30 -- however invalidate any other reasons why the executable file might be --
31 -- covered by the GNU Public License. --
32 -- --
33 -- GNAT was originally developed by the GNAT team at New York University. --
34 -- Extensive contributions were provided by Ada Core Technologies Inc. --
35 -- --
36 ------------------------------------------------------------------------------
38 -- This is the OpenVMS version of this package which adds Float_Representation
39 -- pragmas to the IEEE floating point types to ensure they remain IEEE in
40 -- the presence of a configuration pragma Float_Representation (Vax_Float).
42 -- It assumes integer sizes of 8, 16, 32 and 64 are available, and that IEEE
43 -- floating-point formats are available.
45 package Interfaces is
46 pragma Pure (Interfaces);
48 type Integer_8 is range -2 ** 7 .. 2 ** 7 - 1;
49 for Integer_8'Size use 8;
51 type Integer_16 is range -2 ** 15 .. 2 ** 15 - 1;
52 for Integer_16'Size use 16;
54 type Integer_32 is range -2 ** 31 .. 2 ** 31 - 1;
55 for Integer_32'Size use 32;
57 type Integer_64 is range -2 ** 63 .. 2 ** 63 - 1;
58 for Integer_64'Size use 64;
60 type Unsigned_8 is mod 2 ** 8;
61 for Unsigned_8'Size use 8;
63 type Unsigned_16 is mod 2 ** 16;
64 for Unsigned_16'Size use 16;
66 type Unsigned_32 is mod 2 ** 32;
67 for Unsigned_32'Size use 32;
69 type Unsigned_64 is mod 2 ** 64;
70 for Unsigned_64'Size use 64;
72 function Shift_Left
73 (Value : Unsigned_8;
74 Amount : Natural)
75 return Unsigned_8;
77 function Shift_Right
78 (Value : Unsigned_8;
79 Amount : Natural)
80 return Unsigned_8;
82 function Shift_Right_Arithmetic
83 (Value : Unsigned_8;
84 Amount : Natural)
85 return Unsigned_8;
87 function Rotate_Left
88 (Value : Unsigned_8;
89 Amount : Natural)
90 return Unsigned_8;
92 function Rotate_Right
93 (Value : Unsigned_8;
94 Amount : Natural)
95 return Unsigned_8;
97 function Shift_Left
98 (Value : Unsigned_16;
99 Amount : Natural)
100 return Unsigned_16;
102 function Shift_Right
103 (Value : Unsigned_16;
104 Amount : Natural)
105 return Unsigned_16;
107 function Shift_Right_Arithmetic
108 (Value : Unsigned_16;
109 Amount : Natural)
110 return Unsigned_16;
112 function Rotate_Left
113 (Value : Unsigned_16;
114 Amount : Natural)
115 return Unsigned_16;
117 function Rotate_Right
118 (Value : Unsigned_16;
119 Amount : Natural)
120 return Unsigned_16;
122 function Shift_Left
123 (Value : Unsigned_32;
124 Amount : Natural)
125 return Unsigned_32;
127 function Shift_Right
128 (Value : Unsigned_32;
129 Amount : Natural)
130 return Unsigned_32;
132 function Shift_Right_Arithmetic
133 (Value : Unsigned_32;
134 Amount : Natural)
135 return Unsigned_32;
137 function Rotate_Left
138 (Value : Unsigned_32;
139 Amount : Natural)
140 return Unsigned_32;
142 function Rotate_Right
143 (Value : Unsigned_32;
144 Amount : Natural)
145 return Unsigned_32;
147 function Shift_Left
148 (Value : Unsigned_64;
149 Amount : Natural)
150 return Unsigned_64;
152 function Shift_Right
153 (Value : Unsigned_64;
154 Amount : Natural)
155 return Unsigned_64;
157 function Shift_Right_Arithmetic
158 (Value : Unsigned_64;
159 Amount : Natural)
160 return Unsigned_64;
162 function Rotate_Left
163 (Value : Unsigned_64;
164 Amount : Natural)
165 return Unsigned_64;
167 function Rotate_Right
168 (Value : Unsigned_64;
169 Amount : Natural)
170 return Unsigned_64;
172 pragma Import (Intrinsic, Shift_Left);
173 pragma Import (Intrinsic, Shift_Right);
174 pragma Import (Intrinsic, Shift_Right_Arithmetic);
175 pragma Import (Intrinsic, Rotate_Left);
176 pragma Import (Intrinsic, Rotate_Right);
178 -- Floating point types. We use the digits value to define the IEEE
179 -- forms, otherwise a configuration pragma specifying VAX float can
180 -- default the digits to an illegal value for IEEE.
181 -- Note: it is harmless, and explicitly permitted, to include additional
182 -- types in interfaces, so it is not wrong to have IEEE_Extended_Float
183 -- defined even if the extended format is not available.
185 type IEEE_Float_32 is digits 6;
186 pragma Float_Representation (IEEE_Float, IEEE_Float_32);
188 type IEEE_Float_64 is digits 15;
189 pragma Float_Representation (IEEE_Float, IEEE_Float_64);
191 type IEEE_Extended_Float is digits 15;
192 pragma Float_Representation (IEEE_Float, IEEE_Extended_Float);
194 end Interfaces;