diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-20 07:49:03 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-20 12:19:48 +0200 |
commit | cb72a1834f160d95d026b7e466886fd95fd82146 (patch) | |
tree | 87cd0fff5a8ce03b05b8e6a0a0129b60de90fe61 /src/vhdl/translate/trans-chap3.adb | |
parent | b6d42a577f4ee5f2084a165b0cdf66cadcc878a1 (diff) | |
download | ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.tar.gz ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.tar.bz2 ghdl-cb72a1834f160d95d026b7e466886fd95fd82146.zip |
types: introduce Direction_Type, which replaces Iir_Direction.
Global renaming.
Diffstat (limited to 'src/vhdl/translate/trans-chap3.adb')
-rw-r--r-- | src/vhdl/translate/trans-chap3.adb | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/vhdl/translate/trans-chap3.adb b/src/vhdl/translate/trans-chap3.adb index b0f61fe7e..ad6207658 100644 --- a/src/vhdl/translate/trans-chap3.adb +++ b/src/vhdl/translate/trans-chap3.adb @@ -3332,9 +3332,9 @@ package body Trans.Chap3 is -- Constraint is a range expression, therefore, direction is -- known. case Get_Direction (Constr) is - when Iir_To => + when Dir_To => return Gen_Compare_To; - when Iir_Downto => + when Dir_Downto => return Gen_Compare_Downto; end case; end if; @@ -3776,18 +3776,16 @@ package body Trans.Chap3 is New_Lit (Chap7.Translate_Static_Range_Dir (Range_Constr))); case Get_Direction (Range_Constr) is - when Iir_To => + when Dir_To => Op := ON_Add_Ov; - when Iir_Downto => + when Dir_Downto => Op := ON_Sub_Ov; end case; - Start_If_Stmt - (If_Blk, - New_Compare_Op (ON_Eq, - New_Obj_Value (Length), - New_Lit (Ghdl_Index_0), - Ghdl_Bool_Type)); + Start_If_Stmt (If_Blk, New_Compare_Op (ON_Eq, + New_Obj_Value (Length), + New_Lit (Ghdl_Index_0), + Ghdl_Bool_Type)); -- Null range. New_Assign_Stmt (M2Lv (Range_To_Left (Res_Range)), |