diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-ieee-numeric.adb | 19 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 5 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-ieee-numeric.adb b/src/vhdl/vhdl-ieee-numeric.adb index 4d5c0d5e3..500c0a260 100644 --- a/src/vhdl/vhdl-ieee-numeric.adb +++ b/src/vhdl/vhdl-ieee-numeric.adb @@ -477,6 +477,8 @@ package body Vhdl.Ieee.Numeric is Set_Implicit_Definition (Decl, Predefined); end Handle_Std_Match; + + Res : Iir_Predefined_Functions; begin Decl := Get_Declaration_Chain (Pkg_Decl); @@ -589,6 +591,23 @@ package body Vhdl.Ieee.Numeric is Handle_Resize; when Name_Std_Match => Handle_Std_Match; + when Name_Shift_Left => + if Arg1_Kind = Arg_Vect + and then Arg2_Kind = Arg_Scal + and then Arg2_Sign = Type_Unsigned + then + case Arg1_Sign is + when Type_Signed => + Res := + Iir_Predefined_Ieee_Numeric_Std_Shl_Sgn_Nat; + when Type_Unsigned => + Res := + Iir_Predefined_Ieee_Numeric_Std_Shl_Uns_Nat; + when others => + Res := Iir_Predefined_None; + end case; + Set_Implicit_Definition (Decl, Res); + end if; when others => null; end case; diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 93407a5df..de1df09e9 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -4992,6 +4992,11 @@ package Vhdl.Nodes is Iir_Predefined_Ieee_Numeric_Std_Ne_Sgn_Int, Iir_Predefined_Ieee_Numeric_Std_Ne_Int_Sgn, + Iir_Predefined_Ieee_Numeric_Std_Shl_Uns_Nat, + Iir_Predefined_Ieee_Numeric_Std_Shr_Uns_Nat, + Iir_Predefined_Ieee_Numeric_Std_Shl_Sgn_Nat, + Iir_Predefined_Ieee_Numeric_Std_Shr_Sgn_Nat, + Iir_Predefined_Ieee_Numeric_Std_Not_Uns, Iir_Predefined_Ieee_Numeric_Std_Not_Sgn, |