From 444fb962c6612f9c68d5211ab0fabb1d2aac854e Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 13 Nov 2019 18:59:16 +0100 Subject: synth-static_oper: handle more operations. --- src/synth/synth-static_oper.adb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index e928d8fcb..5626427c6 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -165,10 +165,12 @@ package body Synth.Static_Oper is (Boolean'Pos (Left.Scal > Right.Scal), Boolean_Type); when Iir_Predefined_Integer_Equality => return Create_Value_Discrete - (Boolean'Pos (Left.Scal = Right.Scal), Boolean_Type); + (Boolean'Pos (Get_Const_Discrete (Left) + = Get_Const_Discrete (Right)), Boolean_Type); when Iir_Predefined_Integer_Inequality => return Create_Value_Discrete - (Boolean'Pos (Left.Scal /= Right.Scal), Boolean_Type); + (Boolean'Pos (Get_Const_Discrete (Left) + /= Get_Const_Discrete (Right)), Boolean_Type); when Iir_Predefined_Physical_Physical_Div => return Create_Value_Discrete (Left.Scal / Right.Scal, Res_Typ); @@ -186,7 +188,9 @@ package body Synth.Static_Oper is return Create_Value_Discrete (Boolean'Pos (not Is_Equal (Left, Right)), Boolean_Type); - when Iir_Predefined_Ieee_1164_Vector_And => + when Iir_Predefined_Ieee_1164_Vector_And + | Iir_Predefined_Ieee_Numeric_Std_And_Uns_Uns + | Iir_Predefined_Ieee_Numeric_Std_And_Sgn_Sgn => return Synth_Vector_Dyadic (Left, Right, And_Table, Expr); when Iir_Predefined_Ieee_1164_Vector_Or => -- cgit v1.2.3