diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-01 08:57:16 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-01 19:42:07 +0100 |
commit | 54f71559b50c01fc08b6c07b7d92635de81f8905 (patch) | |
tree | 3fb32d5a8b931819810c095205a21eedf1ef36c6 /src | |
parent | 3c34be23942578a9c8fd3bafa9987a69a6398486 (diff) | |
download | ghdl-54f71559b50c01fc08b6c07b7d92635de81f8905.tar.gz ghdl-54f71559b50c01fc08b6c07b7d92635de81f8905.tar.bz2 ghdl-54f71559b50c01fc08b6c07b7d92635de81f8905.zip |
synth: handle static float unary +, abs and exp. For #1044.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/synth-static_oper.adb | 7 |
1 files changed, 7 insertions, 0 deletions
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. |