From f19f6a799f1f064dc96a34165e0f528418a1bc9d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 29 Nov 2019 07:59:28 +0100 Subject: synth-static_oper: add +,-,* for floats. For #1044 --- src/synth/synth-static_oper.adb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index 3a1c53ef4..7e5cb7a84 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -258,9 +258,14 @@ package body Synth.Static_Oper is return Create_Value_Discrete (Boolean'Pos (Left.Fp >= Right.Fp), Boolean_Type); + when Iir_Predefined_Floating_Plus => + return Create_Value_Float (Left.Fp + Right.Fp, Res_Typ); + when Iir_Predefined_Floating_Minus => + return Create_Value_Float (Left.Fp - Right.Fp, Res_Typ); + when Iir_Predefined_Floating_Mul => + return Create_Value_Float (Left.Fp * Right.Fp, Res_Typ); when Iir_Predefined_Floating_Div => - return Create_Value_Float - (Left.Fp / Right.Fp, Res_Typ); + return Create_Value_Float (Left.Fp / Right.Fp, Res_Typ); when Iir_Predefined_Array_Equality | Iir_Predefined_Record_Equality => -- cgit v1.2.3