diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-06-17 21:50:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-06-17 21:50:25 +0200 |
commit | 473c83961abe4e2fb52c8812e46bf19a41fe52cf (patch) | |
tree | 130b71c9e47b60837257ab7b104adf99d44152b8 /src/ortho/mcode/ortho_code-exprs.adb | |
parent | 6581cce8c6ea51b5386156fa4d21bd8f1865f851 (diff) | |
download | ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.gz ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.tar.bz2 ghdl-473c83961abe4e2fb52c8812e46bf19a41fe52cf.zip |
src/ortho: add new_convert.
Diffstat (limited to 'src/ortho/mcode/ortho_code-exprs.adb')
-rw-r--r-- | src/ortho/mcode/ortho_code-exprs.adb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ortho/mcode/ortho_code-exprs.adb b/src/ortho/mcode/ortho_code-exprs.adb index fd467e315..e580082c7 100644 --- a/src/ortho/mcode/ortho_code-exprs.adb +++ b/src/ortho/mcode/ortho_code-exprs.adb @@ -1034,9 +1034,18 @@ package body Ortho_Code.Exprs is Check_Ref (Val); end if; - return New_Enode (OE_Conv, Rtype, Val, O_Enode (Rtype)); + return New_Enode (OE_Conv_Ov, Rtype, Val, O_Enode (Rtype)); end New_Convert_Ov; + function New_Convert (Val : O_Enode; Rtype : O_Tnode) return O_Enode is + begin + if Flag_Debug_Assert then + Check_Ref (Val); + end if; + + return New_Enode (OE_Conv, Rtype, Val, O_Enode (Rtype)); + end New_Convert; + function New_Unchecked_Address (Lvalue : O_Lnode; Atype : O_Tnode) return O_Enode is begin @@ -1194,7 +1203,7 @@ package body Ortho_Code.Exprs is raise Program_Error; end case; if N_Mode /= Mode and not Flag_Debug_Hli then - Res := New_Enode (OE_Conv, N_Mode, V_Type, Val, O_Enode (V_Type)); + Res := New_Enode (OE_Conv_Ov, N_Mode, V_Type, Val, O_Enode (V_Type)); else Res := Val; end if; |