From 54f71559b50c01fc08b6c07b7d92635de81f8905 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 1 Dec 2019 08:57:16 +0100 Subject: synth: handle static float unary +, abs and exp. For #1044. --- src/synth/synth-static_oper.adb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/synth') diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb index f6d00191e..613e47767 100644 --- a/src/synth/synth-static_oper.adb +++ b/src/synth/synth-static_oper.adb @@ -269,6 +269,9 @@ package body Synth.Static_Oper is 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); + when Iir_Predefined_Floating_Exp => + return Create_Value_Float + (Left.Fp ** Natural (Right.Scal), Res_Typ); when Iir_Predefined_Array_Array_Concat => declare @@ -404,6 +407,10 @@ package body Synth.Static_Oper is when Iir_Predefined_Floating_Negation => return Create_Value_Float (-Operand.Fp, Oper_Typ); + when Iir_Predefined_Floating_Identity => + return Operand; + when Iir_Predefined_Floating_Absolute => + return Create_Value_Float (abs Operand.Fp, Oper_Typ); when Iir_Predefined_Ieee_1164_Condition_Operator => -- Constant std_logic: need to convert. -- cgit v1.2.3