From 3edf2f76e4626a04a750b9cb2cf52633be3ecdfa Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 20 Apr 2009 12:35:28 +0200 Subject: [PATCH] [multiple changes] 2009-04-20 Bob Duff * gnat1drv.adb (Gnat1drv): Put call to Check_Library_Items inside pragma Debug. 2009-04-20 Ed Schonberg * exp_ch9.adb (Build_Protected_Sub_Specification): Mark generated subprogram as Eliminated when source operation is. (Expand_N_Protected_Type_Declaration): Generate protected and unprotected specs for the internal operations, even if the source operation is eliminated. 2009-04-20 Hristian Kirtchev * exp_ch3.adb (Make_Predefined_Primitive_Specs, Predefined_Primitive_Bodies): Do not create the declarations and bodies of the primitive subprograms associated with dispatching select statements when the runtime is in configurable mode. 2009-04-20 Ed Falis * s-vxwext-kernel.ads (tickGet): Use tick64Get. From-SVN: r146393 --- gcc/ada/ChangeLog | 24 ++++++++++++++++++++++++ gcc/ada/exp_ch3.adb | 6 ++++-- gcc/ada/exp_ch9.adb | 11 +++++++---- gcc/ada/gnat1drv.adb | 2 +- gcc/ada/s-vxwext-kernel.ads | 6 ++++++ 5 files changed, 42 insertions(+), 7 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index dbbd2ee..ed49cb7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,27 @@ +2009-04-20 Bob Duff + + * gnat1drv.adb (Gnat1drv): Put call to Check_Library_Items inside + pragma Debug. + +2009-04-20 Ed Schonberg + + * exp_ch9.adb (Build_Protected_Sub_Specification): Mark generated + subprogram as Eliminated when source operation is. + (Expand_N_Protected_Type_Declaration): Generate protected and + unprotected specs for the internal operations, even if the source + operation is eliminated. + +2009-04-20 Hristian Kirtchev + + * exp_ch3.adb (Make_Predefined_Primitive_Specs, + Predefined_Primitive_Bodies): Do not create the declarations and bodies + of the primitive subprograms associated with dispatching select + statements when the runtime is in configurable mode. + +2009-04-20 Ed Falis + + * s-vxwext-kernel.ads (tickGet): Use tick64Get. + 2009-04-20 Thomas Quinot * s-oscons-tmplt.c: Add support for generating a dummy version of diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 629bcad..3af685d 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -7819,12 +7819,13 @@ package body Exp_Ch3 is -- These operations cannot be implemented on VM targets, so we simply -- disable their generation in this case. Disable the generation of - -- these bodies if No_Dispatching_Calls or Ravenscar is active. + -- these bodies if No_Dispatching_Calls, Ravenscar or ZFP is active. if Ada_Version >= Ada_05 and then VM_Target = No_VM and then not Restriction_Active (No_Dispatching_Calls) and then not Restriction_Active (No_Select_Statements) + and then RTE_Available (RE_Select_Specific_Data) then -- These primitives are defined abstract in interface types @@ -8313,7 +8314,7 @@ package body Exp_Ch3 is -- These operations cannot be implemented on VM targets, so we simply -- disable their generation in this case. Disable the generation of - -- these bodies if No_Dispatching_Calls or Ravenscar is active. + -- these bodies if No_Dispatching_Calls, Ravenscar or ZFP is active. if Ada_Version >= Ada_05 and then VM_Target = No_VM @@ -8325,6 +8326,7 @@ package body Exp_Ch3 is and then Has_Interfaces (Tag_Typ))) and then not Restriction_Active (No_Dispatching_Calls) and then not Restriction_Active (No_Select_Statements) + and then RTE_Available (RE_Select_Specific_Data) then Append_To (Res, Make_Disp_Asynchronous_Select_Body (Tag_Typ)); Append_To (Res, Make_Disp_Conditional_Select_Body (Tag_Typ)); diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index d09911a..e142d2d 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -2791,6 +2791,11 @@ package body Exp_Ch9 is Set_Debug_Info_Needed (New_Id); + -- If a pragma Eliminate applies to the source entity, the internal + -- subprograms will be eliminated as well. + + Set_Is_Eliminated (New_Id, Is_Eliminated (Def_Id)); + if Nkind (Specification (Decl)) = N_Procedure_Specification then New_Spec := Make_Procedure_Specification (Loc, @@ -7212,7 +7217,7 @@ package body Exp_Ch9 is when N_Subprogram_Body => - -- Exclude functions created to analyze defaults + -- Do not create bodies for eliminated operations. if not Is_Eliminated (Defining_Entity (Op_Body)) and then not Is_Eliminated (Corresponding_Spec (Op_Body)) @@ -7803,9 +7808,7 @@ package body Exp_Ch9 is Comp := First (Visible_Declarations (Pdef)); while Present (Comp) loop - if Nkind (Comp) = N_Subprogram_Declaration - and then not Is_Eliminated (Defining_Entity (Comp)) - then + if Nkind (Comp) = N_Subprogram_Declaration then Sub := Make_Subprogram_Declaration (Loc, Specification => diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 53b789e..2fa24f4 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -732,7 +732,7 @@ begin Namet.Lock; Stringt.Lock; - Check_Library_Items; -- For debugging + pragma Debug (Check_Library_Items); -- Here we call the back end to generate the output code diff --git a/gcc/ada/s-vxwext-kernel.ads b/gcc/ada/s-vxwext-kernel.ads index 423acab..055c0a4 100644 --- a/gcc/ada/s-vxwext-kernel.ads +++ b/gcc/ada/s-vxwext-kernel.ads @@ -75,4 +75,10 @@ package System.VxWorks.Ext is function Set_Time_Slice (ticks : int) return int; pragma Import (C, Set_Time_Slice, "kernelTimeSlice"); + type UINT64 is mod 2 ** Long_Long_Integer'Size; + + function tickGet return UINT64; + -- "tickGet" not available for cert vThreads: + pragma Import (C, tickGet, "tick64Get"); + end System.VxWorks.Ext; -- 2.7.4