diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-29 07:59:28 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-29 07:59:28 +0100 |
commit | f19f6a799f1f064dc96a34165e0f528418a1bc9d (patch) | |
tree | 659d187536db82fd49a7b07bf19da9af9cb7a8b4 /src/synth | |
parent | b76ab2eda6f80560c93b1259b798f0113b32c859 (diff) | |
download | ghdl-f19f6a799f1f064dc96a34165e0f528418a1bc9d.tar.gz ghdl-f19f6a799f1f064dc96a34165e0f528418a1bc9d.tar.bz2 ghdl-f19f6a799f1f064dc96a34165e0f528418a1bc9d.zip |
synth-static_oper: add +,-,* for floats. For #1044
Diffstat (limited to 'src/synth')
-rw-r--r-- | src/synth/synth-static_oper.adb | 9 |
1 files changed, 7 insertions, 2 deletions
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 => |