OSDN Git Service

2005-03-08 Pascal Obry <obry@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / targparm.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                        GNAT RUN-TIME COMPONENTS                          --
4 --                                                                          --
5 --                             T A R G P A R M                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --          Copyright (C) 1999-2005 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 2,  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.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
20 -- MA 02111-1307, USA.                                                      --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 --  This package obtains parameters from the target runtime version of
28 --  System, to indicate parameters relevant to the target environment.
29
30 --  Conceptually, these parameters could be obtained using rtsfind, but
31 --  we do not do this for four reasons:
32
33 --    1. Compiling System for every compilation wastes time
34
35 --    2. This compilation impedes debugging by adding extra compile steps
36
37 --    3. There are recursion problems coming from compiling System itself
38 --        or any of its children.
39
40 --    4. The binder also needs the parameters, and we do not want to have
41 --        to drag a lot of front end stuff into the binder.
42
43 --  For all these reasons, we read in the source of System, and then scan
44 --  it at the text level to extract the parameter values.
45
46 --  Note however, that later on, when the ali file is written, we make sure
47 --  that the System file is at least parsed, so that the checksum is properly
48 --  computed and set in the ali file. This partially negates points 1 and 2
49 --  above although just parsing is quick and does not impact debugging much.
50
51 --  The parameters acquired by this routine from system.ads fall into four
52 --  categories:
53
54 --     1. Configuration pragmas, that must appear at the start of the file.
55 --        Any such pragmas automatically apply to any unit compiled in the
56 --        presence of this system file. Only a limited set of such pragmas
57 --        may appear as documented in the corresponding section below,
58
59 --     2. Target parameters. These are boolean constants that are defined
60 --        in the private part of the package giving fixed information
61 --        about the target architecture, and the capabilities of the
62 --        code generator and run-time library.
63
64 --     3. Identification information. This is an optional string constant
65 --        that gives the name of the run-time library configuration. This
66 --        line may be ommitted for a version of system.ads to be used with
67 --        the full Ada 95 run time.
68
69 --     4. Other characterisitics of package System. At the current time the
70 --        only item in this category is whether type Address is private.
71
72 with Rident; use Rident;
73 with Types;  use Types;
74
75 package Targparm is
76
77    ---------------------------
78    -- Configuration Pragmas --
79    ---------------------------
80
81    --  The following switches get set if the corresponding configuration
82    --  pragma is scanned from the source of system.ads. No other pragmas
83    --  are permitted to appear at the start of the system.ads source file.
84
85    --  If a pragma Discard_Names appears, then Opt.Global_Discard_Names is
86    --  set to True to indicate that all units must be compiled in this mode.
87
88    --  If a pragma Locking_Policy appears, then Opt.Locking_Policy is set
89    --  to the first character of the policy name, and Opt.Locking_Policy_Sloc
90    --  is set to System_Location.
91
92    --  If a pragma Normalize_Scalars appears, then Opt.Normalize_Scalars
93    --  is set True, as well as Opt.Init_Or_Norm_Scalars.
94
95    --  If a pragma Queuing_Policy appears, then Opt.Queuing_Policy is set
96    --  to the first character of the policy name, and Opt.Queuing_Policy_Sloc
97    --  is set to System_Location.
98
99    --  If a pragma Task_Dispatching_Policy appears, then the flag
100    --  Opt.Task_Dispatching_Policy is set to the first character of the
101    --  policy name, and Opt.Task_Dispatching_Policy_Sloc is set to
102    --  System_Location.
103
104    --  If a pragma Polling (On) appears, then the flag Opt.Polling_Required
105    --  is set to True.
106
107    --  If a pragma Detect_Blocking appears, then the flag Opt.Detect_Blocking
108    --  is set to True.
109
110    --  if a pragma Suppress_Exception_Locations appears, then the flag
111    --  Opt.Exception_Locations_Suppressed is set to True.
112
113    --  If a pragma Profile with a valid profile argument appears, then
114    --  the appropriate restrictions and policy flags are set.
115
116    --  The only other pragma allowed is a pragma Restrictions that specifies
117    --  a restriction that will be imposed on all units in the partition. Note
118    --  that in this context, only one restriction can be specified in a single
119    --  pragma, and the pragma must appear on its own on a single source line.
120
121    --  If package System contains exactly the line "type Address is private;"
122    --  then the flag Opt.Address_Is_Private is set True, otherwise this flag
123    --  is set False.
124
125    Restrictions_On_Target : Restrictions_Info;
126    --  Records restrictions specified by system.ads. Only the Set and Value
127    --  members are modified. The Violated and Count fields are never modified.
128    --  Note that entries can be set either by a pragma Restrictions or by
129    --  a pragma Profile.
130
131    -------------------
132    -- Run Time Name --
133    -------------------
134
135    --  This parameter should be regarded as read only by all clients of
136    --  of package. The only way they get modified is by calling the
137    --  Get_Target_Parameters routine which reads the values from a provided
138    --  text buffer containing the source of the system package.
139
140    --  The corresponding string constant is placed immediately at the start
141    --  of the private part of system.ads if is present, e.g. in the form:
142
143    --    Run_Time_Name : constant String := "Zero Footprint Run Time";
144
145    --  the corresponding messages will look something like
146
147    --    xxx not supported (Zero Footprint Run Time)
148
149    Run_Time_Name_On_Target : Name_Id := No_Name;
150    --  Set to appropriate names table entry Id value if a Run_Time_Name
151    --  string constant is defined in system.ads. This name is used only
152    --  for the configurable run-time case, and is used to parametrize
153    --  messages that complain about non-supported run-time features.
154    --  The name should contain only letters A-Z, digits 1-9, spaces,
155    --  and underscores.
156
157    -----------------------
158    -- Target Parameters --
159    -----------------------
160
161    --  The following parameters correspond to the variables defined in the
162    --  private part of System (without the terminating _On_Target). Note
163    --  that it is required that all parameters defined here be specified
164    --  in the target specific version of system.ads (there are no defaults).
165
166    --  All these parameters should be regarded as read only by all clients
167    --  of the package. The only way they get modified is by calling the
168    --  Get_Target_Parameters routine which reads the values from a provided
169    --  text buffer containing the source of the system package.
170
171    --  The default values here are used if no value is found in system.ads.
172    --  This should normally happen only if the special version of system.ads
173    --  used by the compiler itself is in use. The default values are suitable
174    --  for use by the compiler itself in normal environments. This approach
175    --  allows the possibility of new versions of the compiler (possibly with
176    --  new system parameters added) being used to compile older versions of
177    --  the compiler sources. This is not guaranteed to work, but often will
178    --  and by setting appropriate default values, we make it more likely that
179    --  this can succeed.
180
181    Compiler_System_Version : Boolean := True;
182    --  This is set False in all target dependent versions of System. In the
183    --  compiler default version, it is omitted entirely, meaning that the
184    --  above default value of True will be set. If the flag is False, then
185    --  the scanning circuits in the body of this package do an error check to
186    --  ensure that all parameters other than this one are specified and not
187    --  defaulted. If the parameter is set True, then this check is omitted,
188    --  and any parameters not present in system.ads are left set to their
189    --  default value as described above.
190
191    ----------------------------
192    -- Special Target Control --
193    ----------------------------
194
195    --  The great majority of GNAT ports are based on GCC. The switches in
196    --  This section indicate the use of some non-standard target back end
197    --  or other special targetting requirements.
198
199    AAMP_On_Target : Boolean := False;
200    --  Set to True if target is AAMP
201
202    OpenVMS_On_Target : Boolean := False;
203    --  Set to True if target is OpenVMS
204
205    -------------------------------
206    -- Backend Arithmetic Checks --
207    -------------------------------
208
209    --  Divide and overflow checks are either done in the front end or
210    --  back end. The front end will generate checks when required unless
211    --  the corresponding parameter here is set to indicate that the back
212    --  end will generate the required checks (or that the checks are
213    --  automatically performed by the hardware in an appropriate form).
214
215    Backend_Divide_Checks_On_Target : Boolean := False;
216    --  Set True if the back end generates divide checks, or if the hardware
217    --  checks automatically. Set False if the front end must generate the
218    --  required tests using explicit expanded code.
219
220    Backend_Overflow_Checks_On_Target : Boolean := False;
221    --  Set True if the back end generates arithmetic overflow checks, or if
222    --  the hardware checks automatically. Set False if the front end must
223    --  generate the required tests using explicit expanded code.
224
225    -----------------------------------
226    -- Control of Exception Handling --
227    -----------------------------------
228
229    --  GNAT implements three methods of implementing exceptions:
230
231    --    Front-End Longjmp/Setjmp Exceptions
232
233    --      This approach uses longjmp/setjmp to handle exceptions. It
234    --      uses less storage, and can often propagate exceptions faster,
235    --      at the expense of (sometimes considerable) overhead in setting
236    --      up an exception handler. This approach is available on all
237    --      targets, and is the default where it is the only approach.
238
239    --      The generation of the setjmp and longjmp calls is handled by
240    --      the front end of the compiler (this includes gigi in the case
241    --      of the standard GCC back end). It does not use any back end
242    --      suport (such as the GCC3 exception handling mechanism). When
243    --      this approach is used, the compiler generates special exception
244    --      handlers for handling cleanups when an exception is raised.
245
246    --    Front-End Zero Cost Exceptions
247
248    --      This approach uses separate exception tables. These use extra
249    --      storage, and exception propagation can be quite slow, but there
250    --      is no overhead in setting up an exception handler (it is to this
251    --      latter operation that the phrase zero-cost refers). This approach
252    --      is only available on some targets, and is the default where it is
253    --      available.
254
255    --      The generation of the exception tables is handled by the front
256    --      end of the compiler. It does not use any back end support (such
257    --      as the GCC3 exception handling mechanism). When this approach
258    --      is used, the compiler generates special exception handlers for
259    --      handling cleanups when an exception is raised.
260
261    --    Back-End Zero Cost Exceptions
262
263    --      With this approach, the back end handles the generation and
264    --      handling of exceptions. For example, the GCC3 exception handling
265    --      mechanisms are used in this mode. The front end simply generates
266    --      code for explicit exception handlers, and AT END cleanup handlers
267    --      are simply passed unchanged to the backend for generating cleanups
268    --      both in the exceptional and non-exceptional cases.
269
270    --      As the name implies, this approach generally uses a zero-cost
271    --      mechanism with tables, but the tables are generated by the back
272    --      end. However, since the back-end is entirely responsible for the
273    --      handling of exceptions, another mechanism might be used. In the
274    --      case of GCC3 for instance, it might be the case that the compiler
275    --      is configured for setjmp/longjmp handling, then everything will
276    --      work correctly. However, it is definitely preferred that the
277    --      back end provide zero cost exception handling.
278
279    --    Controlling the selection of methods
280
281    --      The Front-End Longjmp/Setjmp approach is always available in
282    --      all implementations. If it is not the default method, then it
283    --      may be explicitly specified by the use of -gnatL. Note however
284    --      that there is a requirement that all Ada units in a partition
285    --      be compiled with this overriding option if it is not the default.
286
287    --      On some, but not all, implementations of GNAT, one of the two
288    --      ZCX approaches (but not both) is implemented. If this is the
289    --      case, and ZCX is not the default mechanism, then ZCX handling
290    --      (front-end or back-end according to the implementation) may be
291    --      specified by use of the -gnatZ switch. Again, this switch must
292    --      be used to compile all Ada units in a partition. The use of
293    --      the -gnatZ switch will cause termination with a fatal error.
294
295    --      Finally the debug option -gnatdX can be used to force the
296    --      compiler to operate in front-end ZCX exception mode and force
297    --      the front end to generate exception tables. This is only useful
298    --      for debugging purposes for implementations which do not provide
299    --      the possibility of front-end ZCX mode. The resulting object file
300    --      is unusable, but this debug switch may still be useful (e.g. in
301    --      conjunction with -gnatG) for front-end debugging purposes.
302
303    --    Control of Available Methods and Defaults
304
305    --      The following switches specify which of the two ZCX methods
306    --      (if any) is available in an implementation, and which method
307    --      is the default method.
308
309    ZCX_By_Default_On_Target : Boolean := False;
310    --  Indicates if zero cost exceptions are active by default. If this
311    --  variable is False, then the only possible exception method is the
312    --  front-end setjmp/longjmp approach, and this is the default. If
313    --  this variable is True, then one of the following two flags must
314    --  be True, and represents the method to be used by default.
315
316    GCC_ZCX_Support_On_Target  : Boolean := False;
317    --  Indicates that when ZCX is active, the mechanism to be used is the
318    --  back-end ZCX exception approach. If this variable is set to True,
319    --  then Front_End_ZCX_Support_On_Target must be False.
320
321    Front_End_ZCX_Support_On_Target : Boolean := False;
322    --  Indicates that when ZCX is active, the mechanism to be used is the
323    --  front-end ZCX exception approach. If this variable is set to True,
324    --  then GCC_ZCX_Support_On_Target must be False.
325
326    ------------------------------------
327    -- Run-Time Library Configuration --
328    ------------------------------------
329
330    --  In configurable run-time mode, the system run-time may not support
331    --  the full Ada language. The effect of setting this switch is to let
332    --  the compiler know that it is not surprising (i.e. the system is not
333    --  misconfigured) if run-time library units or entities within units are
334    --  not present in the run-time.
335
336    Configurable_Run_Time_On_Target : Boolean := False;
337    --  Indicates that the system.ads file is for a configurable run-time
338    --
339    --  This has some specific effects as follows
340    --
341    --    The binder generates the gnat_argc/argv/envp variables in the
342    --    binder file instead of being imported from the run-time library.
343    --    If Command_Line_Args_On_Target is set to False, then the
344    --    generation of these variables is suppressed completely.
345    --
346    --    The binder generates the gnat_exit_status variable in the binder
347    --    file instead of being imported from the run-time library. If
348    --    Exit_Status_Supported_On_Target is set to False, then the
349    --    generation of this variable is suppressed entirely.
350    --
351    --    The routine __gnat_break_start is defined within the binder file
352    --    instead of being imported from the run-time library.
353    --
354    --    The variable __gnat_exit_status is generated within the binder file
355    --    instead of being imported from the run-time library.
356
357    Suppress_Standard_Library_On_Target : Boolean := False;
358    --  If this flag is True, then the standard library is not included by
359    --  default in the executable (see unit System.Standard_Library in file
360    --  s-stalib.ads for details of what this includes). This is for example
361    --  set True for the zero foot print case, where these files should not
362    --  be included by default.
363    --
364    --  This flag has some other related effects:
365    --
366    --    The generation of global variables in the bind file is suppressed,
367    --    with the exception of the priority of the environment task, which
368    --    is needed by the Ravenscar run-time.
369    --
370    --    The generation of exception tables is suppressed for front end
371    --    ZCX exception handling (since we assume no exception handling).
372    --
373    --    The calls to __gnat_initialize and __gnat_finalize are omitted
374    --
375    --    All finalization and initialization (controlled types) is omitted
376    --
377    --    The routine __gnat_handler_installed is not imported
378
379    Preallocated_Stacks_On_Target : Boolean := False;
380    --  If this flag is True, then the expander preallocates all task stacks
381    --  at compile time. If the flag is False, then task stacks are not pre-
382    --  allocated, and task stack allocation is the responsibility of the
383    --  run-time (which typically delegates the task to the underlying
384    --  operating system environment).
385
386    ---------------------
387    -- Duration Format --
388    ---------------------
389
390    --  By default, type Duration is a 64-bit fixed-point type with a delta
391    --  and small of 10**(-9) (i.e. it is a count in nanoseconds. This flag
392    --  allows that standard format to be modified.
393
394    Duration_32_Bits_On_Target : Boolean := False;
395    --  If True, then Duration is represented in 32 bits and the delta and
396    --  small values are set to 20.0*(10**(-3)) (i.e. it is a count in units
397    --  of 20 milliseconds.
398
399    ------------------------------------
400    -- Back-End Code Generation Flags --
401    ------------------------------------
402
403    --  These flags indicate possible limitations in what the code generator
404    --  can handle. They will all be True for a full run-time, but one or more
405    --  of these may be false for a configurable run-time, and if a feature is
406    --  used at the source level, and the corresponding flag is false, then an
407    --  error message will be issued saying the feature is not supported.
408
409    Support_64_Bit_Divides_On_Target : Boolean := True;
410    --  If True, the back end supports 64-bit divide operations. If False, then
411    --  the source program may not contain 64-bit divide operations. This is
412    --  specifically useful in the zero foot-print case, where the issue is
413    --  whether there is a hardware divide instruction for 64-bits so that
414    --  no run-time support is required. It should always be set True if the
415    --  necessary run-time support is present.
416
417    Support_Aggregates_On_Target : Boolean := True;
418    --  In the general case, the use of aggregates may generate calls
419    --  to run-time routines in the C library, including memset, memcpy,
420    --  memmove, and bcopy. This flag is set to True if these routines
421    --  are available. If any of these routines is not available, then
422    --  this flag is False, and the use of aggregates is not permitted.
423
424    Support_Composite_Assign_On_Target : Boolean := True;
425    --  The assignment of composite objects other than small records and
426    --  arrays whose size is 64-bits or less and is set by an explicit
427    --  size clause may generate calls to memcpy, memmove, and bcopy.
428    --  If versions of all these routines are available, then this flag
429    --  is set to True. If any of these routines is not available, then
430    --  the flag is set False, and composite assignments are not allowed.
431
432    Support_Composite_Compare_On_Target : Boolean := True;
433    --  If this flag is True, then the back end supports bit-wise comparison
434    --  of composite objects for equality, either generating inline code or
435    --  calling appropriate (and available) run-time routines. If this flag
436    --  is False, then the back end does not provide this support, and the
437    --  front end uses component by component comparison for composites.
438
439    Support_Long_Shifts_On_Target : Boolean := True;
440    --  If True, the back end supports 64-bit shift operations. If False, then
441    --  the source program may not contain explicit 64-bit shifts. In addition,
442    --  the code generated for packed arrays will avoid the use of long shifts.
443
444    -------------------------------
445    -- Control of Stack Checking --
446    -------------------------------
447
448    --  GNAT provides two methods of implementing exceptions:
449
450    --    GCC Probing Mechanism
451
452    --      This approach uses the standard GCC mechanism for
453    --      stack checking. The method assumes that accessing
454    --      storage immediately beyond the end of the stack
455    --      will result in a trap that is converted to a storage
456    --      error by the runtime system. This mechanism has
457    --      minimal overhead, but requires complex hardware,
458    --      operating system and run-time support. Probing is
459    --      the default method where it is available. The stack
460    --      size for the environment task depends on the operating
461    --      system and cannot be set in a system-independent way.
462
463    --   GNAT Stack-limit Checking
464
465    --      This method relies on comparing the stack pointer
466    --      with per-task stack limits. If the check fails, an
467    --      exception is explicitly raised. The advantage is
468    --      that the method requires no extra system dependent
469    --      runtime support and can be used on systems without
470    --      memory protection as well, but at the cost of more
471    --      overhead for doing the check. This method is the
472    --      default on systems that lack complete support for
473    --      probing.
474
475    Stack_Check_Probes_On_Target : Boolean := False;
476    --  Indicates if stack check probes are used, as opposed to the standard
477    --  target independent comparison method.
478
479    Stack_Check_Default_On_Target : Boolean := False;
480    --  Indicates if stack checking is on by default
481
482    ----------------------------
483    -- Command Line Arguments --
484    ----------------------------
485
486    --  For most ports of GNAT, command line arguments are supported. The
487    --  following flag is set to False for targets that do not support
488    --  command line arguments (VxWorks and AAMP). Note that support of
489    --  command line arguments is not required on such targets (RM A.15(13)).
490
491    Command_Line_Args_On_Target : Boolean := True;
492    --  Set False if no command line arguments on target. Note that if this
493    --  is False in with Configurable_Run_Time_On_Target set to True, then
494    --  this causes suppression of generation of the argv/argc variables
495    --  used to record command line arguments.
496
497    --  Similarly, most ports support the use of an exit status, but AAMP
498    --  is an exception (as allowed by RM A.15(18-20))
499
500    Exit_Status_Supported_On_Target : Boolean := True;
501    --  Set False if returning of an exit status is not supported on target.
502    --  Note that if this False in with Configurable_Run_Time_On_Target
503    --  set to True, then this causes suppression of the gnat_exit_status
504    --  variable used to record the exit status.
505
506    -----------------------
507    -- Main Program Name --
508    -----------------------
509
510    --  When the binder generates the main program to be used to create the
511    --  executable, the main program name is main by default (to match the
512    --  usual Unix practice). If this parameter is set to True, then the
513    --  name is instead by default taken from the actual Ada main program
514    --  name (just the name of the child if the main program is a child unit).
515    --  In either case, this value can be overridden using -M name.
516
517    Use_Ada_Main_Program_Name_On_Target : Boolean := False;
518    --  Set True to use the Ada main program name as the main name
519
520    ----------------------------------------------
521    -- Boolean-Valued Floating-Point Attributes --
522    ----------------------------------------------
523
524    --  The constants below give the values for representation oriented
525    --  floating-point attributes that are the same for all float types
526    --  on the target. These are all boolean values.
527
528    --  A value is only True if the target reliably supports the corresponding
529    --  feature. Reliably here means that support is guaranteed for all
530    --  possible settings of the relevant compiler switches (like -mieee),
531    --  since we cannot control the user setting of those switches.
532
533    --  The attributes cannot dependent on the current setting of compiler
534    --  switches, since the values must be static and consistent throughout
535    --  the partition. We probably should add such consistency checks in future,
536    --  but for now we don't do this.
537
538    --  Note: the compiler itself does not use floating-point, so the
539    --  settings of the defaults here are not really relevant.
540
541    --  Note: in some cases, proper support of some of these floating point
542    --  features may require a specific switch (e.g. -mieee on the Alpha)
543    --  to be used to obtain full RM compliant support.
544
545    Denorm_On_Target : Boolean := False;
546    --  Set to False on targets that do not reliably support denormals
547
548    Machine_Rounds_On_Target : Boolean := True;
549    --  Set to False for targets where S'Machine_Rounds is False
550
551    Machine_Overflows_On_Target : Boolean := False;
552    --  Set to True for targets where S'Machine_Overflows is True
553
554    Signed_Zeros_On_Target : Boolean := True;
555    --  Set to False on targets that do not reliably support signed zeros.
556
557    -------------------------------------------
558    -- Boolean-Valued Fixed-Point Attributes --
559    -------------------------------------------
560
561    Fractional_Fixed_Ops_On_Target : Boolean := False;
562    --  Set to True for targets that support fixed-by-fixed multiplication
563    --  and division for fixed-point types with a small value equal to
564    --  2 ** (-(T'Object_Size - 1)) and whose values have an absolute
565    --  value less than 1.0.
566
567    --------------------------------------------------------------
568    -- Handling of Unconstrained Values Returned from Functions --
569    --------------------------------------------------------------
570
571    --  Functions that return variable length objects, notably unconstrained
572    --  arrays are a special case, because there is no simple obvious way of
573    --  implementing this feature. Furthermore, this capability is not present
574    --  in C++ or C, so typically the system ABI does not handle this case.
575
576    --  GNAT uses two different approaches
577
578    --    The Secondary Stack
579
580    --      The secondary stack is a special storage pool that is used for
581    --      this purpose. The called function places the result on the
582    --      secondary stack, and the caller uses or copies the value from
583    --      the secondary stack, and pops the secondary stack after the
584    --      value is consumed. The secondary stack is outside the system
585    --      ABI, and the important point is that although generally it is
586    --      handled in a stack like manner corresponding to the subprogram
587    --      call structure, a return from a function does NOT pop the stack.
588
589    --    DSP (Depressed Stack Pointer)
590
591    --      Some targets permit the implementation of a function call/return
592    --      protocol in which the function does not pop the main stack pointer
593    --      on return, but rather returns with the stack pointer depressed.
594    --      This is not generally permitted by any ABI, but for at least some
595    --      targets, the implementation of alloca provides a model for this
596    --      approach. If return-with-DSP is implemented, then functions that
597    --      return variable length objects do it by returning with the stack
598    --      pointer depressed, and the returned object is a pointer to the
599    --      area within the stack frame of the called procedure that contains
600    --      the returned value. The caller must then pop the main stack when
601    --      this value is consumed.
602
603    Functions_Return_By_DSP_On_Target : Boolean := False;
604    --  Set to True if target permits functions to return with using the
605    --  DSP (depressed stack pointer) approach.
606
607    -----------------
608    -- Data Layout --
609    -----------------
610
611    --  Normally when using the GCC backend, Gigi and GCC perform much of the
612    --  data layout using the standard layout capabilities of GCC. If the
613    --  parameter Backend_Layout is set to False, then the front end must
614    --  perform all data layout. For further details see the package Layout.
615
616    Frontend_Layout_On_Target : Boolean := False;
617    --  Set True if front end does layout
618
619    -----------------
620    -- Subprograms --
621    -----------------
622
623    --  These subprograms are used to initialize the target parameter values
624    --  from the system.ads file. Note that this is only done once, so if more
625    --  than one call is made to either routine, the second and subsequent
626    --  calls are ignored.
627
628    procedure Get_Target_Parameters
629      (System_Text  : Source_Buffer_Ptr;
630       Source_First : Source_Ptr;
631       Source_Last  : Source_Ptr);
632    --  Called at the start of execution to obtain target parameters from
633    --  the source of package System. The parameters provide the source
634    --  text to be scanned (in System_Text (Source_First .. Source_Last)).
635
636    procedure Get_Target_Parameters;
637    --  This version reads in system.ads using Osint. The idea is that the
638    --  caller uses the first version if they have to read system.ads anyway
639    --  (e.g. the compiler) and uses this simpler interface if system.ads is
640    --  not otherwise needed.
641
642 end Targparm;