From b887f1a033ac9c5daae593722a985e3dc79457c7 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 6 Nov 2012 11:14:13 +0100 Subject: [multiple changes] 2012-11-06 Geert Bosch * 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 * 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 * sem_ch8.adb: Complete previous change. From-SVN: r193225 --- gcc/ada/bindgen.adb | 52 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'gcc/ada/bindgen.adb') diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index f4260a3..bcc01c3 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 -- cgit v1.1