summaryrefslogtreecommitdiff
path: root/ortho/mcode/ortho_code-consts.adb
diff options
context:
space:
mode:
authorgingold2010-01-28 06:08:48 +0000
committergingold2010-01-28 06:08:48 +0000
commite2b41faa79b1f32569ccbc514a375fc2e6f5e99f (patch)
treebdb53cf3c46d99c7dd5d125cb262034e7498cde8 /ortho/mcode/ortho_code-consts.adb
parent3cc13c09aeaaf0920cedd2bf7a8e902735a92d42 (diff)
downloadghdl-e2b41faa79b1f32569ccbc514a375fc2e6f5e99f.tar.gz
ghdl-e2b41faa79b1f32569ccbc514a375fc2e6f5e99f.tar.bz2
ghdl-e2b41faa79b1f32569ccbc514a375fc2e6f5e99f.zip
Improve doc.
Remove ortho_code-sysdeps. Add Pragma convention C in grt for accesses to subprograms. Fix build on windows.
Diffstat (limited to 'ortho/mcode/ortho_code-consts.adb')
-rw-r--r--ortho/mcode/ortho_code-consts.adb15
1 files changed, 12 insertions, 3 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