summaryrefslogtreecommitdiff
path: root/gcc/ada/cstand.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-19 00:31:42 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-19 00:31:42 +0000
commite4bd5d4a99d0ef1bcfb5fb12ad47ccb78b8dd625 (patch)
treed40702acfcb4ff5d5279688dcc3cee29d5dd3741 /gcc/ada/cstand.adb
parentc366f24d4f487df946bb26b7f76cce4c41877cae (diff)
downloadgcc-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/cstand.adb')
-rw-r--r--gcc/ada/cstand.adb35
1 files changed, 27 insertions, 8 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb
index fc29af096cc..1527ce10cf8 100644
--- a/gcc/ada/cstand.adb
+++ b/gcc/ada/cstand.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.2 $
+-- $Revision$
-- --
-- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
-- --
@@ -1003,14 +1003,27 @@ package body CStand is
-- Create type declaration for Duration, using a 64-bit size.
-- Delta is 1 nanosecond.
+ -- Except on 32 bits machine in No_Run_Time mode, in which case Duration
+ -- is a 32 bits value whose delta is 10E-4 seconds.
Build_Duration : declare
- Dlo : constant Uint := Intval (Type_Low_Bound (Standard_Integer_64));
- Dhi : constant Uint := Intval (Type_High_Bound (Standard_Integer_64));
-
- Delta_Val : constant Ureal := UR_From_Components (Uint_1, Uint_9, 10);
+ Dlo : Uint;
+ Dhi : Uint;
+ Delta_Val : Ureal;
+ Use_32_Bits : constant Boolean :=
+ No_Run_Time and then System_Word_Size = 32;
begin
+ if Use_32_Bits then
+ Dlo := Intval (Type_Low_Bound (Standard_Integer_32));
+ Dhi := Intval (Type_High_Bound (Standard_Integer_32));
+ Delta_Val := UR_From_Components (Uint_1, Uint_4, 10);
+ else
+ Dlo := Intval (Type_Low_Bound (Standard_Integer_64));
+ Dhi := Intval (Type_High_Bound (Standard_Integer_64));
+ Delta_Val := UR_From_Components (Uint_1, Uint_9, 10);
+ end if;
+
Decl :=
Make_Full_Type_Declaration (Stloc,
Defining_Identifier => Standard_Duration,
@@ -1024,9 +1037,15 @@ package body CStand is
High_Bound => Make_Real_Literal (Stloc,
Realval => Dhi * Delta_Val))));
- Set_Ekind (Standard_Duration, E_Ordinary_Fixed_Point_Type);
- Set_Etype (Standard_Duration, Standard_Duration);
- Init_Size (Standard_Duration, 64);
+ Set_Ekind (Standard_Duration, E_Ordinary_Fixed_Point_Type);
+ Set_Etype (Standard_Duration, Standard_Duration);
+
+ if Use_32_Bits then
+ Init_Size (Standard_Duration, 32);
+ else
+ Init_Size (Standard_Duration, 64);
+ end if;
+
Set_Prim_Alignment (Standard_Duration);
Set_Delta_Value (Standard_Duration, Delta_Val);
Set_Small_Value (Standard_Duration, Delta_Val);