aboutsummaryrefslogtreecommitdiffstats
path: root/src/ortho/mcode/ortho_mcode.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-06-17 21:50:25 +0200
committerTristan Gingold <tgingold@free.fr>2020-06-17 21:50:25 +0200
commit473c83961abe4e2fb52c8812e46bf19a41fe52cf (patch)
tree130b71c9e47b60837257ab7b104adf99d44152b8 /src/ortho/mcode/ortho_mcode.adb
parent6581cce8c6ea51b5386156fa4d21bd8f1865f851 (diff)
downloadghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.gz
ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.bz2
ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.zip
src/ortho: add new_convert.
Diffstat (limited to 'src/ortho/mcode/ortho_mcode.adb')
-rw-r--r--src/ortho/mcode/ortho_mcode.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ortho/mcode/ortho_mcode.adb b/src/ortho/mcode/ortho_mcode.adb
index 95f442c89..cd7131d73 100644
--- a/src/ortho/mcode/ortho_mcode.adb
+++ b/src/ortho/mcode/ortho_mcode.adb
@@ -284,12 +284,12 @@ package body Ortho_Mcode is
end Finish_Record_Aggr;
procedure Start_Array_Aggr
- (List : out O_Array_Aggr_List; Arr_Type : O_Tnode; Len : Unsigned_32)
+ (List : out O_Array_Aggr_List; Atype : O_Tnode; Len : Unsigned_32)
is
begin
Ortho_Code.Consts.Start_Array_Aggr
(Ortho_Code.Consts.O_Array_Aggr_List (List),
- Ortho_Code.O_Tnode (Arr_Type),
+ Ortho_Code.O_Tnode (Atype),
Len);
end Start_Array_Aggr;
@@ -450,6 +450,13 @@ package body Ortho_Mcode is
Ortho_Code.O_Tnode (Rtype)));
end New_Convert_Ov;
+ function New_Convert (Val : O_Enode; Rtype : O_Tnode) return O_Enode is
+ begin
+ return O_Enode
+ (Ortho_Code.Exprs.New_Convert (Ortho_Code.O_Enode (Val),
+ Ortho_Code.O_Tnode (Rtype)));
+ end New_Convert;
+
function New_Address (Lvalue : O_Lnode; Atype : O_Tnode)
return O_Enode is
begin