diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-13 10:19:19 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-13 10:19:19 +0000 |
commit | 783fd6deba9886a2118c5dfd14c37ed8510b528f (patch) | |
tree | 3cf3e951f0c6130ad3c9ebea685be075a959511b /gcc/ada/targparm.ads | |
parent | ff84c916d0b0a60f7b83fbe7729b275b9d6abcc2 (diff) | |
download | gcc-783fd6deba9886a2118c5dfd14c37ed8510b528f.tar.gz |
2007-12-06 Eric Botcazou <ebotcazou@adacore.com>
Bob Duff <duff@adacore.com>
Tristan Gingold <gingold@adacore.com>
* system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
(Always_Compatible_Rep): New flag to control trampolines globally.
(Dynamic_Trampolines_Used): New flag for implementing the
No_Implicit_Dynamic_Code restriction more correctly (not yet used,
and not yet set correctly for some targets).
* s-taprop-vxworks.adb: Use stack limit method of stack checking.
Simply indirectly call s-stchop when a task is created.
* ali.ads:
New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
appears as an argument (entries A) in an ALI file.
* fe.h (Stack_Check_Limits): Declare new target parameter.
(Check_Implicit_Dynamic_Code_Allowed): New procedure.
* init.c: Declare __gnat_set_stack_limit_hook for VxWorks kernel RTS.
This variable is declared in C to be sure not subject to elaboration
code.
(__gnat_map_signal, VxWorks): In kernel mode, map SIGILL to
Storage_Error.
* targparm.ads, targparm.adb (Stack_Check_Limits): New parameter.
(Always_Compatible_Rep, Dynamic_Trampolines_Used): New parameters.
* s-stchop.ads: Add comments.
* s-stchop-vxworks.adb: Package almost fully rewritten to use stack
limit method of stack checking.
* s-stchop-limit.ads: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130814 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/targparm.ads')
-rw-r--r-- | gcc/ada/targparm.ads | 64 |
1 files changed, 51 insertions, 13 deletions
diff --git a/gcc/ada/targparm.ads b/gcc/ada/targparm.ads index 7f17dd56818..74e65ea625b 100644 --- a/gcc/ada/targparm.ads +++ b/gcc/ada/targparm.ads @@ -31,8 +31,10 @@ -- -- ------------------------------------------------------------------------------ --- This package obtains parameters from the target runtime version of --- System, to indicate parameters relevant to the target environment. +-- This package obtains parameters from the target runtime version of System, +-- to indicate parameters relevant to the target environment. + +-- Is it right for this to be modified GPL??? -- Conceptually, these parameters could be obtained using rtsfind, but -- we do not do this for four reasons: @@ -180,12 +182,10 @@ package Targparm is -- The following parameters correspond to the variables defined in the -- private part of System (without the terminating _On_Target). Note -- that it is required that all parameters defined here be specified - -- in the target specific version of system.ads (there are no defaults). - - -- All these parameters should be regarded as read only by all clients - -- of the package. The only way they get modified is by calling the - -- Get_Target_Parameters routine which reads the values from a provided - -- text buffer containing the source of the system package. + -- in the target specific version of system.ads. Thus, to add a new + -- parameter, add it to all system*.ads files. (There is a defaulting + -- mechanism, but we don't normally take advantage of it, as explained + -- below.) -- The default values here are used if no value is found in system.ads. -- This should normally happen if the special version of system.ads used @@ -197,6 +197,11 @@ package Targparm is -- sources, as well as avoiding duplicating values in all system-*.ads -- files for flags that are used on a few platforms only. + -- All these parameters should be regarded as read only by all clients + -- of the package. The only way they get modified is by calling the + -- Get_Target_Parameters routine which reads the values from a provided + -- text buffer containing the source of the system package. + ---------------------------- -- Special Target Control -- ---------------------------- @@ -425,6 +430,23 @@ package Targparm is -- the source program may not contain explicit 64-bit shifts. In addition, -- the code generated for packed arrays will avoid the use of long shifts. + -------------------- + -- Indirect Calls -- + -------------------- + + Always_Compatible_Rep_On_Target : Boolean := True; + -- If True, the Can_Use_Internal_Rep flag (see Einfo) is set to False in + -- all cases. This corresponds to the traditional code generation + -- strategy. False allows the front end to choose a policy that partly or + -- entirely eliminates dynamically generated trampolines. + + Dynamic_Trampolines_Used_On_Target : Boolean := True; + -- True if the back end uses dynamically generated trampolines to implement + -- '[Unrestricted_]Access of nested subprograms when Can_Use_Internal_Rep + -- is False for the access type. (Can_Use_Internal_Rep = True forbids the + -- use of such trampolines.) Used in the implementation of pragma + -- Restrictions (No_Implicit_Dynamic_Code). + ------------------------------- -- Control of Stack Checking -- ------------------------------- @@ -444,6 +466,18 @@ package Targparm is -- size for the environment task depends on the operating -- system and cannot be set in a system-independent way. + -- GCC Stack-limit Mechanism + + -- This approach uses the GCC stack limits mechanism. + -- It relies on comparing the stack pointer with the + -- values of a global symbol. If the check fails, a + -- trap is explicitly generated. The advantage is + -- that the mechanism requires no memory protection, + -- but operating system and run-time support are + -- needed to manage the per-task values of the symbol. + -- This is the default method after probing where it + -- is available. + -- GNAT Stack-limit Checking -- This method relies on comparing the stack pointer @@ -452,13 +486,17 @@ package Targparm is -- that the method requires no extra system dependent -- runtime support and can be used on systems without -- memory protection as well, but at the cost of more - -- overhead for doing the check. This method is the - -- default on systems that lack complete support for - -- probing. + -- overhead for doing the check. This is the fallback + -- method if the above two are not supported. Stack_Check_Probes_On_Target : Boolean := False; - -- Indicates if stack check probes are used, as opposed to the standard - -- target independent comparison method. + -- Indicates if the GCC probing mechanism is used + + Stack_Check_Limits_On_Target : Boolean := False; + -- Indicates if the GCC stack-limit mechanism is used + + -- Both flags cannot be simultaneously set to True. If neither + -- is, the target independent fallback method is used. Stack_Check_Default_On_Target : Boolean := False; -- Indicates if stack checking is on by default |