1 |
281 |
jeremybenn |
------------------------------------------------------------------------------
|
2 |
|
|
-- --
|
3 |
|
|
-- GNAT RUN-TIME COMPONENTS --
|
4 |
|
|
-- --
|
5 |
|
|
-- S Y S T E M . H I E _ B A C K _ E N D --
|
6 |
|
|
-- --
|
7 |
|
|
-- S p e c --
|
8 |
|
|
-- --
|
9 |
|
|
-- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
|
10 |
|
|
-- --
|
11 |
|
|
-- GNAT is free software; you can redistribute it and/or modify it under --
|
12 |
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
13 |
|
|
-- ware Foundation; either version 3, or (at your option) any later ver- --
|
14 |
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
15 |
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
16 |
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. --
|
17 |
|
|
-- --
|
18 |
|
|
-- As a special exception under Section 7 of GPL version 3, you are granted --
|
19 |
|
|
-- additional permissions described in the GCC Runtime Library Exception, --
|
20 |
|
|
-- version 3.1, as published by the Free Software Foundation. --
|
21 |
|
|
-- --
|
22 |
|
|
-- You should have received a copy of the GNU General Public License and --
|
23 |
|
|
-- a copy of the GCC Runtime Library Exception along with this program; --
|
24 |
|
|
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
|
25 |
|
|
-- <http://www.gnu.org/licenses/>. --
|
26 |
|
|
-- --
|
27 |
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
28 |
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
29 |
|
|
-- --
|
30 |
|
|
------------------------------------------------------------------------------
|
31 |
|
|
|
32 |
|
|
-- This package provides an interface used in HI-E mode to determine
|
33 |
|
|
-- whether or not the back end can handle certain constructs in a manner
|
34 |
|
|
-- that is consistent with certification requirements.
|
35 |
|
|
|
36 |
|
|
-- The approach is to define entities which may or may not be present in
|
37 |
|
|
-- a HI-E configured library. If the entity is present then the compiler
|
38 |
|
|
-- operating in HI-E mode will allow the corresponding operation. If the
|
39 |
|
|
-- entity is not present, the corresponding construct will be flagged as
|
40 |
|
|
-- not permitted in High Integrity mode.
|
41 |
|
|
|
42 |
|
|
-- The default version of this unit delivered with the HI-E compiler is
|
43 |
|
|
-- configured in a manner appropriate for the target, but it is possible
|
44 |
|
|
-- to reconfigure the run-time to change the settings as required.
|
45 |
|
|
|
46 |
|
|
-- This unit is not used and never accessed by the compiler unless it is
|
47 |
|
|
-- operating in HI-E mode, so the settings are irrelevant. However, we
|
48 |
|
|
-- do include a standard version with all entities present in the standard
|
49 |
|
|
-- run-time for use when pragma No_Run_Time is specified.
|
50 |
|
|
|
51 |
|
|
package System.HIE_Back_End is
|
52 |
|
|
|
53 |
|
|
type Dummy is null record;
|
54 |
|
|
pragma Suppress_Initialization (Dummy);
|
55 |
|
|
-- This is the type used for the entities below. No properties of this
|
56 |
|
|
-- type are ever referenced, and in particular, the entities are defined
|
57 |
|
|
-- as variables, but their values are never referenced
|
58 |
|
|
|
59 |
|
|
HIE_64_Bit_Divides : Dummy;
|
60 |
|
|
-- This entity controls whether the front end allows 64-bit integer
|
61 |
|
|
-- divide operations, including the case where division of 32-bit
|
62 |
|
|
-- fixed-point operands requires 64-bit arithmetic. This can safely
|
63 |
|
|
-- be set as High_Integrity on 64-bit machines which provide this
|
64 |
|
|
-- operation as a native instruction, but on most 32-bit machines
|
65 |
|
|
-- a run time call (e.g. to __divdi3 in gcclib) is required. If a
|
66 |
|
|
-- certifiable version of this routine is available, then setting
|
67 |
|
|
-- this entity to High_Integrity with a pragma will cause appropriate
|
68 |
|
|
-- calls to be generated, allowing 64-bit integer division operations.
|
69 |
|
|
|
70 |
|
|
HIE_Long_Shifts : Dummy;
|
71 |
|
|
-- This entity controls whether the front end allows generation of
|
72 |
|
|
-- long shift instructions, i.e. shifts that operate on 64-bit values.
|
73 |
|
|
-- Such shifts are required for the implementation of fixed-point
|
74 |
|
|
-- types longer than 32 bits. This can safely be set as High_Integrity
|
75 |
|
|
-- on 64-bit machines that provide this operation at the hardware level,
|
76 |
|
|
-- but on some 32-bit machines a run time call is required. If there
|
77 |
|
|
-- is a certifiable version available of the relevant run-time routines,
|
78 |
|
|
-- then setting this entity to High_Integrity with a pragma will cause
|
79 |
|
|
-- appropriate calls to be generated, allowing the declaration and use
|
80 |
|
|
-- of fixed-point types longer than 32 bits.
|
81 |
|
|
|
82 |
|
|
HIE_Aggregates : Dummy;
|
83 |
|
|
-- In the general case, the use of aggregates may generate calls
|
84 |
|
|
-- to run-time routines in the C library, including memset, memcpy,
|
85 |
|
|
-- memmove, and bcopy. This entity can be set to High_Integrity with
|
86 |
|
|
-- a pragma if certifiable versions of all these routines are available,
|
87 |
|
|
-- in which case aggregates are permitted in HI-E mode. Otherwise the
|
88 |
|
|
-- HI-E compiler will reject any use of aggregates.
|
89 |
|
|
|
90 |
|
|
HIE_Composite_Assignments : Dummy;
|
91 |
|
|
-- The assignment of composite objects other than small records and
|
92 |
|
|
-- arrays whose size is 64-bits or less and is set by an explicit
|
93 |
|
|
-- size clause may generate calls to memcpy, memmove, and bcopy.
|
94 |
|
|
-- If certifiable versions of all these routines are available, then
|
95 |
|
|
-- this entity may be set to High_Integrity using a pragma, in which
|
96 |
|
|
-- case such assignments are permitted. Otherwise the HI-E compiler
|
97 |
|
|
-- will reject any such composite assignments.
|
98 |
|
|
|
99 |
|
|
end System.HIE_Back_End;
|