diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-19 00:31:42 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-19 00:31:42 +0000 |
commit | e4bd5d4a99d0ef1bcfb5fb12ad47ccb78b8dd625 (patch) | |
tree | d40702acfcb4ff5d5279688dcc3cee29d5dd3741 /gcc/ada/bindgen.adb | |
parent | c366f24d4f487df946bb26b7f76cce4c41877cae (diff) | |
download | gcc-e4bd5d4a99d0ef1bcfb5fb12ad47ccb78b8dd625.tar.gz |
* sem_res.adb (Resolve_Selected_Component): do not generate a
discriminant check if the selected component is a component of
the argument of an initialization procedure.
* trans.c (tree_transform, case of arithmetic operators): If result
type is private, the gnu_type is the base type of the full view,
given that the full view itself may be a subtype.
* sem_res.adb: Minor reformatting
* trans.c (tree_transform, case N_Real_Literal): Add missing third
parameter in call to Machine (unknown horrible effects from this
omission).
* urealp.h: Add definition of Round_Even for call to Machine
Add third parameter for Machine
* sem_warn.adb (Check_One_Unit): Suppress warnings completely on
predefined units in No_Run_Time mode.
* misc.c (insn-codes.h): Now include.
* a-except.adb: Preparation work for future integration of the GCC 3
exception handling mechanism
(Notify_Handled_Exception, Notify_Unhandled_Exception): New routines
to factorize previous code sequences and make them externally callable,
e.g. for the Ada personality routine when the GCC 3 mechanism is used.
(Propagate_Exception, Raise_Current_Excep, Raise_From_Signal_Handler):
Use the new notification routines.
* prj-tree.ads (First_Choice_Of): Document the when others case
* bindgen.adb (Gen_Ada_Init_*): Set priority of environment task in
HI-E mode, in order to support Ravenscar profile properly.
* cstand.adb (Create_Standard): Duration is a 32 bit type in HI-E
mode on 32 bits targets.
* fmap.adb: Initial version.
* fmap.ads: Initial version.
* fname-uf.adb (Get_File_Name): Use mapping if unit name mapped.
If search is successfully done, add to mapping.
* frontend.adb: Initialize the mapping if a -gnatem switch was used.
* make.adb:
(Gnatmake): Add new local variable Mapping_File_Name.
Create mapping file when using project file(s).
Delete mapping file before exiting.
* opt.ads (Mapping_File_Name): New variable
* osint.adb (Find_File): Use path name found in mapping, if any.
* prj-env.adb (Create_Mapping_File): New procedure
* prj-env.ads (Create_Mapping_File): New procedure.
* switch.adb (Scan_Front_End_Switches): Add processing for -gnatem
(Mapping_File)
* usage.adb: Add entry for new switch -gnatem.
* Makefile.in: Add dependencies for fmap.o.
* sem_ch10.adb (Analyze_With_Clause): Retrieve proper entity when unit
is a package instantiation rewritten as a package body.
(Install_Withed_Unit): Undo previous change, now redundant.
* layout.adb:
(Compute_Length): Move conversion to Unsigned to callers.
(Get_Max_Size): Convert Len expression to Unsigned after calls to
Compute_Length and Determine_Range.
(Layout_Array_Type): Convert Len expression to Unsigned after calls to
Compute_Length and Determine_Range.
Above changes fix problem with length computation for supernull arrays
where Max (Len, 0) wasn't getting applied due to the Unsigned
conversion used by Compute_Length.
* rtsfind.ads:
(OK_To_Use_In_No_Run_Time_Mode): Allow Ada.Exceptions and
System.Secondary_Stack.
(OK_To_Use_In_Ravenscar_Mode): New table needed to implement Ravenscar
in HI-E mode.
Remove unused entity RE_Exception_Data.
* rtsfind.adb (RTE): Allow Ravenscar Profile in HI mode.
* rident.ads (No_Secondary_Stack): New restriction.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r-- | gcc/ada/bindgen.adb | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb index a45e7923e1f..b1f19af6e13 100644 --- a/gcc/ada/bindgen.adb +++ b/gcc/ada/bindgen.adb @@ -286,6 +286,7 @@ package body Bindgen is --------------------- procedure Gen_Adainit_Ada is + Main_Priority : Int renames ALIs.Table (ALIs.First).Main_Priority; begin WBI (" procedure " & Ada_Init_Name.all & " is"); @@ -347,7 +348,32 @@ package body Bindgen is -- the routine call, rather than define the globals in the binder -- file to deal with cross-library calls in some systems. - if not No_Run_Time_Specified then + if No_Run_Time_Specified then + -- Case of pragma No_Run_Time present. The only global variable + -- that might be needed (by the Ravenscar profile) is + -- the environment task's priority. Also no exception tables are + -- needed. + + if Main_Priority /= No_Main_Priority then + WBI (" Main_Priority : Integer;"); + WBI (" pragma Import (C, Main_Priority," & + " ""__gl_main_priority"");"); + WBI (""); + end if; + + WBI (" begin"); + + if Main_Priority /= No_Main_Priority then + Set_String (" Main_Priority := "); + Set_Int (Main_Priority); + Set_Char (';'); + Write_Statement_Buffer; + + else + WBI (" null;"); + end if; + + else WBI (""); WBI (" procedure Set_Globals"); WBI (" (Main_Priority : Integer;"); @@ -383,7 +409,7 @@ package body Bindgen is WBI (" Set_Globals"); Set_String (" (Main_Priority => "); - Set_Int (ALIs.Table (ALIs.First).Main_Priority); + Set_Int (Main_Priority); Set_Char (','); Write_Statement_Buffer; @@ -449,14 +475,6 @@ package body Bindgen is WBI (" if Handler_Installed = 0 then"); WBI (" Install_Handler;"); WBI (" end if;"); - - -- Case of pragma No_Run_Time present. Globals are not needed since - -- there are no runtime routines to make use of them, and no routine - -- to store them in any case! Also no exception tables are needed. - - else - WBI (" begin"); - WBI (" null;"); end if; Gen_Elab_Calls_Ada; @@ -469,6 +487,7 @@ package body Bindgen is -------------------- procedure Gen_Adainit_C is + Main_Priority : Int renames ALIs.Table (ALIs.First).Main_Priority; begin WBI ("void " & Ada_Init_Name.all & " ()"); WBI ("{"); @@ -493,9 +512,19 @@ package body Bindgen is Write_Statement_Buffer; - -- Code for normal case (no pragma No_Run_Time in use) + if No_Run_Time_Specified then + -- Case where No_Run_Time pragma is present. + -- Set __gl_main_priority if needed for the Ravenscar profile. - if not No_Run_Time_Specified then + if Main_Priority /= No_Main_Priority then + Set_String (" extern int __gl_main_priority = "); + Set_Int (Main_Priority); + Set_Char (';'); + Write_Statement_Buffer; + end if; + + else + -- Code for normal case (no pragma No_Run_Time in use) Gen_Exception_Table_C; @@ -510,7 +539,7 @@ package body Bindgen is WBI (" __gnat_set_globals ("); Set_String (" "); - Set_Int (ALIs.Table (ALIs.First).Main_Priority); + Set_Int (Main_Priority); Set_Char (','); Tab_To (15); Set_String ("/* Main_Priority */"); @@ -584,12 +613,6 @@ package body Bindgen is WBI (" {"); WBI (" __gnat_install_handler ();"); WBI (" }"); - - -- Case where No_Run_Time pragma is present (no globals required) - -- Nothing more needs to be done in this case. - - else - null; end if; WBI (""); |