diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-06 10:14:13 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-06 10:14:13 +0000 |
commit | a4307c4a21826078c817c25ce77ae19aa20742f4 (patch) | |
tree | fb0147fbad50c7ea63b9ef646b5de01da32bcd66 /gcc/ada/bindgen.adb | |
parent | 806e0cb11b566e63449a3110bb2e861f2db8c7b9 (diff) | |
download | gcc-a4307c4a21826078c817c25ce77ae19aa20742f4.tar.gz |
2012-11-06 Geert Bosch <bosch@adacore.com>
* eval_fat.adb (Machine, Succ): Fix front end to support static
evaluation of attributes on targets with both VAX and IEEE float.
* sem_util.ads, sem_util.adb (Has_Denormals, Has_Signed_Zeros):
New type-specific functions. Previously we used Denorm_On_Target
and Signed_Zeros_On_Target directly, but that doesn't work well
for OpenVMS where a single target supports both floating point
with and without signed zeros.
* sem_attr.adb (Attribute_Denorm, Attribute_Signed_Zeros): Use
new Has_Denormals and Has_Signed_Zeros functions to support both
IEEE and VAX floating point on a single target.
2012-11-06 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (System_Interrupts_Used): New variable.
(Gen_Adainit): Declare and call
Install_Restricted_Handlers_Sequential if System.Interrupts is
used when elaboration policy is sequential.
2012-11-06 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb: Complete previous change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 52 |
1 files changed, 46 insertions, 6 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index f4260a3ded1..bcc01c3d299 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -82,7 +82,13 @@ package body Bindgen is -- Flag indicating whether the unit System.Tasking.Restricted.Stages is in -- the closure of the partition. This is set by Resolve_Binder_Options, -- and it used to call a routine to active all the tasks at the end of - -- the elaboration. + -- the elaboration when partition elaboration policy is sequential. + + System_Interrupts_Used : Boolean := False; + -- Flag indicating whether the unit System.Interrups is in the closure of + -- the partition. This is set by Resolve_Binder_Options, and it used to + -- attach interrupt handlers at the end of the elaboration when partition + -- elaboration policy is sequential. Lib_Final_Built : Boolean := False; -- Flag indicating whether the finalize_library rountine has been built @@ -488,6 +494,16 @@ package body Bindgen is WBI (""); end if; + if System_Interrupts_Used + and then Partition_Elaboration_Policy_Specified = 'S' + then + WBI (" procedure Install_Restricted_Handlers_Sequential;"); + WBI (" pragma Import (C," + & "Install_Restricted_Handlers_Sequential," & + " ""__gnat_attach_all_handlers"");"); + WBI (""); + end if; + if System_Tasking_Restricted_Stages_Used and then Partition_Elaboration_Policy_Specified = 'S' then @@ -601,7 +617,21 @@ package body Bindgen is WBI (" pragma Import (C, Handler_Installed, " & """__gnat_handler_installed"");"); - -- Import task activation procedure for ravenscar + -- Import handlers attach procedure for sequential elaboration + -- policy. + + if System_Interrupts_Used + and then Partition_Elaboration_Policy_Specified = 'S' + then + WBI (" procedure Install_Restricted_Handlers_Sequential;"); + WBI (" pragma Import (C," + & "Install_Restricted_Handlers_Sequential," & + " ""__gnat_attach_all_handlers"");"); + WBI (""); + end if; + + -- Import task activation procedure for sequential elaboration + -- policy. if System_Tasking_Restricted_Stages_Used and then Partition_Elaboration_Policy_Specified = 'S' @@ -944,10 +974,16 @@ package body Bindgen is WBI (" Freeze_Dispatching_Domains;"); end if; - if System_Tasking_Restricted_Stages_Used - and then Partition_Elaboration_Policy_Specified = 'S' - then - WBI (" Activate_All_Tasks_Sequential;"); + -- Sequential partition elaboration policy + + if Partition_Elaboration_Policy_Specified = 'S' then + if System_Interrupts_Used then + WBI (" Install_Restricted_Handlers_Sequential;"); + end if; + + if System_Tasking_Restricted_Stages_Used then + WBI (" Activate_All_Tasks_Sequential;"); + end if; end if; -- Case of main program is CIL function or procedure @@ -2896,6 +2932,10 @@ package body Bindgen is (System_Tasking_Restricted_Stages_Used, "system.tasking.restricted.stages%s"); + -- Ditto for the use of interrupts + + Check_Package (System_Interrupts_Used, "system.interrupts%s"); + -- Ditto for the use of dispatching domains Check_Package |