diff options
Diffstat (limited to 'gcc/ada/cstand.adb')
-rw-r--r-- | gcc/ada/cstand.adb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ada/cstand.adb b/gcc/ada/cstand.adb index 09c125d..57355be 100644 --- a/gcc/ada/cstand.adb +++ b/gcc/ada/cstand.adb @@ -1305,6 +1305,9 @@ package body CStand is Set_Scope (Standard_Integer_64, Standard_Standard); Build_Signed_Integer_Type (Standard_Integer_64, 64); + -- Standard_Unsigned is not user visible, but is used internally. It + -- is an unsigned type with the same length as Standard.Integer. + Standard_Unsigned := New_Standard_Entity; Decl := New_Node (N_Full_Type_Declaration, Stloc); Set_Defining_Identifier (Decl, Standard_Unsigned); @@ -1329,6 +1332,32 @@ package body CStand is Set_Etype (High_Bound (R_Node), Standard_Unsigned); Set_Scalar_Range (Standard_Unsigned, R_Node); + -- Standard_Unsigned_64 is not user visible, but is used internally. It + -- is an unsigned type mod 2**64, 64-bits unsigned, size is 64. + + Standard_Unsigned_64 := New_Standard_Entity; + Decl := New_Node (N_Full_Type_Declaration, Stloc); + Set_Defining_Identifier (Decl, Standard_Unsigned_64); + Make_Name (Standard_Unsigned_64, "unsigned_64"); + + Set_Ekind (Standard_Unsigned_64, E_Modular_Integer_Type); + Set_Scope (Standard_Unsigned_64, Standard_Standard); + Set_Etype (Standard_Unsigned_64, Standard_Unsigned_64); + Init_Size (Standard_Unsigned_64, 64); + Set_Elem_Alignment (Standard_Unsigned_64); + Set_Modulus (Standard_Unsigned_64, Uint_2 ** 64); + Set_Is_Unsigned_Type (Standard_Unsigned_64); + Set_Size_Known_At_Compile_Time + (Standard_Unsigned_64); + Set_Is_Known_Valid (Standard_Unsigned_64, True); + + R_Node := New_Node (N_Range, Stloc); + Set_Low_Bound (R_Node, Make_Integer (Uint_0)); + Set_High_Bound (R_Node, Make_Integer (Uint_2 ** 64 - 1)); + Set_Etype (Low_Bound (R_Node), Standard_Unsigned_64); + Set_Etype (High_Bound (R_Node), Standard_Unsigned_64); + Set_Scalar_Range (Standard_Unsigned_64, R_Node); + -- Note: universal integer and universal real are constructed as fully -- formed signed numeric types, with parameters corresponding to the -- longest runtime types (Long_Long_Integer and Long_Long_Float). This |