diff options
Diffstat (limited to 'ortho')
-rw-r--r-- | ortho/mcode/ortho_code-consts.adb | 15 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-sysdeps.adb | 6 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-sysdeps.ads | 4 | ||||
-rw-r--r-- | ortho/mcode/ortho_code-types.adb | 6 | ||||
-rw-r--r-- | ortho/mcode/ortho_mcode.adb | 2 |
5 files changed, 18 insertions, 15 deletions
diff --git a/ortho/mcode/ortho_code-consts.adb b/ortho/mcode/ortho_code-consts.adb index dcd7d28..affe82c 100644 --- a/ortho/mcode/ortho_code-consts.adb +++ b/ortho/mcode/ortho_code-consts.adb @@ -26,43 +26,52 @@ package body Ortho_Code.Consts is Kind : OC_Kind; Lit_Type : O_Tnode; end record; + for Cnode_Common'Size use 64; type Cnode_Signed is record Val : Integer_64; end record; + for Cnode_Signed'Size use 64; type Cnode_Unsigned is record Val : Unsigned_64; end record; + for Cnode_Unsigned'Size use 64; type Cnode_Float is record Val : IEEE_Float_64; end record; + for Cnode_Float'Size use 64; type Cnode_Enum is record Id : O_Ident; Val : Uns32; end record; + for Cnode_Enum'Size use 64; type Cnode_Addr is record Decl : O_Dnode; Pad : Int32; end record; + for Cnode_Addr'Size use 64; type Cnode_Aggr is record Els : Int32; Nbr : Int32; end record; + for Cnode_Aggr'Size use 64; type Cnode_Sizeof is record Atype : O_Tnode; Pad : Int32; end record; + for Cnode_Sizeof'Size use 64; type Cnode_Union is record El : O_Cnode; Field : O_Fnode; end record; + for Cnode_Union'Size use 64; package Cnodes is new GNAT.Table (Table_Component_Type => Cnode_Common, @@ -86,7 +95,7 @@ package body Ortho_Code.Consts is function To_Cnode_Unsigned is new Ada.Unchecked_Conversion (Cnode_Common, Cnode_Unsigned); begin - return To_Cnode_Unsigned (Cnodes.Table (Cst + 1)).Val; + return To_Cnode_Unsigned (Cnodes.Table (Cst + 1)).Val; end Get_Const_U64; function Get_Const_I64 (Cst : O_Cnode) return Integer_64 @@ -94,7 +103,7 @@ package body Ortho_Code.Consts is function To_Cnode_Signed is new Ada.Unchecked_Conversion (Cnode_Common, Cnode_Signed); begin - return To_Cnode_Signed (Cnodes.Table (Cst + 1)).Val; + return To_Cnode_Signed (Cnodes.Table (Cst + 1)).Val; end Get_Const_I64; function Get_Const_F64 (Cst : O_Cnode) return IEEE_Float_64 @@ -102,7 +111,7 @@ package body Ortho_Code.Consts is function To_Cnode_Float is new Ada.Unchecked_Conversion (Cnode_Common, Cnode_Float); begin - return To_Cnode_Float (Cnodes.Table (Cst + 1)).Val; + return To_Cnode_Float (Cnodes.Table (Cst + 1)).Val; end Get_Const_F64; function To_Cnode_Common is new Ada.Unchecked_Conversion diff --git a/ortho/mcode/ortho_code-sysdeps.adb b/ortho/mcode/ortho_code-sysdeps.adb deleted file mode 100644 index c5e0629..0000000 --- a/ortho/mcode/ortho_code-sysdeps.adb +++ /dev/null @@ -1,6 +0,0 @@ -package body Ortho_Code.Sysdeps is - procedure Init is - begin - null; - end Init; -end Ortho_Code.Sysdeps; diff --git a/ortho/mcode/ortho_code-sysdeps.ads b/ortho/mcode/ortho_code-sysdeps.ads deleted file mode 100644 index e680e4d..0000000 --- a/ortho/mcode/ortho_code-sysdeps.ads +++ /dev/null @@ -1,4 +0,0 @@ -package Ortho_Code.Sysdeps is - -- OS dependant initializations. - procedure Init; -end Ortho_Code.Sysdeps; diff --git a/ortho/mcode/ortho_code-types.adb b/ortho/mcode/ortho_code-types.adb index 63e6770..1a505b7 100644 --- a/ortho/mcode/ortho_code-types.adb +++ b/ortho/mcode/ortho_code-types.adb @@ -722,6 +722,12 @@ package body Ortho_Code.Types is Put (", nbr_fields: "); Put (To_Int32 (Get_Type_Record_Nbr_Fields (Atype))); New_Line; + when OT_Subarray => + Put (" base type: "); + Put (Int32 (Get_Type_Subarray_Base (Atype))); + Put (", length: "); + Put (To_Int32 (Get_Type_Subarray_Length (Atype))); + New_Line; when others => null; end case; diff --git a/ortho/mcode/ortho_mcode.adb b/ortho/mcode/ortho_mcode.adb index f9335fa..722e884 100644 --- a/ortho/mcode/ortho_mcode.adb +++ b/ortho/mcode/ortho_mcode.adb @@ -17,7 +17,6 @@ -- 02111-1307, USA. with Ada.Text_IO; with Ortho_Code.Debug; -with Ortho_Code.Sysdeps; with Ortho_Ident; -- with Binary_File; @@ -80,7 +79,6 @@ package body Ortho_Mcode is if New_Access_Type (O_Tnode_Null) /= O_Tnode_Ptr then raise Program_Error; end if; - Ortho_Code.Sysdeps.Init; -- Do not finish the access, since this creates an infinite recursion -- in gdb (at least for GDB 6.3). --Finish_Access_Type (O_Tnode_Ptr, O_Tnode_Ptr); |