aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/iirs.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/vhdl/iirs.ads')
-rw-r--r--src/vhdl/iirs.ads55
1 files changed, 41 insertions, 14 deletions
diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads
index 6d3c45ae8..0387f2783 100644
--- a/src/vhdl/iirs.ads
+++ b/src/vhdl/iirs.ads
@@ -284,9 +284,21 @@ package Iirs is
--
-- Get/Set_String8_Id (Field5)
--
- -- Get/Set_Bit_String_Base (State2)
+ -- Base of the bit_string (corresponds to letters 'b', 'o', 'd' or 'x' in
+ -- the base specifier).
+ -- Get/Set_Bit_String_Base (Odigit1)
--
-- Get/Set_Expr_Staticness (State1)
+ --
+ -- True if the bit string is signed, (ie letter 's' is present in the base
+ -- specifier).
+ -- Get/Set_Has_Signed (Flag1)
+ --
+ -- True if the letter 'u' is present in the base specifier.
+ -- Get/Set_Has_Sign (Flag2)
+ --
+ -- True if the integer specifying the length is present.
+ -- Get/Set_Has_Length (Flag3)
-- Iir_Kind_Integer_Literal (Int)
--
@@ -4579,7 +4591,7 @@ package Iirs is
-- Purity depth of an impure subprogram.
Iir_Depth_Impure : constant Iir_Int32 := -1;
- type Base_Type is (Base_None, Base_2, Base_8, Base_16);
+ type Base_Type is (Base_None, Base_2, Base_8, Base_10, Base_16);
-- design file
subtype Iir_Design_File is Iir;
@@ -5028,11 +5040,36 @@ package Iirs is
function Get_Simple_Aggregate_List (Target : Iir) return Iir_List;
procedure Set_Simple_Aggregate_List (Target : Iir; List : Iir_List);
- -- Base of a bit string.
- -- Field: State2 (pos)
+ -- For a string literal: the string identifier.
+ -- Field: Field5 (uc)
+ function Get_String8_Id (Lit : Iir) return String8_Id;
+ procedure Set_String8_Id (Lit : Iir; Id : String8_Id);
+
+ -- For a string literal: the string length.
+ -- Field: Field4 (uc)
+ function Get_String_Length (Lit : Iir) return Int32;
+ procedure Set_String_Length (Lit : Iir; Len : Int32);
+
+ -- Base of a bit string. Base_None for a string literal.
+ -- Field: Odigit1 (pos)
function Get_Bit_String_Base (Lit : Iir) return Base_Type;
procedure Set_Bit_String_Base (Lit : Iir; Base : Base_Type);
+ -- Bit string is signed.
+ -- Field: Flag1
+ function Get_Has_Signed (Lit : Iir) return Boolean;
+ procedure Set_Has_Signed (Lit : Iir; Flag : Boolean);
+
+ -- Bit string sign is explicit
+ -- Field: Flag2
+ function Get_Has_Sign (Lit : Iir) return Boolean;
+ procedure Set_Has_Sign (Lit : Iir; Flag : Boolean);
+
+ -- Bit string length is explicit
+ -- Field: Flag3
+ function Get_Has_Length (Lit : Iir) return Boolean;
+ procedure Set_Has_Length (Lit : Iir; Flag : Boolean);
+
-- The origin of a literal can be null_iir for a literal generated by the
-- parser, or a node which was statically evaluated to this literal.
-- Such nodes are created by eval_expr.
@@ -6232,16 +6269,6 @@ package Iirs is
function Get_End_Location (Target : Iir) return Location_Type;
procedure Set_End_Location (Target : Iir; Loc : Location_Type);
- -- For a string literal: the string identifier.
- -- Field: Field5 (uc)
- function Get_String8_Id (Lit : Iir) return String8_Id;
- procedure Set_String8_Id (Lit : Iir; Id : String8_Id);
-
- -- For a string literal: the string length.
- -- Field: Field4 (uc)
- function Get_String_Length (Lit : Iir) return Int32;
- procedure Set_String_Length (Lit : Iir; Len : Int32);
-
-- For a declaration: true if the declaration is used somewhere.
-- Field: Flag6
function Get_Use_Flag (Decl : Iir) return Boolean;