summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ortho/mcode/ortho_code-consts.adb31
1 files changed, 17 insertions, 14 deletions
diff --git a/ortho/mcode/ortho_code-consts.adb b/ortho/mcode/ortho_code-consts.adb
index affe82c..173adff 100644
--- a/ortho/mcode/ortho_code-consts.adb
+++ b/ortho/mcode/ortho_code-consts.adb
@@ -24,6 +24,9 @@ with Ortho_Code.Debug;
package body Ortho_Code.Consts is
type Cnode_Common is record
Kind : OC_Kind;
+ Pad1 : Unsigned_8;
+ Pad2 : Unsigned_8;
+ Pad3 : Unsigned_8;
Lit_Type : O_Tnode;
end record;
for Cnode_Common'Size use 64;
@@ -123,14 +126,14 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Signed,
- Lit_Type => Ltype));
+ Lit_Type => Ltype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Signed'(Val => Value)));
return Res;
end New_Signed_Literal;
function To_Cnode_Common is new Ada.Unchecked_Conversion
- (Source => Cnode_Unsigned, Target => Cnode_Common);
+ (Source => Unsigned_64, Target => Cnode_Common);
function New_Unsigned_Literal (Ltype : O_Tnode; Value : Unsigned_64)
return O_Cnode
@@ -138,9 +141,9 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Unsigned,
- Lit_Type => Ltype));
+ Lit_Type => Ltype, others => 0));
Res := Cnodes.Last;
- Cnodes.Append (To_Cnode_Common (Cnode_Unsigned'(Val => Value)));
+ Cnodes.Append (To_Cnode_Common (Value));
return Res;
end New_Unsigned_Literal;
@@ -203,7 +206,7 @@ package body Ortho_Code.Consts is
(Source => Cnode_Float, Target => Cnode_Common);
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Float,
- Lit_Type => Ltype));
+ Lit_Type => Ltype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Float'(Val => Value)));
return Res;
@@ -212,7 +215,7 @@ package body Ortho_Code.Consts is
function New_Null_Access (Ltype : O_Tnode) return O_Cnode is
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Null,
- Lit_Type => Ltype));
+ Lit_Type => Ltype, others => 0));
return Cnodes.Last;
end New_Null_Access;
@@ -228,7 +231,7 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Address,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Addr'(Decl => Decl,
Pad => 0)));
@@ -241,7 +244,7 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Address,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Addr'(Decl => Decl,
Pad => 0)));
@@ -254,7 +257,7 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Subprg_Address,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Addr'(Decl => Subprg,
Pad => 0)));
@@ -284,7 +287,7 @@ package body Ortho_Code.Consts is
Res : O_Cnode;
begin
Cnodes.Append (Cnode_Common'(Kind => OC_Lit,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Enum'(Id => Id,
Val => Val)));
@@ -335,7 +338,7 @@ package body Ortho_Code.Consts is
Val := Els.Allocate (Integer (Num));
Cnodes.Append (Cnode_Common'(Kind => OC_Record,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
List := (Res => Cnodes.Last,
Rec_Field => Get_Type_Record_Fields (Atype),
El => Val);
@@ -368,7 +371,7 @@ package body Ortho_Code.Consts is
Val := Els.Allocate (Integer (Num));
Cnodes.Append (Cnode_Common'(Kind => OC_Array,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
List := (Res => Cnodes.Last,
El => Val);
Cnodes.Append (To_Cnode_Common (Cnode_Aggr'(Els => Val,
@@ -413,7 +416,7 @@ package body Ortho_Code.Consts is
begin
if Debug.Flag_Debug_Hli then
Cnodes.Append (Cnode_Common'(Kind => OC_Union,
- Lit_Type => Atype));
+ Lit_Type => Atype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Union'(El => Value,
Field => Field)));
@@ -445,7 +448,7 @@ package body Ortho_Code.Consts is
begin
if Debug.Flag_Debug_Hli then
Cnodes.Append (Cnode_Common'(Kind => OC_Sizeof,
- Lit_Type => Rtype));
+ Lit_Type => Rtype, others => 0));
Res := Cnodes.Last;
Cnodes.Append (To_Cnode_Common (Cnode_Sizeof'(Atype => Atype,
Pad => 0)));